Thanks - and, you're right, and I had forgotten that; ".login" is a shell feature. (I probably didn't look in the "csh" or "tcsh" manuals...)
The "Xauthority" tactic, if I understand correctly, is similar to using "xauth"; you have to run something from your login shell one way or another. What I'm trying to figure out, is how to get a system-level solution to the problem, so that it wouldn't be necessary, in the case of a system with several users any of whom might be the one to spawn the X server when they log in, for each user to have to have something in their login shell. On Tue, 7 Sep 2004 16:54:04 -0700, "Stefan O'Rear" <[EMAIL PROTECTED]> said: > On Tue, Sep 07, 2004 at 02:47:58PM -0700, [EMAIL PROTECTED] 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. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]