Michael Brown wrote:
> 
> On Mon, 12 Mar 2001, Stefan van der Eijk wrote:
> > Then in /etc/profile.d/xhost.sh:
> > # Export Xauthority for users not for root.
> > if [ ! -z "$DISPLAY" ];then
> >         if [ "`id -u`" -gt 14 ];then
> >                 if [ -z $XAUTHORITY ];then
> >                     export XAUTHORITY=$HOME/.Xauthority
> >                 fi
> >         fi
> > fi
> > So... when you do a remote ssh session, it sets up the $DISPLAY for you,
> > and put it's own $XAUTHORITY there --> to be able to use the proxied X11
> > over ssh. Then your .bashrc comes along and destroys the $XAUTHORITY. Is
> > this correct?
> > If the xhosts.sh script could be made a bit smarter --> to detect if the
> > $XAUTHORITY belongs to a ssh session then it might work... right now my
> > $XAUTHORITY on the remote host looks like:
> > XAUTHORITY=/tmp/ssh-XX04pbFe/cookies
> 
> xhosts.sh is fine - it will only set XAUTHORITY if it hasn't already been
> set (the "-z $XAUTHORITY" test).  When you use ssh, it sets up DISPLAY and
> XAUTHORITY, so xhost.sh doesn't overwrite XAUTHORITY.
> 
> Can you post the contents of your ~/.bashrc?
You're right (sorry for making so much noise).

Stefan

Reply via email to