X server acting funny when displaying remote KDE session

terry tg5027@citlink.net
Mon Jun 16 11:57:00 GMT 2003


> Another minor quibble (which may be off-topic here):
> In contrast to what the Xfree user's guide says I have to set
> the DISPLAY variable manually after connecting to the linux
> machine via ssh. I would have expected ssh to do that for me.
> Also I have to do xhost + before calling ssh, is that not
> also supposed to be done by ssh?

Can't help with the KDE problem, but I've just started using Cygwin and 
have seen the above problem.  Actually, the DISPLAY setting was NOT a 
problem for me and I was wondering why so I looked into it and found out 
that it was being set in ~.bashrc (on the machine being logged into) by 
the code below:

#
# Smart way of setting the DISPLAY variable (from Hans) :)
#
if test -z "$DISPLAY" -a "$TERM" = "xterm" -a -x /usr/bin/who ; then
     WHOAMI="`/usr/bin/who am i`"
     _DISPLAY="`expr "$WHOAMI" : '.*(\([^\.][^\.]*\).*)'`:0.0"
     if [ "${_DISPLAY}" != ":0:0.0" -a "${_DISPLAY}" != " :0.0" \
          -a "${_DISPLAY}" != ":0.0" ]; then
         export DISPLAY="${_DISPLAY}";
     fi
     unset WHOAMI _DISPLAY
fi

My distro is SuSE, and Hans sounds Germanic - so maybe this is not in 
Debian.  It does work however - setting DISPLAY correctly from local 
login or from a couple of remote logins.

HTH,

terry



More information about the Cygwin-xfree mailing list