On Wed, 8 May 2002, AnonymousCoward wrote:
Yes, and you will have to "export DISPLAY=:0.0" from the root login, as well.
Another way in your root console is: # xauth merge /home/username/.Xauthority # export DISPLAY=:0.0
This will not require opening up xsessions to everyone via xhost +.
Regards, Robb
Dude you might have lost me here.
I understand these need to be entered in a root console, but I can't fathom what they do. And presumably the 'export DISPLAY' command would have to be done on every reboot?
The first xwindows session started, whether via the startx command or on boot via xdm, kdm, etc., is almost always named 0.0 When you execute a graphical program as another user than whom started the windowmanager, you need to tell the program what display to run on - hence the "export DISPLAY=:0.0" And no, environment variables like DISPLAY do not survive a reboot unless they are picked up on login from a file like .profile. Each xsession, or more simply when you start a windowmanager, has a security token associated with it that is unique to the user who started it. The "xauth merge" command tells the xserver to combine the tokens and let the new user (root in this case) have access to the display. The reason I don't like the "xhost +localhost" command is that it lets ANY user access your screen if they know how and consequently see anything that you type. If you simply type "xhost +" as some suggest, you let ANY user on ANY machine whether local to that machine or any machine on the network (think Internet) access your display data. Better to use ssh -X (hint: rtfm) or the xauth command.
The terms "opening up xsessions" and "via xhost +" are unfamiliar. Any enlightenment appreciated.
I've tried to help and may have missed some details, so see the man pages if you want more. Regards, Robb -- Robb Romans Linux Commando k i l l s o f t .com "so then let us not sleep as others do, but let us be alert and sober." 1 Thessalonians 5:6