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

Re: X authentication and su (Re: changing framebuffer device owner during login)



On Tue, Jun 19, 2001 at 02:11:53AM +0200, Joost Kooij wrote:
> The portable solution that works for su'ing to other users as well is to
> use the proper interface, xauth, directly.
> 
> luser> xauth list
> [lines with stuff, copy the "unix" one for your local display]
> luser> su - paranoid
> password:
> paranoid> export DISPLAY=:0
> paranoid> xauth add [now paste that line you just copied here]
> paranoid> /usr/bin/X11/untrusted-binary &

I use a tiny script for this purpose: I just call "xgive",
which is

    #! /bin/sh
    echo "export DISPLAY=\"$DISPLAY\""
    echo "echo `xauth nextract - $DISPLAY` | xauth nmerge -"

It outputs something like

    export DISPLAY=":0.0"
    echo 0100 0007 ... | xauth nmerge -

These two commands I cut and paste into another user's xterm,
to give him access to the display.

Jochen
-- 
                                         Omm
                                      (0)-(0)
http://www.mathematik.uni-kl.de/~wwwstoch/voss/privat.html



Reply to: