VNC Tutorial for ECE Linux Machines
VNC is a remote desktop environment that allows you to
work remotely, and which preserves your applications if
the connection breaks (it often does).
Creating a VNC session
-
ssh into one of the lab machines.
-
After logging in with your username and
password, the command prompt should look like
the picture below.
-
Run the following command to start a VNC
session:
> vncserver -geometry
1080x720
The -geometry option sets the screen resolution of the
created desktop; you can change this to a more
convenient setting or omit it altogether.
-
The command returns a message like shown
below. Pay attention to the session
number following the hostname (marked in
the image below), you will need this later.
-
If this is your first time using VNC,
you need to set a password for your VNC
sessions:
> vncpasswd
This password will be used for all future VNC
sessions until you run vncpasswd again.
Accessing a VNC session
-
[Note: apparently Tigervnc is better to use.
Instructions are on the ECE VNC web page.]
Download and install VNC
Viewer for your operating system.
-
Run VNC Viewer and type in the host address and
session number of your VNC session, as shown
below.
-
Enter the VNC password you created earlier.
-
Your remote desktop should now be visible, and
you can interact with the graphic interface as
if you were sitting in front of the machine in
the lab.
Keep reading, you are not done!
If you use VNC often, there will inevitably be times
that the network connection breaks - you may see
messages like "software caused connection abort" or
"broken write pipe." Don't panic - just run VNC Viewer
again with the same session details. All your work will
be there right where you left off.
Of course, there are rare cases where the host
machine crashes or needs to reboot. In this case, any
work open in your VNC session is not saved. For this
reason, you should not leave work sitting in a VNC
session longer than necessary.
Keep reading, you are not done!
Closing a VNC session
For security reasons, it is a good idea to end your VNC
session when you are done working. After saving all
work and closing all programs on your remote desktop,
ssh back into the machine hosting your VNC session, and
type the following command:
> vncserver -kill
:<session number>
Make sure the message says your session was terminated
successfully.
2014/10/13 Written by Tim Andreas