Virtual Network Connection (VNC)

Summary

Article show the use of VNC on our research environment.

Body

What is VNC?

Virtual Network Computing, VNC, is a graphical desktop-sharing system. At SDSU, many research computing systems support VNC, allowing users to connect to a graphical desktop session in addition to command line access via SSH.

Prerequisites

First, you will need to log in to the remote server via SSH using a terminal program such as PuTTY or MobaXterm. If you have not done this already, or are not sure how, please visit this guide first.

You will also need a VNC client such as VNC Viewer. You can download VNC Viewer here..

Create a VNC Session

There are several VNC-related commands that are most helpful:

vncserver - this command creates a new VNC session on the server.  Using the -geometry option allows you to set the resolution of the VNC window.  Ex. vncserver -geometry 1600x1200
vncserver -list  - This command, with the -list switch, provides a list of currently running VNC sessions for your user account.
vncserver -kill :1  - This command will kill VNC session 1 assigned to your username (change this as applicable to your session).
vncpasswd - This command will allow you to reset the password for your VNC sessions.

If this is the first time you've created a VNC session, enter the command vncserver to generate a VNC session. You will be asked to provide a password for your VNC session. It can be the same one as your Linux account password if you prefer, but it doesn't have to be.

Select no when asked to enter a view-only password.

Your session number will be listed next. It can also be retrieved by entering vncserver -list.

Next, open up VNC Viewer. In the top bar, enter the server you'd like to connect to with the session number typed directly after it. In this case, we created session number 1, and we are connecting to Prairie Thunder (PT).

VNC Viewer will ask you for your VNC password. Enter it and hit OK.

A password being entered into a VNC Viewer prompt.

You may be presented with a prompt about encryption. Click Continue and check the box for 'Don't warn me about this again'.

Once that is done, your graphical desktop session will be available for you to use.

A Linux virtual desktop.

Considerations

You may leave programs running, browser tabs open, etc within your VNC session. They will continue to run within your VNC session if you close out of the SSH session with the server or close your VNC Viewer program. You just need to remember to connect to the same session number that corresponds to your existing desktop when you log back in. This information can be saved in VNC Viewer if you prefer, or can be retrieved with the vncserver -list command when you log in via SSH.

Details

Details

Article ID: 135679
Created
Fri 12/3/21 1:50 PM
Modified
Mon 2/27/23 12:00 PM