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

Re: The best recommendation for allowing "su" in X

>> Osamu Aoki <debian@aokiconsulting.com> writes:

 > Here is .xinitrc for this.
 >         #!/bin/sh
 >         # This makes X work when I su to root.
 >         if [ -z "$XAUTHORITY" ]; then
 >                 XAUTHORITY=$HOME/.Xauthority
 >                 export XAUTHORITY
 >         fi
 >         # invoke global X session script
 >         . /etc/X11/Xsession

 I see.

 > >  I don't understand.  I *have* a .xsession and it works just fine.
 > Of course, you set up this file right.  I had a working .xsession too :)

 Stripping the parts of my .xsession that figure out if I'm working on a
 broken box or not (i.e., is this Debian or not? ;-) I'm left with:

#! /bin/sh

if command -v xscreensaver > /dev/null 2>&1 ; then
    xscreensaver -no-splash -timeout 6 -lock-mode &
    xmessage -center 'Warning: no screen saver running'
exec /usr/bin/wmaker

 Really.  That's my xsession on Debian boxes, nothing else.  And I
 haven't changed the system's Xsession files.  And I get and exported
 XAUTHORITY by default.

 > any X session started by either startx or xdm

 perhaps we have identified the problem.

 If you remove your customizations and use startx, do you get an
 exported XAUTHORITY variable or not?  If yes, that's what I'm seeing.
 Now the question is if using xdm changes this somehow.  It might be.
 AFAIR xdm contacts the X server and asks it for a cookie; perhaps it's
 xdm that's failing to export this information (it should).


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

Reply to: