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:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
gnome-session --session=gnome-classic &
gnome-panel&
[ -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):
vncpasswd
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:
#!/bin/bash
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 computername.cs.unm.edu:1
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:
- Open Network Preferences from Spotlight
- Click the plus sign to create a new network interface
- Select VPN, specify PPTP for VPN type and name the service whatever you want
- Set the following options: Server Address: vpn.cs.unm.edu Account name: Your CS account name Encryption: Automatic (128 bit or 40 bit) Click Authentication Settings, and type your Password for your CS account.
- 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:
vnc://cs_computer_name.cs.unm.edu:5901
*Note if you’re on Yosemite, you’ll find it in here: /System/Library/CoreServices/Applications
That should do it.