Sunday, August 2, 2009

VNC on the USB

Remote Access via the USB Stick

Last week while cleaning out the storage device i ran across an old vnc program. I had used this in class some years ago to connect to the Linux server i was running in my office. It got me thinking about adding VNC capabilities to the USB stick.

There is no listed VNC downloadable application at http://portableapps.com/apps but you can add non-installable programs to the environment. For example, I setup winamp for an internet radio on a usb stick demo some terms ago.

So off we go to http://www.tightvnc.com/ to grab the latest version of the viewer which is tightvnc-1.3.10_x86_viewer.zip from which we extract vncviewer.exe

Next we create a file folder called vnc in the /PortableApps folder on the USB stick and copy vncviewer.exe to that folder. From the Portable Apps menu we select Options, Refresh App Icons and the menu item TightVNC Win32 Viewer is added. You can do this for most applications that do not install but you have to create a folder for them else portable apps will not create a menu item.

VNC Server

The next step is to set up the VNC server. Since our portable server is a mac mini running osx server it already has a VNC server, we just have to turn it on. So over to the mac and select System Preferences, Sharing. We place a checkmark in the Screen Sharing box and set a password for the VNC viewer. This is for version 10.5, which has made some changes from the setup used in 10.4 but instructions for 10.4 can be found at http://www.dssw.co.uk/blog/2007/05/14/a-vnc-server-is-included-in-mac-os-x-104/.

Connecting

Backto the USB stick we run VNC viewer and enter the IP address of the osx server.

It makes the connection and the password box is shown. If we had not specified a password in the VNC server setup for osx then any vnc client could connect to and administer the osx server! We enter the password and the mac osx server desktop is displayed. Everything works but of course the screen refreshes are a bit slow as is usual with vnc. The idea behind this is to create a portable server that can be taken to class and used to demonstrate various technologies. The reasons behind this approach are:

- corporate IT is against users running servers from their offices
- if they install a server it is so locked down that students do not learn necessary skills
- most IT depts are windows-centric in a world where windows is rapidly becoming irrelvant

Why mac?

So why is the server running mac osx? Well, their are a number of reasons that make this the best choice for a portable server. Here are the criteria i developed:

- portability: the server must be portable which means light and small
- open source: the server must run common standard open source technologies such as perl, php, apache, ruby, mail, mysql etc.
- GUI: the server must have a gui interface for easy of use in a classroom. Doing lots of typing is a sure way to lose the interest of the students in a class....

So what are the options? The first choice would be a laptop and there are some nice laptops (i own 4) but all have compromises or limitations. My best laptop runs Ubuntu 9 and can be a portable server, in fact it runs a number of useful things as virtualbox vm's (windows, ubuntu server 9 with joomla, mac) but it is too heavy for lugging about. The 11" laptop is not quite light and portable but the battery last for less than 2 hours which makes it rather non-portable for class use. I am toying with the idea of making it into a full ubuntu server. The problem with ubuntu server is that there is no gui. I tried a long time ago (ver 6, 7?) to install the server and then install the desktop but it was a failure. May try again.

One neat possibility is the netbook which is a 2 gig DT atom 1.66 with 64 gig ssd with a battery life of 3.5 hours. This is running the dell netbook version of ubuntu (8). I'm thinking of moving this to the ubuntu netbook version of 9 to fix some issues (samba) that are needed. Right now it has Xampp running but it is a pain to maintain/administer due to it being installed in /opt instead of the user's home directory. This means you have to sudo everything when you want to do stuff - an unecessary annoyance, IMHO. It would be easier if it ran under the user account.

We could use the mac laptop but the consumer laptops cannot run osx server and also use desktop apps like iLife. The solution would be to put osx server on a portable drive and choose to boot from that. I may look at the macbook pro this fall.

Anyway the mac mini is small, runs standard os software with a nice gui on top and does all we want. What's not to like?

time for some lunch

No comments: