This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

re: X server acting funny when displaying remote KDE session


 --- terry <tg5027@citlink.net> schrieb: > > 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.

It doesn't work for me. The aim seems to be to extract the X
server's host name from the output of the who am i command,
but that doesn't give very useful info on my system. I see
more chance for success when analyzing the SSH_CLIENT
variable that is left behind by ssh. It contains the client's
IP address, which could be grafted into the DISPLAY variable.
I'm not a shell script guru, but I could try to put something
together.

Cheers
Stefan


__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]