2007-09-12:
Using xhost with Ubuntu
Ubuntu (and many distributions these days) come with xhost very
much turned off. If you install the xhost package, it doesn't
work, and it's not easy to find out why. This is because,
evidently, running xhost is a very security dangerous and naughty
thing to do. The general recommendation is to use ssh with port
forwarding (-X). If you're naughty, however, as am I, and you really
want to use xhost, then you need to do the following (all as root):
- Edit /etc/X11/xinit/xserverrc:
Remove the "-nolisten tcp"
- Edit /etc/gdm/gdm.conf:
Comment out the "DisallowTCP=true" so that it doesn't add the -nolisten back.
- Really restart X
The easiest way is to probably kill gdm and then restart it from a text login:
/etc/init.d/gdm stop
At a text login:
/etc/init.d/gdm start
Back to Solutions.