| Modified: Mar 27
2003
|
Displaying X-Windows
All of this assumes you already have SSH
downloaded and installed. This excerpt of the SSH manpage explains
how SSH and windowing applications "collaborate":
ENVIRONMENT
ssh will normally set the following environment variables:
DISPLAY
The DISPLAY variable indicates the location of the X11
server. It is automatically set by ssh to point to a
value of the form hostname:n where hostname indicates
the host where the shell runs, and n is an integer
>= 1. ssh uses this special value to forward X11
connections over the secure channel. The user should
normally not set DISPLAY explicitly, as that will render
the X11 connection insecure (and will require the user
to manually copy any required authorization cookies).
|
As X-windowing applications for the Windows operating systems, Sitelicense
offers
eXcursion
at no cost.
X-Win32 software
at low cost
Problems?
|
eXcursion tunneling
SSH on a Windows PC
- Download and install eXcursion.
Installation can set up Server and Control Panel shortcuts
on your desktop; most computer labs have these shortcuts already setup.
- Click the Control Panel shortcut to configure eXcursion
or, click Start, go to Programs, find eXcursion,
then Control Panel
or, if eXcursion is running, find it on
the taskbar and right-click it and choose Control Panel.
- Click the Display tab and set Multiple Windows.
- Click the Access tab.
- Check the Enable Access Control box.
- Under Node Name add "localhost" and
click the Add--> button. This is required for X-windows to
tunnel through SSH.
- Under Node Name add additional Hosts for which you have accounts
from the table below. Enter a Node Name, click the Add-->
button, go back and enter the next host, etc.
- When you have finished adding your hosts, click Apply then
the Start/Restart Server button at the bottom of the eXcursion
Control Panel.
|
Hosts
|
Which system?
|
|
u.arizona.edu
|
U-System
|
|
hpc.arizona.edu
|
Super - HPC
|
|
beowulf.hpc.arizona.edu
|
Beowulf cluster
|
- Start SSH Secure Shell but do not actually connect yet. You
need to define SSH Profiles as described in SSH
Setup for Windows for those hosts.
- SSH: under the Profiles pulldown, select Edit.
- SSH: highlight a host profile you have defined and click the
X11 Tunneling tab, and check the Tunnel X11 connections
box.
- SSH: click OK.
- SSH: under the Profiles pulldown again, select the profile
you've just set up, then log in to the system, using your NetID
and password.
- To test your setup, type xclock at the prompt. A new
window should pop-up.
With this configuration your "X-windows are tunneling SSH."
eXcursion not
tunneling SSH on a Windows PC
|
If
| tunneling
seems to be too slow for you (as it might be off-campus because
inbound and outbound data are encrypted by the SSH tunnel) and
you are not
worried about someone intercepting/sniffing your data and
you are not
using one of the X-windowing applications that works better
when tunneled (there's a partial list below),
|
you can partially bypass SSH (you must still use SSH to log in to your account).
You will not be using the localhost and SSH will not automatically
be configuring DISPLAY for you. Steps 1 through 11 above must
still be done. Under eXcursion you must additionally - explicitly - define
the hosts you will be accessing.
There is no conflict or harm in having localhost along
with the other Hosts defined in eXcursion simultaneously. To switch
between tunneling and not tunneling X-windows requires just a minor
change.
To bypass the SSH tunnel, no changes are needed to your
SSH or eXcursion configurations. You only need to route
DISPLAY output directly to your "host"--your PC's display--instead
of through the tunnel. Only one override is needed:
- (Optional) You need to know your DNS hostname. If you don't
know your PC's hostname (as might happen you use an ISP
from home or use DHCP on campus), you can find it when you'veSSH'ed
to the remote host with:
who | grep your_NetID
For example, if you entered
who | grep SilentBob
you might get a response like
SilentBob
ttyq50 Feb 6 13:57 (123.45.67.89)
- (Optional) Within parentheses in the response is the
your_hostname or a dynamically assigned IP address
which you need to capture
- At the prompt use the format below to set the DISPLAY variable
using your_hostname
setenv DISPLAY your_hostname:0.0
Using the earlier example, you would enter
setenv DISPLAY 123.45.67.89:0.0
- Try the xclock command
xwin32 on a Windows PC
- Download and install xwin32.
- Start X-Win32.
- Minimize the window.
- Right-click the icon (X) on the task bar.
- Select X-Config.
- When the X-Win Configuration window opens, click the Window
tab.
- For Window Mode choose Multiple.
- Click the Security tab and click the Add button.
- In the Add X-Host box type 127.0.0.1 (the name of your
internal IP address) and check the Access Control box.
- Click OK.
- Start SSH Secure Shell but do not actually connect yet. You
need to define a profile as described in SSH
Setup for Windows for a host like u.arizona.edu or
hpc.arizona.edu.
- SSH: under the Profiles pulldown, select Edit.
- SSH: highlight the host profile you have defined and click
the X11 Tunneling tab, and check the Tunnel X11 connections
box.
- SSH: click OK.
- SSH: under the Profiles pulldown again, select the profile
you've just set up, then log in to the system, using your NetID
and password.
- To test it, type xclock at the prompt. A new window
should pop-up.
Problems?
If you have problems X-windowing:
In your SSH Settings
file under Tunneling, Tunnel X11 connections can
and should always be set--whether you are tunneling through SSH
or not.
Verify that you
do not have DISPLAY set in your login or shell
script. This interferes with SSH's tunneling X11 windows. Find
out by entering the commands
env | grep DISPLAY
For SSH to work properly you should be seeing a response like
DISPLAY=localhost:##.0
If the display/application
is painfully slow off-campus because you are tunneling,
try not tunneling.
Do tunnel
- Mathematica and Matlab (software on both
the U-System and Super) display better when tunneled.
Do not tunnel
- Spartan (on Super) displays only when not tunneled.
|