How do I fix a "cannot open display" error when opening an X program after ssh'ing with X11 forwarding enabled?
Posted
by
Daryl Spitzer
on Super User
See other posts from Super User
or by Daryl Spitzer
Published on 2011-07-13T18:13:00Z
Indexed on
2012/06/29
21:19 UTC
Read the original article
Hit count: 309
After launching the X11 app (XQuartz 2.3.6, xorg-server 1.4.2-apple56) on my Mac (OS X 10.6.8), opening an terminal in X11 and running xhost +
, I then ssh -Y
to my Ubuntu 10.04 VM (running on VMware Fusion). When I run gedit .bashrc
(for example), I get:
(gedit:9510): Gtk-WARNING **: cannot open display:
set | grep DISPLAY
returns nothing.
But if I ssh -Y
into my Ubuntu 11.04 machine, gedit .bashrc
works. echo $DISPLAY
returns "localhost:10.0".
I tried export DISPLAY=localhost:10.0
while sshed into my VM and then running gedit .bashrc
, but I get:
(gedit:9625): Gtk-WARNING **: cannot open display: localhost:10.0
What could be different in the configuration of the two difference Ubuntu machines that would explain why one works and the other doesn't?
Update: As suggested by Zoredache in the comment below, I ran sudo apt-get install xbase-clients
, but I continue to have the same problem.
© Super User or respective owner