Re: X Applications as Root User
Another option is to do xhost +localhost as a normal user, then export
DISPLAY=:0.0 as root.
Assuming your display is :0.0
For info on xhost security, man xhost
Another, slightly ridiculous option is to ssh -X root@localhost
On Sun, 18 Jul 2004 10:11:27 +0200, Andreas Janssen
> Kenneth Jacker (<email@example.com>) wrote:
> > Though I know it is discouraged, I have a single-user 'sarge' system
> > protected by 'iptables' on which I want to run X11 applications when
> > logged in as 'root'. I can use 'sudo' (e.g., "% sudo xlogo"), but I'd
> > rather directly access the apps as 'root' (e.g., "# xlogo").
> > Though I've searched, I have not found!
> What is your error message? Do you "xlibs: connection refused" error? Do
> you log into X as a user, and opened a root shell using "su"? You can
> allow the super user to access your X session:
> # export XAUTHORITY=/home/kenneth/.Xauthority
> After that you can start the programs as root.
> Or you install some wrapper like sux, gksu oder kdesu. They don't need
> any kind of configuration like sudo does.
> best regards
> Andreas Janssen
> Andreas Janssen <firstname.lastname@example.org>
> PGP-Key-ID: 0xDC801674 ICQ #17079270
> Registered Linux User #267976
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact email@example.com