DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Just to put this on this thread, here you go: Run this command first (while you are logged in as the normal user):
xhost +local:root
or this will allow access by any user on that physical computer:
xhost +localhost
That allows root/others to have access to the x server. See the man pages for xhost. This, however is only effective for that session, so if you always want root access, then you need to put this in a startup script.
Last edited by smith847be; 02-16-2004 at 10:16 AM.
Sorry, DrOzz, didn't notice that link when I first saw this. "you can't log in as one user, and try to run something as another user within that users session ..". That made it sound like you were saying otherwise - that's what I was responding to.
I've tried the xhost +local:root and it works!
Few month or weeks ago I've tried this with the xhost command as well as the Xauthority, but both failed. The xhost command which I've used was only xhost +127.0.0.1 and that does not work.
Thanks for you fast response, I put this command in the xserver startup script.
Why do you want root to have so much access to the Xserver like this? Most systems with Gnome and KDE will caution you that its not a good idea to log in to X as root when you try.
The reason is: When I try to install or remove packages with a graphical front-end I've to be root. Some other tools for this task are checking the UID before running. That I have to be root on a x-session is very rare.
Don't enable it by default then. That's opening up a risk you don't need. Perhaps you can make a little shell script to do it when you need to execute the tool as root.
What distro are you running? I ask because most prompt you for your root password before churning ahead with the GUI tool.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.