How to make another user run X clients on the local X server

Luca Risolia luca.risolia at
Sat Jun 21 17:43:12 PDT 2008


I would like to make a second local user B to run X clients on the local X 
display/session which is started by the user A.

After A starts X, what I do is:

A$ sudo xhost +local:B
A$ su - B
B$ xclock

This way xclock can connect without problems. Now I want to make "xhost 
+local:B" permanent. 

The documentation says to add an entry "local:" to the file /etc/Xn.hosts. 
After adding this entry and restarting X, "xhost" lists the new "LOCAL" 
string as expected:

A$ xhost
access control enabled, only authorized clients can connect

This means that /etc/X0.hosts has been read somehow. But this does not seem to 
be enough. I still have to do a manual "xhost +local" to allow xclock to 
connect to the server.

Does anyone have an idea why this happens?
In case, does anyone know any other *clean* ways to make the user B use the 
local display?

I am not subscribed to this list, so please CC me.

Thanks in advance,

More information about the xorg mailing list