Can’t connect to X11 server on Ubuntu 10.10

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

/usr/bin/X -nolisten

, 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:

[security]

DisallowTCP=false

Then reboot. Simply logging out from the graphical desktop and back in is not enough.

 

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s