This step-by-step tutorial explains how you can remotely start a VNC session on an LRC Unix machine from your Windows machine. VNC allows you to view the desktop GUI of a remote Unix machine.
Make sure you have a VNC client installed. One of the simplest and best options is the Real VNC Enterprise Edition Stand-alone Viewer, which you can download for free here.
Download the Putty executable from here.
The ECE department has 7 machines that can be used for remotely logging in. Pick one of the following:
In Putty, enter
YOUR_ECE_LOGIN@MACHINE_NAME.ece.utexas.eduin the Host Name field, and choose SSH as the Connection Type.
In Putty, on the category option tree on the left, choose Connection->SSH->Tunnels.
Pick a two digit number, XX. Note, this number must be unique. You will find out later if someone else has already chosen your number.
In the Source Port field, enter 59XX.
localhost:59XXinto the Destination field.
Click on the Add button.
Go back to the main Putty page by selecting Session on the category option tree on the left.
Under Saved Sessions, enter a name like "ece_vnc" for these settings, and click Save.
Click on the Open button, enter your ECE Unix password when prompted, and you'll get a terminal on the remote Unix machine.
ONLY do the following in your Putty terminal the FIRST TIME to configure your VNC server:
Make the VNC configuration directory by running the following:
Create and edit the file .vnc/xstartup to contain:
#!/bin/sh vncconfig -iconic & unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey #vncconfig -iconic & xterm -geometry 80x50-50+150 -ls -title "$VNCDESKTOP Desktop" & twm &
Make the xstartup file executable by running
chmod 700 xstartupin the .vnc directory.
Choose a password you will use to connect to your VNC desktop by executing the following:
In your Putty terminal, start the VNC server session on the remote Unix machine with whatever resolution you desire with the following command:
vncserver :XX -geometry 1024x768
Here, you may find out that someone else has already chosen your number. You can try other numbers here until you find one that works. Once you do, exit Putty. Start Putty again, load the "ece_vnc" Putty session you saved, and update the numbers in the appropriate places as specified above. You do not need to modify the VNC configurations you made on the remote Unix machine. Be sure to reconnect your Putty terminal to the remote Unix machine before proceeding.
The VNC server session will remain active on the remote Unix machine even if you close Putty and shutdown your Windows machine. It may deactivate if an administrator reboots the Unix machine or decides to kill your VNC server session. You can kill the VNC server session manually with the following:
vncserver -kill :XX
While your Putty terminal is still connected to the remote Unix machine, start the VNC client software you downloaded and installed on your Windows machine. In the VNC Server field, enter:
localhost:XXClick connect. Leave username blank. In the password field, enter the password you chose above to connect to your VNC desktop. Don't forget your password.
It is extremely advisable to save your files before ending your VNC session. You could lose data in the unlikely event that the remote machine goes offline.
With VNC, you can now easily develop and test your Programming Lab Assignments in the Unix environment remotely. The default text editor, gedit, is easy to pick up and supports syntax highlighting for the C programming language (and many others). Get started with gcc here, and take a look at the labs page for other useful Unix links, such as getting started with the command line debugger for gcc, GDB.