Re: running root X programs
Another idea, the simplest one I could think of: in your startx script, add
the line ``cat ~root/.Xauthority >> ~/.Xauthority'' just after
``serverargs="$serverargs -auth $HOME/.Xauthority"''. First startx as root to
create the ~root/.Xauthority file and chgrp it so that only users in a group
who locally access the machine can read it. Only problem is the file is
re-created whenever root uses startx, but I'd start X as the normal user anyway.
Chandran
Michael Beattie wrote on Sat, Sep 05, 1998 at 11:33:43PM +1200..
> On Sat, 5 Sep 1998, Andrew wrote:
> > How do you run an X program as root whilst still in a user X session?
>
> Many ways...
>
> 1) su in an xterm.. no worries.
>
> 2) As root on a VC:
> # xauth -f /home/[user]/.Xauthority extract - :0 | xauth merge -
> # export DISPLAY=:0
> # [prog] &
> ... no worries.
>
> 3) the list goes on.. thats all I can think of at the mo. Anyone else?
Reply to: