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: SecureCRT to Xwindows


When you run Secure CRT and log into a remote server with X compatible
software, secure CRT needs to have the DISPLAY variable set on the
local machine so SecureCRT knows where to forward the remote machine's
X-output.  This also means you have to have an "X" display handler running
on your local machine (like Cygwin's X, or another commercial X
server like Hummingbird's).

For example, by default, in my startup scripts, my local X-server
listens on display "0", so DISPLAY is set to "localhost:0.0".

The easiest way to find the correct value for DISPLAY on your local
system is to start your X-server, then run a local xterm or rxvt
and type "echo $DISPLAY" in the xterm or rxvt window.  You should
also be able to run "xdpyinfo" and get more detail about the X server.

On the remote system, SecureCRT will automatically set the value of
"DISPLAY" to point to a port captured by "ssh" (assuming you are using
the ssh feature of SecCRT).  Alternate protocols like "telnet" in SecCRT
don't have automatic display or port forwarding.  Note, the remote
DISPLAY value should be set to "localhost:<something>" -- like
when I logged in to a linux machine:
> echo $DISPLAY
localhost:13.0
---
   This means the DISPLAY value is directed to a local port on the
remote machine -- this remote port is intercepted by the remote sshd
server and forwarded back to your local host.  There, the local
invocation of SecureCRT forwards that secure information to the currently
set value of DISPLAY.

   If you have problems getting DISPLAY set locally for SecureCRT
to use (i.e. if your local DISPLAY value is something other than the
default of "localhost:0" or "localhost:0.0", you need to change the
environment variable before you invoke SecureCRT.  It'd be best to
set the variable manually on the command line before invoking
SecureCRT:
(in bash)
/Program Files/SecureCRT 4.1> echo $DISPLAY   # display default
localhost:0.0
/Program Files/SecureCRT 4.1> DISPLAY=localhost:2.0 SecureCRT
##----------------------------------------------^^^ overrides default

Note, in SecureCRT, under session options->Port Forwarding->X11, you must
have "Forward X11 Packets" enabled.  It also needs to be enabled in
the global sshd config or your local .ssh/config:
---
Host *
       ForwardX11 yes
       ForwardAgent yes
----
Depending on your application, you may want to forward local
connections to a font server (port 7100) to the remote system you
are logging into, in case the remote program uses fonts on the remote
system.  You need to have xfs running on the remote system.

Hope this helps some...
-linda


Joseph Abrahams wrote:


Hi.  I am new to cygwin and xwindows.  I installed cygwin including all
of the x11 packages and all of the net packages.  I configured SecureCRT
to allow X11 forwarding, but when I try to run a remote program, it says
it can't open the display.

When I log onto my remote server, I am instructed to set the DISPLAY
variable to "ettin:15.0" or something similar.  What is this?  I'm not
exactly how to set the DISPLAY variables.

A complete listing from loging on till the error follows:

Thanks for the help,
Joseph


To use the secure DISPLAY feature of ssh set your DISPLAY environment variable to "ettin:15.0" after you get your shell prompt.

Please enter the name of an Engineering host <anywhere>: Last login: Fri Jan 28 19:27:13 from ettin.eng.aubur
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
Cannot find termcap
wainwright{abrahjm}1: netscape
xstdcmap: cannot open display "".
xdpyinfo: unable to open display "".
Error: Can't open display: wainwright{abrahjm}2:






-- In the marketplace of "Real goods", capitalism is limited by safety regulations, consumer protection laws, and product liability. In the computer industry, what protects consumers (other than vendor good will that seems to diminish inversely to their size)?



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