Home » Questions » Computers [ Ask a new question ]

Allow only one extra user to access the display

Allow only one extra user to access the display

The question is based on the thread.

Asked by: Guest | Views: 43
Total answers/comments: 2
Guest [Entry]

"I'm testing on Ubuntu 12.04 with X.Org X Server 1.11.3.

I tried Johan's solution and it appeared at first to work, but I found on my system the text after ""local:"" was being ignored. The result was that all local users were given access to my X session rather than one user.

The magic I found worked was:

xhost +SI:localuser:masi

Replace the portion after the last colon with the username you wish to grant access. You can inspect the authorised list by running xhost with no paramters. It should look something like:

access control enabled, only authorized clients can connect
SI:localuser:masi
SI:localuser:myself

This indicates that the ""masi"" user and the ""myself"" user are being granted xhost permissions in the same way."
Guest [Entry]

"First, restrict X server access to those who aren't on the list:

sudo xhost -

then add yourself to the allow list:

sudo xhost +masi"