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

Re: how does root run a graphical prog



Carel Fellinger wrote:
On my Debian system root can automatically run X-Apps (after an su). I was
wondering why but haven't figurerd it out yet. It's not what I was used to
before.


I think you did `su', not `su -'.

A mere `su' merely changes your identity, but the environment stays the
same.  In particular $HOME. So when you launce an X-appl, the authorisation
cookie is read from /home/other-user/.Xauthority, and you really being root
and allowed to read anything this works.

A `su -' on the other hand behaves like you logon, so $HOME now points
to root's home dir and X tries to read /root/.Xauthority.  Unless you've
merged in the .Xauthority from the user you su-ed from this will fail.
Simply running `xauth merge /home/other-user/.Xauthority' fixes this for
as long as the X-cookie of that other user doesn't chance.


I just did a plain 'su' followed by a 'echo $HOME' and got /root. Then I tried to open a graphical program as root which I always thought just worked and got an:

GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

But the program still started and ran fine. Though if I do a 'su -' I can't open a graphical program as others have said...

I have a pretty vanilla default woody install and haven't fiddled around with that much.


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: