Virtual Network Computing (VNC) allows you to access and control a graphical desktop running on one machine from another. This permits you to seamlessly use a desktop environment and graphical applications while not having to sit infront of the physical keyboard / mouse attached to a computer.
This can also be accomplished via ssh, as most ssh servers have this enabled by default, you merely need to specify "-X" or "-Y" to ssh when connecting and then run your graphical application. Comparilively, VNC is nowhere near as secure and takes a few steps to setup, but is greatly faster (afterall over ssh, every single draw command needs to be sent over an encrypted connection) and allows you to run and view a full desktop environment as opposed to just individual applications.
VNC is relatively easy to setup, albeit with a few caveats, as described below:
(edit 07/07/09, a few things changed w/ the vnc-server shipped with Fedora 11, see my note at the end of this post)
- Install it: "yum install vnc-server"
- Edit /etc/sysconfig/vncservers, and add the following two lines:
VNCSERVERARGS="-geometry 1024x768 -nohttpd "
Replacing username with a valid user that can log into the system. Also specify any screen resolution supported by X on your system. The '-AlwaysShared' flag can be specifed to permit sharing the vnc connection among multiple clients. Finally you can add as many servers as you want here, each with its own options. (07/07/09 see note below)
- As the aformentioned user run the 'vncpasswd' command and provide a password. You will be prompted for this when you connect to the vncserver
- Open the necessary port(s) for remote access. Accomplished via 'system-config-firewall' (or 'system-config-firewall-tui' for the text / ncurses version), open up the port corresponding to each server you create. By default this port is 5900 + the server number, for example 5902 for the server configured in step 2 above. You can override this with the "-rfport" option in the aformentioned server options.
- Edit the aformentioned user's ~/.vnc/xstartup config file to launch the desired desktop environment and/or window manager upon server instantiation. By default, a barebone 'Tabbed Window Manager (twm)' is launched, and most likely you will want gnome, kde, or something else. Simply comment out the last line, "#twm &"; and uncomment the two which you are directed to uncomment in the file itself, eg. 'unset SESSION_MANAGER and ' 'exec /etc/X11/xinit/xinitrc'. This will launch the desktop env / window manager configured as default systemwide.(07/07/09 see note below)
- Make sure vnc as part of / launched by xinet.d is disabled, else you will get "A vnc server is already running as :2". This can be accomplished by editing /etc/xinet.d/vncts and setting all 'disable' options to 'yes'. You will need to restart xinetd by running 'service xinetd restart'
- Finally start the vncserver by running 'service vncserver start'
Now you should be able to connect to it on another machine by installing the client package 'yum install vnc' and executing it via 'vncviewer server:2' (which will prompt you for the aforementioned password).
And whala! Remote graphical access!
[Update 07/07/09: If running F11 or later, make the following changes to the process above:
- in step 2 above, the "-nohttpd" option is no longer supported and the vnc service will fail to start if present
- step 5 above is no longer needed, vnc will default to the window manager you normally use]
So not too long ago I wrote and committed some Selenium tests for oVirt which can be found here and wrote some info up on the topic, here. I've since recieved a few emails asking about the topic so I figure I'd share some introductory points.
The whole time I was in school I figured that once I was done, I would have a ton of time, you know no hw / projects and everything. But ever since finishing my Masters degree last spring I've been busier than ever. Between work (professionally and on my own stuff), and family / friends my schedule is booked. Regardless, I've managed to fit a few interesting things into the queue.
First off, and perhaps most exiting, I've taken some time off Thanksgiving week and will be visiting my good friend Dave out the Californee Way. Dave and I worked on alot of projects during our undergrad together at SU, including the VLSI final project (aka the journey through hell) and our senior design project. He is currently living and working in San Jose, and we're planning on seeing some sights in central california, specifically the San Francisco area when I visit. Of course, no trip is complete w/out blog updates and plenty of pictures, for which I've bought my first digital camera, the Cannon Powershot SD1100 and have been getting aquanted with it over the last week (review and picture album coming in the near future).
As far as other items of interest, I started reading Cryptonomicon by Neal Stevenson (author of one of my all time favorite books Snow Crash) which is perhaps one of the biggest books I've read so far (in terms of number of pages and complexity). Looking forward to continue reading about it and sharing my thoughts here.
Finally I've also started drawing over the past month, and while I'm no Da Vinci, I've noticed a steady improvement in my artwork, especially with the help of the begginers classic Fun with a Pencil by Andrew Loomis. As I get better, I will upload some works to my soon-to-be-created picture album and write up a concise tutorial on some techniques I've learned so far.
Anyways thats about it, be sure to check back soon for updates!