Archive

Posts Tagged ‘switch’

Virtual KVM

December 23rd, 2008 6 comments

A while back, a friend of mine asked me to find out for him how much a KVM switch would cost him. I looked around on Newegg a bit, and I found that KVM switches that can handle digital monitors cost upwards of 60 or 70 bucks. Now maybe it’s just me, but paying $60 just so you can switch between two computers on one monitor doesn’t seem worth it to me.

I started Googling things like "virtual kvm" and "software kvm". One search brought me to http://www.avidardik.com/2006/03/28/a-guide-to-building-a-software-kvm-switch/. This was just what I wanted to do. I already knew about VNC for remotely viewing computer screens, but I never thought about writing a script to make the process of switching between the local and remote screens a lot easier. The script on that page is useful but rather limited as it only works with one remote computer, so I set out to write my own. Enter Virtual KVM.

What Virtual KVM does is act as a powerful manager for VNC connections. It gives you the ability to switch between a maximum of 8 remote computer screens via the VNC protocol. The result is a simulation of what a real KVM switch does. Obvious limitations are that you can’t switch audio or USB connections, but at least in my experience those has never been all that necessary.

My first KVM switch was a Belkin one, and the Scroll Lock key was used for switching between computers, so that’s the key I decided to use for Virtual KVM. The Scroll Lock key is used for every hotkey the program currently supports. Scroll Lock+1 always switches back to the local computer. Every other number from 2 to 9 is used to switch to a remote computer. Besides using the number keys, you can also use the left and right arrow keys in combination with the Scroll Lock key to cycle through the computers in order, either in decreasing order (left arrow) or increasing order (right arrow). A final hotkey I added was Scroll Lock+Tab. This will always switch to the last viewed computer. So if you are viewing computer 4, and you switch to computer 2, pressing Scroll Lock+Tab will get you back to computer 4. Pressing it again will return to computer 2. This makes it easy to quickly switch back and forth between two computers without remembering which numbers they are.

What makes Virtual KVM really shine is its management of VNC connections. It allows you to have multiple VNC connections open at once, so after the initial connection period for each computer (typically less than a second), switching between computer screens is almost instantaneous. If you switch to a computer that has not yet been connected, Virtual KVM will automatically attempt to connect to it. If the connection is already open, Virtual KVM simply switches to it. You even get the option of automatically connecting to all the remote computers when the program is started, so you won’t even notice that it had to connect to them. If you desire, you can have Virtual KVM disconnect from a remote computer when you switch away from it, but in general you will want to leave the connections open. If you’re computer can handle it, leaving the connections open makes for very quick switching between computer screens.

After about a month’s worth of coding, debugging, editing, deleting, et cetera, I finally reached the release stage for the first version of the program. I gave it a version number of 0.99 because it was essentially complete for a first version, but I figured that there was probably still a bug or two in there that I would want to fix before I officially declared it Version 1.

Starting with version 0.99.3, all VNC clients are theoretically supported. I have only tested RealVNC and TightVNC so far, but others should work equally well. I do, however, prefer and recommend RealVNC because it supports sending special hotkeys like Win+E (Windows Explorer) to the remote host. Unless I am missing something, TightVNC does not support this feature. One nice feature that TightVNC has and RealVNC lacks, though, is the ability to scale the desktop automatically to fit the local screen.

Version 0.99.5 adds support for 64-bit Windows. Note that the program itself is not 64-bit, but it will run properly on a 64-bit system.

If you find any bugs when you’re using the program, please feel to comment about them on this post or send me an email via the contact page on this blog. If you have any ideas for improvements or features for Virtual KVM, please feel free to let me know as well. I want to make this the best it can be!

When you download the program, you will need to configure it before you can use it. There is currently no GUI to do this, so you will have to manually edit the Settings.ini file. It’s pretty simple, so you should be able to figure it out easily. Instructions are included in the readme.

Virtual KVM comes as a stand alone program, meaning you don’t install it, so it will work fine on a flash drive if you have a need for that. I believe you can get stand alone versions of most VNC viewers as well, so you should be able to set up a complete portable Virtual KVM experience. See the Readme for instructions on how to configure Virtual KVM to use a portable VNC client.

That’s enough talk from me for now. Go try it out! You can download the latest version here: http://www.compeek.net/downloads/virtualkvm_v0.99.3.5.zip (208 KB). Please take a few minutes to read the included Readme.txt file to get a complete explanation of how to use Virtual KVM to it’s full ability. Enjoy!

I have only tested Virtual KVM on Windows XP Professional SP3 x86 and Windows 7 Ultimate RC x64, but it should work on just about any version.