=?iso-8859-1?Q?Gu=F0mundur_Erlingsson?= wrote: >Hi, > >I sometimes get this message when I run programs in xterm as root: > > Xlib: connection to ":0.0" refused by server > Xlib: Client is not authorized to connect to Server" > > >It doesn't seem to prevent anything from running but is annoying none the >less. Anyone know how to get rid of this thing? It seems to be a >permission-thingy, but as it comes only when I'm logged in as root, that's a >bit odd. Or isn't it?:-) Well, it will have stopped _something_ running.
What is happening is that when you become root by running su, XAUTHORITY is not defined (or is defined to root's XAUTHORITY). You need to point XAUTHORITY to the authority file of the user who started the X session, like this: export XAUTHORITY=/home/user/.Xauthority substituting the correct name for `user'. Alternatively, run `xhost +' before becoming root, but this is much less secure. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Have not I commanded thee? Be strong and of a good courage; be not afraid, neither be thou dismayed; for the LORD thy God is with thee whithersoever thou goest." Joshua 1:9