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

Re: Xauth, how to get rid of it?



There is a nice little command called xhost which allows you to
specifiy from which machines users are allowed to run X
applications.

So this alters the Magic Cookie stuff.  If you type:

xhost +mymachine

where mymachine is the hostname of the computer you are
currently typing at, then no matter what user you su to, then
you are able to run X applications.  I do this when I want to
install applications when they have X installs.

First I login as username then run startx and work as normal. 
If I want to run an X applicaton as another user, say root to
install a non-debianised X app, then I would type the above
command first then su to root.  I can now run all the X apps I
so desire.

I also use this mechanism to read my email stored on another
machine, using netscape as my mail reader.  I type:

xhost +othermachinename
rlogin othermachinename
export DISPLAY=mymachine:0.0
netscape -mail &

In order, this allows me to run and X application from another
machine using xhost.
Then I login to the other machine.
Then tell the othermachine to put the X applications display on
mymachine so I can control it.
Then I run my X application.

A word of warning though, if you do xhost +  then you are
allowing anyone to run an X app on your machine, which may be
not what you desire.

Hope this all helps.

Pollywog wrote:
> 
> On 07-Apr-99 Richard Harran wrote:
> > Do you mean that you are trying to start a second X session while the
> > first is still running, or are you having difficulty starting for a
> > second time having exited the first session?
> >
> > If it is the first (and you get an error like:
> >       server is already active for display :0, or something)
> > you can fix it with
> >       startx -- :1
> > to start the second X server on display 1.  This will probably associate
> > it with <ctrl><alt><F8>.
> >
> > If it is the second, I think you have a problem (X not exiting
> > properly?) 'cos I don't think that should happen.
> 
> I get those annoying MAGIC COOKIE warnings when I su from a regular user and
> this even happens when I use vim after 'su'.  I am still able to edit stuff,
> and the only problem is when I need to run some X program as superuser.
> I saw somewhere how to deal with this Xauth stuff, but I don't remember where.
> 
> --
> Andrew
> 
> [PGP5.0 Key ID 0x5EE61C37]
> 
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
begin:vcard 
n:Stevenson;John 
tel;fax:+31 20 34 22 820
tel;work:+31 20 34 22 820
x-mozilla-html:TRUE
url:www.oa.nl
org:OA Europe
version:2.1
email;internet:John@oa.nl
title:Technical Consultant 
adr;quoted-printable:;;Objective Alliance=0D=0AHoghilweg 14L;Amsterdam;Zoud Oust;1101 CD;Nederlands
x-mozilla-cpt:;-11328
fn:John  Stevenson
end:vcard

Reply to: