4

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 1

I 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.0

To setup the display I used the command

$ export DISPLAY=localhost:0.0

Some site suggested using the following, but it didn't work either:

$ export DISPLAY=:0.0

Do 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 2

0

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.

1
  • Yes, you are correct. I was able to install XMing, and follow your directions regarding "ssh x11 forwarding."
    – PhiL
    Feb 1, 2015 at 15:43
1

Plain 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.