Setting up VNC on the UNM CS Machines

This will help you set up vnc for the cs machines for UNM.

Obviously, if you're not a computer science student at UNM, this will not be very interesting to you. However, since I have been asked this question on multiple occasions, I figured it would be good to get the process documented and easily accessible.

Here goes:

Log into your CS account.

Run this command:

touch ~/.vnc/xstartup

Throw this into that file with your favorite text editor:


# Uncomment the following two lines for normal desktop:
# exec /etc/X11/xinit/xinitrc
gnome-session --session=gnome-classic &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 1920x1080 -ls -title "$VNCDESKTOP Desktop" &

x-window-manager &

Run this command to create a vnc password (cannot be longer than six characters):


Go ahead and create a file to start VNC:

touch ~/startVNC.bash

Open the file with your text editor of choice and populate that file with this:


vncserver -geometry 1920x1080

Start the server and get it listening on a port by running that script:

bash ~/startVNC.bash

You will see a message like this:

New 'X' desktop is

This means that you will want to connect to that computer using your vnc viewer on port 5901. This can change, and you need to be aware of that when you're connecting using your VNC client.

*Note that you will need to be VPNed in to access this machine remotely, unless you're on CS-WIRELESS.

To set up VPN on a mac, you'll want to do the following:

  1. Open Network Preferences from Spotlight
  2. Click the plus sign to create a new network interface
  3. Select VPN, specify PPTP for VPN type and name the service whatever you want
  4. Set the following options:
    Server Address:
    Account name: Your CS account name
    Encryption: Automatic (128 bit or 40 bit)
    Click Authentication Settings, and type your Password for your CS account.
  5. Click connect

Once you're VPNed in, or you're on CS-WIRELESS, use a vnc viewer client to connect. If you're on a mac, use Screen Sharing like so:


*Note if you're on Yosemite, you'll find it in here:

That should do it.