[Novalug] X clients while sudo'ing?
James Ewing Cottrell 3rd
JECottrell3 at Comcast.NET
Tue Oct 20 22:32:40 EDT 2009
I'm not an expert on sudo, but if you can use su, you could try
something like:
su -c "DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xclient args"
I dunno, perhaps the same thing works with sudo, possibly running
something like
sudo sh -c "same quoted string as above"
Also look to see which of your environment variables are passed.
JIM
Mark Smith wrote:
> if i sudo to another user and then try to run an X client, it fails
> with:
>
> No protocol specified
> xterm Xt error: Can't open display: :0.0
>
> i'm thinking i can avoid this with some smart usage of xauth, but
> it's not obvious to me what that smart usage should be. anyone
> have a quick answer for me?
>
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.422 / Virus Database: 270.14.23/2448 - Release Date: 10/20/09 10:43:00
>
More information about the Novalug
mailing list