Re: .Xauthority and kdm
On Mon, Jul 02, 2001 at 04:06:40PM +0200, tim wrote:
> thanks for the typ. I was allways wondering why the shell is owned by the old
> user after su.....
It isn't actually, just all the environment settings remained.
> > 1st solution (lame, don't run x programs as root):
> > $ su -
> > # export DISPLAY=:0
> > # export XAUTHORITY=~tim/.Xauthority
> > # xapp &
> works! but dissapears after relogin. So where do I need to place it that it
If you are the only user that will ever su to run an x app, you can
do another pretty lame trick by putting both variable assignments in
/root/.bash_profile. It is pretty bad actually, because when you login
on the console, some programs will be confused and think you're in x.
> xawtv was just the first app I recalled, the same thing happens with
The xawtv case is special, yes. But I thought I'd mention it anyway.
BTW, why su and then run xterm? Why not simply start an xterm and su
in the xterm shell?
> Btw. I changed the permission for the video device to 666. I guess what you
> are mentioned is the more common way!?
Better imho. On debian, it is all taken care of. Just add all users
that need access to the video devices to group "video".
> But then I have to change to the video group before i start xawtv, because
> users can only be in one group at time, right ?
No. A user can be in only one primary group, but in many secondary groups.
man sg (best approximation I could find, read a general unix book)
> I did as tim "xhost tim" with the intention to let everybody access the
> display who is on hostname tim, but it didnt work
If you are running xfree86 4.0, then you need to enable the xserver
to listen to the network. It is disabled by default, for reasons of
security. Alternatively, you could login using ssh with x11 forwarding
man Xserver (and look in /etc/X11/xinit/xserverrc, the manpage is oldish)