Sunday, November 2, 2014

Changing user with su does not allow you to run X apps

It happens whenever you su to a different account on the same machine. The X session details are not inherited by the new user, so you do not have access to the X session.

The solution is to use xhost like this:

> xhost
access control enabled, only authorized clients can connect
SI:localuser:nickapos

activate xhost, and then add the new user that needs to run xapps:


>xhost +si:localuser:nickapostolakis
localuser:nickapostolakis being added to access control list


verify by re-running xhost:

> xhost
access control enabled, only authorized clients can connect
SI:localuser:nickapostolakis
SI:localuser:nickapos

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.