On Mon, 2 Jul 2001, tim wrote: > hello all > > I upgraded to kde 2.2beta. I start now to runlevel 5 and kdm. > My problem is that I dont know how to configure Xauthority that other users > (even root) can acces the display. > I get the following message: > > --------------------------------------------------/ > [EMAIL PROTECTED]:~$ su > Password: > tim:/home/tim# xawtv > This is xawtv-3.53.1, running on Linux/i686 (2.4.5) > Xlib: connection to ":0.0" refused by server > Xlib: Invalid MIT-MAGIC-COOKIE-1 key > Error: Can't open display: :0 > tim:/home/tim# > ---------------------------------------------------/ > > When I start into runlevel 2 and startx I set the permission with "xhost > myhost". This is secure enough for me because its my privat firewalled > network. But xhost doesnt work in runlevel 5... > > I went thru the manual of xauth but cant figure out how to give anyone (or > specific user) access to the display?
Let's forget about the various more or less good tips and tricks that were provided before. This xauth issue has been discussed on debian-devel last week and I coded an su wrapper script that does all the xauth legwork for you. So here's what I recommend: * go to http://fgouget.free.fr/sux/ * download the sux script * install it in /usr/local/bin * and then use the script to su as root: 'sux -' is the preferred way * you can even do as me and put 'alias su=sux' in your .bash_profile For other readers, note that 'sux - foo' works too, unlike the dangerous XAUTHORITY tricks. I say dangerous because if you set 'XAUTHORITY=/home/foo/.Xauthority' and then do a an xauth add/remove, the .Xauthority file will belong to root, which means foo won't have access to *his* X display anymore!!! Oh, and if you played tricks with xhost, remove them they won't be necessary anymore, and fix the permissions on that 'video device', 0666, ksss! -- Francois Gouget [EMAIL PROTECTED] http://fgouget.free.fr/ Any sufficiently advanced Operating System is indistinguishable from Linux