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

Re: cannot run X apps when 'su'





Derrick 'dman' Hudson wrote:
| Hello,
| you shouldn just copy over .Xauth files.. It will ruin root X access ;)

What do you mean, "ruin root X access"?  What X access does root have
in the first place?  You certainly don't 'startx' as root in the first
place, do you?

Well, you can startx as rootbut that's not the Right Way(C).

You can also have other info in ~root/.Xauthority about other X sessions - can be a "complete" X session with startx
- cookies from other sessions -- another user is su'ing to root, too
- the local machine can have several DISPLAY's :0 :1 :2...
- lots of possibilities! ;)


| The Right Way(C) is:
| # xauth merge ~user/.Xauthority

Ahh, I knew 'xauth' was the Right tool, but I couldn't (quickly)
figure out how to use it :-).  'cp' I already know :-).

That merge means really *merge*, not *overwrite* as cp does ;)

Anyway, I was talking about "The Right Way(C)". cp works must of the cases, too :-)


| ...and don't forget to set DISPLAY:
| export DISPLAY=:0

As always, unless 1) ssh takes care of it or 2) environment
inheritance is your friend (that is, it's already set properly).


Yes, it's true... But there are ways of loosing the DISPLAY var too. After a "su -" for instance.

Regards,
Nuno Silva




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



Reply to: