Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical-screen updates back in the other direction, over a network.
With some minor setup, you can use VNC to access your EECS account from your home machine with access to all the software installed on EECS systems and your home directory.
The setup instructions below assume that you are connected to an EECS tech-supported Linux system via SSH. For undergrad users, this means you are connected to “red.eecs.yorku.ca” via SSH. For other users, this means you are connected to “indigo.eecs.yorku.ca”.
The first time you use VNC, you need to setup a password. You will need to enter this password on your PC when you want to access your EECS VNC session remotely.
Use the vncpasswd command to set a VNC password:
% vncpasswd Password: Verify: Would you like to enter a view-only password (y/n)? n A view-only password is not used
As you can see, vncpasswd will ask for a password, then ask you to re-type it to verify it. It also gives you the option of setting a “view only” password which you don't need. The encrypted password will be written to the file ~/.vnc/passwd in your home directory.
You can re-run the vncpasswd command any time you wish to change your VNC password.
Since VNC is an older protocol, it limits maximum password length to 8 characters. Please ensure that you use a secure password, or someone may be able to gain unauthorized access to your account contents.
You will be connecting from your own computer to an application on our server called a “VNC Server”. There will be one VNC Server application running on our server per user that is connecting.
First, check to make sure that you aren't running an existing VNC server using the vncserver command with the list option. If this is the first time you've used VNC, you can skip this step!
Here we can see that an existing VNC server is not running:
% vncserver -list TigerVNC server sessions: X DISPLAY # PROCESS ID
If a VNC server was already running, the output would look like this:
% vncserver -list TigerVNC server sessions: X DISPLAY # PROCESS ID :2 18734
If you want to start a VNC server for your user ID on our server, continue to the next step. If you've already started a VNC server for your user ID on our server, skip to the section https://wiki.eecs.yorku.ca/dept/tdb/login:vnc:start#connecting_to_your_vnc_server.
In order to start the VNC server, run the vncserver command:
red% vncserver New 'red:2 (bob)' desktop is red:2 Starting applications specified in /eecs/home/bob/.vnc/xstartup Log file is /cs/home/bob/.vnc/red:2.log
Here we can see that the VNC server has started on “red:2”. The “red” part is because the server is running on “red.eecs.yorku.ca”. The “:2” part is the VNC server port. You will need both the hostname and port number when connecting to the VNC server from your computer in the next step.
IMPORTANT NOTE: By default, the VNC sessions start with screen resolution of 1024×768. If you want a larger screen resolution (eg. 1920×1080), then you need to pass this to the vncserver command like this: vncserver -geometry 1920×1080. Note that the larger the screen resolution, the slower the session will be because more data needs to be sent back and forth over your network connection.
Now that you've started a VNC server process on the time sharing server, it's time to connect to it from your local computer. See the section “VNC Clients” for recommendations on VNC clients for a variety of platforms.
For the purposes of this example, I will assume Mobaxterm running on a Windows system. Follow the following procedure to connect to your VNC session:
If you don't take steps to stop a running VNC server, it will continue to run when you logout. This might seem useful to you because all your applications will continue to run. This does, however, pose two major problems:
1) The time sharing servers have limited resources available. If everyone were to run a VNC server and keep it running with all the software they are running all the time, our server will run out of memory, and CPU power. It will operate slowly for everyone, and provide a poor user experience. 2) If you leave a VNC session running, you provide a mechanism for outside users to access your account.
PLEASE make sure that you explicitly stop any running VNC server when your session is done. Stopping the VNC server is actually very easy. There are two ways to do it:
Users who consistently abuse the system by leaving VNC sessions open that they are not actively using may have their account locked without notice.
VNC clients are available for a variety of platforms.