[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Root can't run X programs



* David Krider (david@davidkrider.com) [030428 15:10]:
> After this:
> 
> 
> kriderde@tyrannus:~$ xhost +
> access control disabled, clients can connect from any host

don't do this.  Ever.

> 
> 
> I still get this:
> 
> 
> tyrannus:~# export DISPLAY=localhost:0
> tyrannus:~# eroaster
> 28.04.2003 16:48:16.745 ERROR main [Main] An error occured: cannot open
> display
> 
> 
> Can anyone tell me why?

Debian's default X config is protecting you from yourself.  There are
many, many better ways of redisplaying local apps.  Your best bet is to
install sudo, add your regular user account to the sudoers file, and use
sudo to display X apps as root instead.  Personally, I don't feel like
giving this rant _yet_again_ right now, so just search the archives;
it's in there many times ;-)  The gist of it is:  use 'su' 'su -m' 'ssh
-X localhost' 'sudo' and maybe even 'xauth' and/or playing with
XAUTHORITY.  Don't use xhost.  Don't enable your X server to listen for
tcp connections.  Don't use xhost.

Still better, in this case, would be to not run this application as
root.  I take it this 'eroaster' is a cd mastering/burning application?
Add your user account to the appropriate group and you'll get full
access to the cdrw drive without being root (i.e. having full access to
(potentially destroy) everything).

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
#include<stdio.h>
int main() {
    puts("Reader! Think not that \n"
         "technical information \n"
         "ought not be called speech;");
    return 0;
}

Attachment: pgpbjbkOBzHWJ.pgp
Description: PGP signature


Reply to: