Exporting X permissions when su'ing to another user...
Tobias Heinemann
theine at nordita.dk
Fri Dec 2 12:13:52 GMT 2005
>>>Although sudo is the preferred method in Ubuntu for privileged users to
>>>gaim root privileges, there are times when su is a better choice. (For
>>>example, when running as another user.)
>>
>>Whats the problem with 'sudo -i -u joe' to get a shell as user joe?
>>X11 apps do work this way.
>
> As Abel wrote previously, this doesn't work for me. The DISPLAY
> environment variable isn't set, and when I do set it (to :0.0... should
> it be something else?) I don't have permissions.
You need to grant joe temporary access to your X server:
xhost +local:joe at localhost
sudo -u joe xclock
xhost -local:joe at localhost
Regards,
Tobi
More information about the ubuntu-devel
mailing list