Friday 5 January 2007

Side-by-side computers with one keyboard and mouse

Do you have two machines sat next to each other, but no space for two keyboards? Even if you do have space, it's really annoying having to swap between them: here's a way to avoid that, without using a KVM or any other hardware except the network.

At work I use dual monitors, which after a little adjustment, I'm getting on very well with. I also have a laptop, which gets used intermittently before and after I travel, and as a scratch box for trying out new systems and so on. Previously, when it was running Windows, I would use Remote Desktop to access it via my desktop's keyboard, mouse and monitor, and leave it closed on the desk.

Recently, however, I've set it up to dual-boot into Linux. Rather than using VNC, I wanted to use the monitor on the laptop as well, but with the keyboard and mouse from the desktop -- in the same way as my existing dual monitor setup works, except that now there are two different hosts involved.

This turns out to be remarkably easy. On the Windows desktop side, there is a cool piece of software called Win2VNC, which sets up your machine so that you can move the mouse cursor off one side of the screen, and it will start accessing a remote machine via VNC. Unlike most VNC viewers it doesn't display anything, it only handles the input side.

(The link above is to a modified version of Win2VNC. The original version is here, but that version has difficulty with multiple-monitor setups, and gets confused about which window you are going off the side of).

On the Linux side, I used VNC version 4 (Debian package vnc4server). The Win2VNC page suggests x0rfbserver, but that appears no longer to exist, and has been removed from Debian now. The vnc 4 package has subsumed it in the form of the x0vnc4server command, which runs (like WinVNC) on the existing display, rather than starting a new one.

So far, it's working pretty well. There is still the occasional problem with losing the mouse cursor, but usually slowing down, and carefully swapping between screens and back will resurrect it.

And it's a great way to show off.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.