[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Xserver authorization/security



On Tue, Sep 07, 2004 at 02:47:58PM -0700, listcomm@ml1.net wrote:
> I'm trying to get my single-user system set up so that
> programs running as root to be able to open windows, etc.
> (ref. the infernal message "Not allowed to connect to
> server", etc. etc.)

/usr/src/linuxen/kernel-source-2.2.20 %% sudo /bin/sh
sh-2.05a# HOME=/root
sh-2.05a# export HOME
sh-2.05a# xclock
Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
Error: Can't open display: :0.0
sh-2.05a# export XAUTHORITY=/home/stefan/.Xauthority 
sh-2.05a# xclock

sh-2.05a# exit
/usr/src/linuxen/kernel-source-2.2.20 %% 

> snipped
> 
> W/r/t this last question, when I say "system-level", I mean as opposed
> to
> "user-level" i.e. run from an initialization file in the home directory
> of whatever user started the server (and incidentally, does Linux
> support
> use of a ".login" file?  I don't see any reference to it anywhere).

Try putting:

export XAUTHORITY=$HOME/.Xauthority

at the end of your ~/.bashrc .

Linux does not support .login.
tcsh does.
bash doesn't.

If you want to use tcsh, use "chsh" to set your preferences.

-- 
The world's most effective spam filter:
        ln -sf /dev/full /var/mail/$USER



Reply to: