PDA

View Full Version : sudo cannot connect to X server



albumns
20-Feb-2013, 18:00
Hello:

I found that my sudo command cannot connect to xserver, eg:

$sudo ./FUSBi-0.3.1_GNU-Linux
FUSBi-0.3.1_GNU-Linux: cannot connect to X server

thank you very much
best
Albert

mikewillis
20-Feb-2013, 18:26
$sudo ./FUSBi-0.3.1_GNU-Linux
FUSBi-0.3.1_GNU-Linux: cannot connect to X server

This is expected behavior I think once upon a time I used to be able to reel off a technical explanation as to why, but I can't right now :) You can find lots of discussion about it via Google.

Try

$ su -
$ /path/to/FUSBi-0.3.1_GNU-Linux

albumns
20-Feb-2013, 19:12
THX for reply.

but the command su - doesn't work:

$su -
su: Not setuid and you are not root, expect this to fail
root's password:
Sorry!

I input the corret password, but it doesn't work....

mikewillis
20-Feb-2013, 19:42
Is this machine one that you set up yourself or is it one that someone else maintains and has given you sudo rights on?

What's the output of

$ ls -l $(which su)
$ grep ^PERMISSION_SECURITY /etc/sysconfig/security
Post output in CODE tags for readability (look for # in the toolbar when composing post).