[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xauthority question
- To: Tzafrir Cohen <tzafrir(at-nospam)technion.ac.il>
- Subject: Re: Xauthority question
- From: "Nadav Har'El" <nyh(at-nospam)math.technion.ac.il>
- Date: Thu, 1 Mar 2001 10:22:13 +0200
- Cc: Linux-IL Mailing List <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Hebrew-Date: 6 Adar 5761
- In-Reply-To: <Pine.LNX.4.33_heb2.09.0102282217550.16378-100000@canada1.technion.ac.il>; from tzafrir@technion.ac.il on Wed, Feb 28, 2001 at 10:23:25PM +0200
- References: <Pine.LNX.4.33_heb2.09.0102282217550.16378-100000@canada1.technion.ac.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Mutt/1.2i
On Wed, Feb 28, 2001, Tzafrir Cohen wrote about "Xauthority question":
> Hi
>
> I would like to run some X apps from a 'su -' shell xterm.
>
> I used to use the following trick to save myself the need of messing with
> xauth:
>
> in the root shell I set:
>
> DISPLAY=:0.0
> XAUTHORITY=/home/tzafrir/.Xauthrity
>
> (since root can read the user's home directory)
>
> However, this doesn't work anymore. Any idea if there is any way to make
> it work?
This should work, and in fact the easiest thing for you to do... How come
it stopped working? Try fixing your spelling to ".Xauthority", not
".Xauthrity" :)
Also, try replacing :0.0 with localhost:0.0 or machine:0.0 - maybe that
would work (but it's only a desperate try).
> If not, can anybody give me the required xauth commands? (Yes, I tried the
> man page, but I didn't fully understand it).
>
> Thanks
'xauth l' just lists the MIT magic cookies you have: for each DISPLAY you have
some long hex key (displays written as .../unix are used when X is using a
unix domain socket, i.e., when :0.0 is used without a machine name).
But 'xauth l' is just for information. To send a Xauthority key to a different
user (or machine), do something like
xauth auth extract - $DISPLAY | su -c xauth merge -
This is similar an example in xauth(1). If after this machine:0.0 works
but :0.0 does not, maybe you'll need a second line similar to the above
but with machine/unix:0.0 instead of $DISPLAY - I'm not sure.
By the way, if this is personal machine (with no other users), you can just
do something like 'xhost +localhost'. Looks scary, but perfectly acceptable
for a single-user host (I would suggest to firewall the X-Windows ports from
the outside, just in case you accidentally do something like 'xhost +').
--
Nadav Har'El | Thursday, Mar 1 2001, 6 Adar 5761
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |A diplomat thinks twice before saying
http://nadav.harel.org.il |nothing.
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il