Re: Root in X Display

2001-05-22 Thread Shaul Karl
 On Mon, 21 May 2001 16:43:04 Chris Spencer wrote:
  Hello,
  
  How can I change my permissions so that root can run things on the 
 X Display 
  of my normal user? For example, if I drop to a command prompt, su 
 to root, 
  and try to configure the kernel by typing in make xconfig I get 
 the error:
  
  Xlib: connection to :0.0 refused by server
  Xlib: Client is not authorized to connect to Server
 
 Before you su to root type xhost +local: (minus the quotes)
 and you'll be set.
 



Another option might be issuing

XAUTHORITY=~user_name_who_log_in_X/.xauthority make xconfig

This topic is discussed in /usr/share/doc/xfree86-common/FAQ.gz (How do I run 
an X client as root when the X session is run by a user?).

BTW: If you are running make xconfig in order to config a new kerenl you 
might give up being root for this matter. This is fully described in  
/usr/share/doc/kernel-package/README.



 Dana
 --
 I used up all my sick days, so I'm calling in dead.
 

-- 

Shaul Karl [EMAIL PROTECTED]

Hillel used to say: If I am not for myself who will be for me?
Yet, if I am for myself only, what am I? And if not now, when?
  (Ethics Of The Fathers 1:14)





Re: Root in X Display

2001-05-22 Thread Dave Sherohman
On Mon, May 21, 2001 at 06:42:11PM -0500, Dana J . Laude wrote:
 Before you su to root type xhost +local: (minus the quotes)
 and you'll be set.

You'll also be allowing anyone and everyone with access to the machine(s)
specified in your xhost command to run programs and have them display on
your screen.  Use xauth merge ~$USER/.Xauthority (as root) instead and
_only_ root will be able to display things on your screen.  Much safer.

-- 
That's not gibberish...  It's Linux. - Byers, The Lone Gunmen
Geek Code 3.1:  GCS d? s+: a- C++ UL++$ P+ L+++ E- W--(++) N+ o+
!K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI D G e* h+ r y+



Root in X Display

2001-05-21 Thread Chris Spencer
Hello,

How can I change my permissions so that root can run things on the X Display 
of my normal user? For example, if I drop to a command prompt, su to root, 
and try to configure the kernel by typing in make xconfig I get the error:

Xlib: connection to :0.0 refused by server
Xlib: Client is not authorized to connect to Server

How can I change this? Thanks...

-Chris



Re: Root in X Display

2001-05-21 Thread Dave Sherohman
On Mon, May 21, 2001 at 03:43:04PM -0600, Chris Spencer wrote:
 How can I change my permissions so that root can run things on the X Display 
 of my normal user? For example, if I drop to a command prompt, su to root, 
 and try to configure the kernel by typing in make xconfig I get the error:
 
 Xlib: connection to :0.0 refused by server
 Xlib: Client is not authorized to connect to Server
 
 How can I change this? Thanks...

To steal one of Karsten's answers from a couple weeks back:

 Rather than exporting xauthority, my preference is:
 
 # As root
 $ xauth merge ~$USER/.Xauthority
 
 ...where $USER is your desired user.
 
 This transfers cookies from $USER's .Xauthority file to root's
 .Xauthority file.  Changes to user's .Xauthority file don't effect X.
 X now has access to user's X session, but not vice versa.

(Hey, Will...  Is this one in your 'newbie tip-of-the-.sig' list yet?)

-- 
That's not gibberish...  It's Linux. - Byers, The Lone Gunmen
Geek Code 3.1:  GCS d? s+: a- C++ UL++$ P+ L+++ E- W--(++) N+ o+
!K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI D G e* h+ r y+



Root in X Display

2001-05-21 Thread Dana J . Laude
On Mon, 21 May 2001 16:43:04 Chris Spencer wrote:
 Hello,
 
 How can I change my permissions so that root can run things on the 
X Display 
 of my normal user? For example, if I drop to a command prompt, su 
to root, 
 and try to configure the kernel by typing in make xconfig I get 
the error:
 
 Xlib: connection to :0.0 refused by server
 Xlib: Client is not authorized to connect to Server

Before you su to root type xhost +local: (minus the quotes)
and you'll be set.

Dana
--
I used up all my sick days, so I'm calling in dead.




Re: Root in X Display

2001-05-21 Thread Benjamin Black
On Mon, 21 May 2001 16:43:04 Chris Spencer wrote:

 Hello,
 
 How can I change my permissions so that root can run things on the X Display 
 of my normal user? For example, if I drop to a command prompt, su to root, 
 and try to configure the kernel by typing in make xconfig I get 
 the error:
 
 Xlib: connection to :0.0 refused by server
 Xlib: Client is not authorized to connect to Server

***WARNING*** you should NOT do this unless you are the sole user of
your machine, or you completely trust all the users who use your
machine.

you need to set this resource:

DisplayManager.authorize: false

if you use xdm, you will find this resource line in the file
/etc/X11/xdm/xdm-config.  otherwise, i *think* you can add it to your
~/.Xresources file and get the same result (correction?).

this will turn off authorization for ALL users, not just root; i think
this is what you want.  if this is not what you want, read the
documentation for xauth (man xauth) specifically, and see the various
HOWTOs generally (XFree86-HOWTO, XWindow-Overview-HOWTO,
XWindow-User-HOWTO, etc.).

/ben

-- 
|_|_ | _  _ |_   PGP public key: http://www.wilykit.com/wilykit.key
|_) . |_)|(_|(_ |\  Never rub another man's rhubarb. -- Joker