> > > The correct way to disable X forwarding is to use the ssh config files (or
> > > the -x / -X options).  The /etc/skel/.bashrc line mentioned above is just
> > > a bug in 7.2, which I understand has now been fixed.
> > Hmmm... I still see it on my cooker system -->  I had to comment out the
> > "export Xauthority"...
> Have you created your home from scratch ?

I have recently (last week) re-installed my x86 box to cooker and kept
it up2date with urpmi --auto-select since. So that should be "cooker
reference". Looking at the 
/etc/skel/.bashrc (which is the default for a new user's homedir):

# .bashrc
 
# Source global definitions
if [ -r /etc/bashrc ]; then
        . /etc/bashrc
fi

The /etc/bashrc:

# /etc/bashrc
 
# System wide functions and aliases
# Environment stuff goes in /etc/profile
 
if [ -z "$PROFILE_LOADED" -a -e /etc/profile ]; then
    . /etc/profile
fi
 
unset PROFILE_LOADED
 
# For some unknown reason bash refuses to inherit
# PS1 in some circumstances that I can't figure out.
# Putting PS1 here ensures that it gets loaded every time.
PS1="[\u@\h \W]\\$ "

Which eventually ends up in:

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

Stefan

Reply via email to