HPC/Network Access/Virtual Desktop: Difference between revisions
< HPC | Network Access
Jump to navigation
Jump to search
m (Created page with "== Introduction == [http://en.wikipedia.org/wiki/VNC VNC] is a multi-platform graphical remote access mechanism. It is not as common as the [http://en.wikipedia.org/wiki/X_Window…") |
m (→Introduction) |
||
Line 4: | Line 4: | ||
If you find that remote use over X11 is too slow, try VNC. | If you find that remote use over X11 is too slow, try VNC. | ||
== Principle of operation == | |||
* Start a VNC server on a Carbon node. This is an application that will run in the background and provide a virtual desktop. | |||
* Modify your SSH connection to forward an appropriate port. | |||
* Run a VNC client on your desktop machine and tell it to connect to the forwarded port. This will show the virtual desktop as a window on your actual desktop. | |||
* You can stop the VNC client and reconnect later. | |||
* When done, kill the VNC server process on Carbon. | |||
* http://www.cl.cam.ac.uk/research/dtg/attarchive/vnc/sshvnc.html | === VNC server startup === | ||
* [[https://wiki.anl.gov/cnm/HPC/Network_Access Log in to Carbon]] as documented. | |||
* On the clogin prompt (showing login5 or login6), enter: | |||
vncserver | |||
* You may be asked for a password which will control access to a virtual desktop session. Choose and remember a password of good strength, but '''not your login password'''. The VNC password mechanism is weak; think of it as an office door to shut, keeping out unwanted guests. | |||
* To reset your password at any time, run: | |||
vncpasswd | |||
* Note the output of the vncserver command: | |||
New 'login5:1 (stern)' desktop is login5<font color="teal">''':1'''</font> | |||
Starting applications specified in /home/stern/.vnc/xstartup | |||
Log file is /home/stern/.vnc/login5:1.log | |||
The number after the <code>:</code> is the <font color="teal">''display number''</font> of your virtual desktop. | |||
=== Forward SSH ports === | |||
Forward a (TCP) port from your machine to the same port on the Carbon login node. How to do that depends on the SSH program you use. | |||
; For Linux and Mac: | |||
* Press <code><Enter>~C</code> (three keys in succession: Enter, tilde, capital C). You should get a prompt like this: | |||
ssh> | |||
* At the prompt, enter: | |||
-L ''port'':localhost:''port'' | |||
: where <code>''port''</code> = 5900 + <font color="teal">displaynumber</font> from above, for example: | |||
ssh> -L <font color="teal">'''5901'''</font>:localhost:<font color="teal">'''5901'''</font> | |||
Forwarding port. | |||
* Press <code><Enter></code> to regain your regular prompt. | |||
; For PuTTY on Windows: TBD | |||
=== VNC server teardown === | |||
vncserver -kill :''displaynumber'' | |||
<!-- http://www.cl.cam.ac.uk/research/dtg/attarchive/vnc/sshvnc.html --> |
Revision as of 00:16, October 5, 2012
Introduction
VNC is a multi-platform graphical remote access mechanism. It is not as common as the X Window System but is more light-weight on the user side and over the network. If you find that remote use over X11 is too slow, try VNC.
Principle of operation
- Start a VNC server on a Carbon node. This is an application that will run in the background and provide a virtual desktop.
- Modify your SSH connection to forward an appropriate port.
- Run a VNC client on your desktop machine and tell it to connect to the forwarded port. This will show the virtual desktop as a window on your actual desktop.
- You can stop the VNC client and reconnect later.
- When done, kill the VNC server process on Carbon.
VNC server startup
- [Log in to Carbon] as documented.
- On the clogin prompt (showing login5 or login6), enter:
vncserver
- You may be asked for a password which will control access to a virtual desktop session. Choose and remember a password of good strength, but not your login password. The VNC password mechanism is weak; think of it as an office door to shut, keeping out unwanted guests.
- To reset your password at any time, run:
vncpasswd
- Note the output of the vncserver command:
New 'login5:1 (stern)' desktop is login5:1 Starting applications specified in /home/stern/.vnc/xstartup Log file is /home/stern/.vnc/login5:1.log
The number after the :
is the display number of your virtual desktop.
Forward SSH ports
Forward a (TCP) port from your machine to the same port on the Carbon login node. How to do that depends on the SSH program you use.
- For Linux and Mac
- Press
<Enter>~C
(three keys in succession: Enter, tilde, capital C). You should get a prompt like this:
ssh>
- At the prompt, enter:
-L port:localhost:port
- where
port
= 5900 + displaynumber from above, for example:
ssh> -L 5901:localhost:5901 Forwarding port.
- Press
<Enter>
to regain your regular prompt.
- For PuTTY on Windows
- TBD
VNC server teardown
vncserver -kill :displaynumber