Using xhost with Ubuntu/Kubuntu Linux running gdm or kdm

I was just chatting to a work colleague about the ease and wonders of X11 as part of extolling the virtues of the Linux Terminal Server Project, when I said I'd show him how it works.

So I tried to do 'xhost +' on his machine and then ran xeyes from my machine giving his machine's IP address in the -display option, but it didn't work! Trawling the web, I found that Ubuntu had tightened things up:

http://davesource.com/Solutions/20070912.Ubuntu-xhost.html

This solution works for gdm users, but my colleague and I both run kdm (kde4) to control acces to X. So here's the expanded instructions:

  1. Edit /etc/X11/xinit/xserverrc:
    Remove (or comment out) the "-nolisten tcp"
  2. Edit /etc/X11/kde4/kdm/kdmrc:
    Find the line 'ServerArgsLocal = -br -nolisten tcp and comment out the '-nolisten tcp' bit.
  3. Log out of X (GNOME or KDE) and log back in again (this should restart the kdm or gdm process).

Having done that it should work thus:

My machine's IP is 192.168.0.10 and my colleagues is 192.168.0.20. On my colleague's machine, having done the above he opens a command line and issues:

% xhost +
% xeyes -display 192.168.0.20:0.0

And xeyes appears on his screen!

 

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are an organic lifeform and to prevent automated spam submissions.