Can’t connect to X11 server on Ubuntu 10.10Posted: January 25, 2011
Situation: You have Ubuntu 10.10 box and want to connect to its X11 server from remote box running a bit older version of Ubuntu, so that the client, which you are running via SSH, would be able to show its picture at this end of the channel for you to see.
Problem: You allow access to your X11 server locally by running command “sudo xhost +”. You tell the remote client where to look for the X11 server by “export DISPLAY=XXX.XXX.XXX.XXX:0.0”. But nothing happens. You still can’t connect and keep getting message “cannot open display: XXX.XXX.XXX.XXX:0.0”.
Possible reason: Ubuntu 10.10 by default prohibits X11 listening to TCP connections. Try to find if this is your case by “ps -ef | grep listen”. If you see a line which contains something like
, then you may be pretty sure that it is.
Fix: Become root and go to /etc/gdm. Create file custom.conf and edit it. Enter two lines:
Then reboot. Simply logging out from the graphical desktop and back in is not enough.