Permissions: xhost +

Collins Richey erichey2
Mon May 17 11:58:46 PDT 2004


On Wed, 28 Jan 2004 07:33:00 -0500
"David A. Bandel" <david at pananix.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tue, 27 Jan 2004 22:17:56 -0700
> Collins Richey <erichey2 at comcast.net> wrote:
> 
> [snip]
> 
> > 
> > Not disputing your knowledge, but on my machines over several years, I
> > only ever see the :0.0 variant, and xhost +localhost always enables
> > root users to have access to the screen.
> > 
> > Example:
> > 
> > collins at richpc3 $ echo $DISPLAY
> > :0.0
> > collins at richpc3 $ xhost +localhost 
> > localhost being added to access control list
> > collins at richpc3 $ su -
> > Password: 
> > richpc3 root # beaver
> > richpc3 root # echo $DISPLAY
> > :0.0
> > 
> > beaver opens its window and runs normally.
> > 
> > So, what's the rest of the story?
> 
> The rest of the story will be found in /etc/hosts.  I never assume
> someone else's system is correctly set up.  But that :0.0 entry has to
> map to something (hostname or ip).  When is localhost != 127.0.0.1? 
> When /etc/hosts has been set up incorrectly like this perhaps:
> 127.0.0.1  myhostname
> because perhaps during installation the network wasn't set up, so the
> helpful distro install did something bozo.  I've seen it often enough.
> 

ok, thanks.  It would seem, then, that the original recommendation should have been "fix your /etc/hosts' rather than "set $DISPLAY"?

-- 
Collins - Denver Area - 
Gentoo stable kernel 2.6.2-rc1


More information about the Linux-users mailing list