Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running ubuntu server (no gui).

I am trying to run Chromium and somehow view the gui using another tool (vnc?)

When I try to run chromium-browser I get this error:

(chromium-browser:3869): Gtk-WARNING **: cannot open display:

I think I might have to set the DISPLAY environment variable.

I really don't know how to do this at all. Help!

share|improve this question

migrated from Jul 15 '12 at 1:34

This question came from our site for professional and enthusiast programmers.

3 Answers 3

You cannot run a GUI application if you have a headless server without a GUI. In Linux/Ubuntu you need to install XWindows. I expect that when installing Chromium there were some suggestions on installing other dependancies? Like XWindows. Otherwise you could install a mininum GUI like XFCE4 without all the dependancies (so not the Xubuntu desktop, but only XFCE4). This will enable you to start the XWindows system from command line (startxfce4) when you want. But it is no longer a real headless server.

Like the other commenters said: you can start it using ssh -X (-X will forward XWindows) but not VNC. The VNC software expects a GUI already running, while ssh -X will start it's own (have a look at

When using SSH from a different computer you also need a XWindows server. For windows install CygWin (and XWin) or use XMing.

share|improve this answer

Use ssh -X server.some.where and you get $DISPLAY.

share|improve this answer

If you use ssh to log in to the server, use the option -X for X11 forwarding. Otherwise, there was some issue with launching Chrome as root. You can see it here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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