I have been at this for the past two days and still no luck.
$ firefox
Error: no display specified
$ firefox &
[1] 25977
Error:no display specified
^C ^C
[1]+ Exit 1I am on a Windows7 machine and I'm trying to get Firefox to open on the CentOS machine, but be displayed on my current screen (Windows 7). When typing firefox in terminal, I am getting the following error:
Error: cannot open display: localhost:0.0To setup the display I used the command
$ export DISPLAY=localhost:0.0Some site suggested using the following, but it didn't work either:
$ export DISPLAY=:0.0Do I really need Xming?
Does anyone know of reliable resources so I can get a better knowledge concerning running applications (e.g. router traffic graphers, Apache, a simple index.html page) off of a virtual machine to be viewed on my desktop via PuTTY?
I really do not want to download Xming or an X server. Is this necessary?
I understand when I am run the command firefox or firefox & the server looks for a GUI however it is not "pointed" at my desktop.
I have used the command export.
2 Answers
If the CentOS machine is remote, you have to specify your IP address where you have X server (i.e. XMing) running when doing "export DISPLAY". Also, you must have the X11 port opened as well.
Your firewall rules may be blocking it, so the best alternative is to use "ssh x11 forwarding" in your ssh client. That will set DISPLAY environment variable upon connection automatically, so the only thing you have to do on your Windows 7 machine is to install the X server (XMing).
For example, if you use Putty, the ssh x11 forwarding can be enabled in Connection - SSH - X11 - X11 forwarding.
1Plain SSH will allow you to work with CLI tools like Apache, etc.
For GUI tools, like Firefox, you'll need an X server like xming. SSH will transmit the X "commands" (graphics command like "draw a window", etc.) between Linux and Windows, but you need a X server to actually draw the Firefox window on your Windows machine.