<$BlogRSDURL$>

Wednesday, September 12, 2007

Synergy  

Way back when I started work at the search engine that starts with a G, I tried a number of new programs including Synergy, a program to sync the mouse and keyboard of two computers.

The claimed magic was this: you set your laptop computer next to your desktop computer and plug into your network, take your mouse from your desktop and MOVE THE POINTER OVER ONTO YOUR LAPTOP SCREEN (!) and then just start typing. When you want the keyboard to move back to the desktop, you just move the mouse pointer back and when it leaves one computer screen and reappears on the other, magic, whoosh, you're back in control of your desktop.

Well, that was the claimed magic; it didn't work so well with the versions of Linux and Windows we were using at the time, or perhaps the release of Synergy that existed then is not as good as what exists now. Regardless, I never got it to work then, but a year later, with a new Linux distro and a brand spanking new Mac laptop, I got it running like a charm in just a few minutes.

The kindly folks who run the computers at the search engine that starts with a G preinstall synergy on our Linux desktops, so all that remains to do at work is download a Synergy client like
SynergyOSX or, even better, its recommended replacement SynergyKM, install it, and set up the configuration.

I liked this so much I wanted to try this at home - but there was only one snag. At home I work in primarily PC environment. Yes, yes, I know, I should make better use of my two Macs and my Linux desktop and my Palm Pilot and my Newton and my Apple IIc, but let's stay focused here people on what I do use every day, which is the nice Windows laptop and its big brother desktop with the 24-inch LCD screen.

However, I found on the PC, in some ways Synergy is even simpler except for a typical Windows snag. All you need to do is download one Synergy binary for Windows and install it on both machines. On the server, you get a nice desktop icon for Synergy, and clicking on it gives you the option to listen to another machine's mouse and keyboard or else to share this one's. Clicking on that enables a dialog box where you can list the names of your two machines and set up "links" between screens that the mouse pointer can travel on. (Note: these links did not appear to be symmetrical, so if you specify that your laptop is to the left of your desktop, you actually need to specify the vice versa link as well or your mouse may become trapped after it crosses the border.) On the client you do a similar procedure, specifying what machine name it should listen to as it server.

However, the snag is that these are machine names, not IP addresses. At work the kindly techfolks have set up the whole infrastructure for you to resolve names to IP addresses, which Synergy depends on; at home, on a simple router, you may need to set this up yourself. Trying to specify the IP addresses causes Synergy to throw errors and not work, and ignoring the problem just means your Synergy client won't be able to find your Synergy server.

A simple way around this problem is with a hosts file, which tells Windows how to map names to IP addresses on your local network. This enables you to specify a few lines that say (for example) that the IP address 192.168.1.2 maps to "desktop" and that 192.168.1.3 maps to "laptop". I added a pair of lines to the hosts file on both my desktop and my laptop to make sure both programs could talk to each other (note: all names confabulated to protect my innocent little computers):


192.168.1.3 desktop
192.168.1.4 laptop


This gives Windows enough information to map these names to their IPs. (Note that this assumes your router or cable modem IP assignments are stable; consult your documentation on how to set this up more reliably if you have problems.) With that information, Synergy can decode these names and the client can find the server and vice versa.

And with that, it works. I move my mouse over, stuff changes on my laptop, I move my mouse back, I finish typing this essay. Not even sexay-looking enough to take a screenshot, but radically useful and easy as pie. I wish I'd done it earlier.

-the Centaur

Labels:

Comments:

This page is powered by Blogger. Isn't yours?