Running X window on Microsoft Windows using VNC
UNIX applications with a graphical user-interface require the use of X-windows or other remote display software when connecting from a remote location. VNC on Windows systems is currently supported.
Using VNC on Windows
VNC is freely available software that supports remote display on a variety of computer platforms. The University maintains the necessary server application for use with Stanford UNIX hosts, but users must download and install the VNC Free Edition Viewer for Windows, available online at the RealVNC website. Please note that personal details are requested, but not required, for download.
- Step 1 : Connect to a UNIX host using a (secure) terminal emulator like SecureCRT, available online.
- Step 2 : If VNC has not been used before a password must be created to
control access to the remote display. First, create the VNC application
directory if it does not already exist:
mkdir ~/.vnc
Then, set the password using the vncpasswd command; this password is not very secure, so it should not be the same as any password associated with a NMSU ID.- Step 3 : Once a password has been set, launch the VNC server application using the vncserver
command. Depending upon how many remote displays are already present on
the current system, several warning messages may be displayed before
vncserver reports that it has created a new X11 desktop; take note of
the host name and display number so reported:
New 'X' desktop is xyz.nmsu.edu:3 - Step 4 : Set the DISPLAY environment variable to reflect the new display using the following command:
setenv DISPLAY localhost:n
n should be replaced with the number of the display reported by vncserver. - Step 5 : Launch the VNC Viewer application on the local computer.
VNC Viewer will display a dialog box requesting the server to which the viewer should connect. Enter the host name and display number as they appeared in the notification message displayed by vncserver.
Provide a VNC password when required.
- Step 6 : A window should open displaying the remote desktop. Remote applications with a graphical user-interface will automatically use this window for local display.
- Step 7 : To end the remote display session, quit all running applications
and close the VNC Viewer application. Then, terminate the vncserver
application using the following command:
vncserver -kill :n
n should be replaced with the number of the display originally reported by vncserver. Finally, type exit to end the remote terminal session and quit the terminal emulator.
Please note that when using VNC software it is advisable to use the original terminal session to launch other applications or issue shell commands. If the session is idle for an extended period of time the remote host may automatically disconnect, causing the vncserver process and other running applications to quit unexpectedly.
References: http://unixdocs.stanford.edu/moreX.html