I have a large number of computers. At my desk at home, I have two computers, Lumiere and Samus. I’ll often set up my office laptop, Rommie, on my desk as well.
I have a KVM hooked up between Lumiere and Samus, but I don’t use the video switching part as Lumiere has a dedicated 24″ LCD and Samus has a dedicated 24″ and 19″ LCDs. So, I use the KVM to do nothing more than switch the keyboard and mouse back and forth.
Things get more complicated with the addition of the laptop. Now I have another keyboard and a trackpad instead of another mouse. Thus, I’m always switching the KVM over between the two systems as well as moving my hand from the keyboard and mouse to the laptop and back again. There has to be a better way. Fortunately, there is.
Synergize Your Computers
Synergy is the solution for sharing a single keyboard and mouse with multiple computers. My three LCDs monitors and laptop form a diamond arrangement of four screens. With Synergy, I can quickly shift the focus from one machine to another simply by moving my mouse to a specific screen. When a system has mouse focus, it also receives input from the keyboard.
This alone makes Synergy an amazing tool, but that’s only the beginning. Synergy doesn’t care what operating system your computers have, so you can share your mouse and keyboard between multiple flavors of Linux, Windows, and Mac at the same time.
Synergy isn’t limited to just sharing the keyboard and mouse however. It can also share the clipboards. Copy something in Windows and paste it in Linux. Synergy can also sync all the systems’ screensavers so that a screen that has been idle doesn’t go to screensaver mode. If you have a password protecting access to your desktop when you go to disable the screensaver, Synergy can have that one login deactivate all the screensavers rather than just the one.
Since I’m running two Linux systems these days, Lumiere and Rommie, I wanted to test the middle-click function to paste highlighted text. I highlighted some text on Lumiere, moved the mouse to Rommie, and middle-clicked. Just as if it was the same system, the highlighted text was pasted on the other system. I thought this was great, so I decided to test it from Linux to Windows and Windows to Linux. Unfortunately, neither of these worked, which is to be expected since Windows has no support for this type of functionality.
Synergy also has a great ability to customize its functionality. I configured Synergy to send all media and volume key presses to Samus. This way I can play, pause, mute, and change volume no matter what system I’m controlling.
For an example of using it to control my machines, here’s a quick video I did. The entire time, I’m using the same keyboard and mouse to control each system.
The Samus wallpaper I’m using is artwork done by Ivan Flores. I’ve had the privilege of meeting Ivan a number of times at different cons and have some great art to show for it.
Configuration
The key to this is the synergy.conf
file. Here’s mine:
section: screens Lumiere: rommie: Samus: end section: links Lumiere: down(50,100) = rommie(1,50) right = Samus(43,100) rommie: up(0,50) = Lumiere(50,100) up(50,100) = Samus(0,50) Samus: left(43,100) = Lumiere down(0,50) = rommie(50,100) end section: options screenSaverSync = false keystroke(AudioPlay) = keystroke(AudioPlay,Samus) keystroke(AudioMute) = keystroke(AudioMute,Samus) keystroke(AudioDown) = keystroke(AudioDown,Samus) keystroke(AudioUp) = keystroke(AudioUp,Samus) end
Notice how I’ve set up portions of the screen to switch from one screen to another. This is due to the diamond arrangement of my screens. I’ve also disabled the screen saver sync since I don’t use screensavers and wanted to ensure that no problems would occur.
Getting Synergized
So, how can you get Synergy for yourself?
Installing Synergy on my Ubuntu systems was extremely easy. I simply loaded up a terminal and ran:
[gaarai@home ~]$ sudo apt-get install synergy quicksynergy
This installed Synergy and the helpful QuickSynergy which makes setting up Synergy a breeze.
To install Synergy on my Windows Vista system, I downloaded and ran the installer from the Latest Releases. QuickSynergy isn’t needed for Windows since the Windows release comes with a GUI interface. In fact, there isn’t a Windows release of QuickSynergy.
I decided to use my primary home Ubuntu box, Lumiere, as my Synergy server. I ran QuickSynergy (Applications > Accessories > QuickSynergy). I then filled in Samus in the right spot and rommie on the bottom spot. These names match the hostname of each computer. In Ubuntu, you can find the hostname by running hostname
in terminal. In Windows, you can find the hostname by right-clicking Computer, clicking Properties, and looking at the “Computer name:” listing.
After setting this up on Lumiere, I clicked the “Start” button.
Next I went to each of the other two machines, loaded up Synergy/QuickSynergy, made sure that I was in “Use” mode, input the IP address for the server, and clicked “Start”. Everything looks good, but it could use some tweaking.
FYI: Here’s how you find a system’s network IP to use as the server IP. An example for a *nix system is shown below. Simply run ifconfig
and look for the IP address listed after inet addr:
. In Windows, click Start, click Run, type cmd
, click “OK”, type ipconfig
, press the Enter key, and look for a listing after IPv4 Address
.
[gaarai@home ~]$ ifconfig eth0 Link encap:Ethernet HWaddr 6c:f0:49:5d:f9:94 inet addr:10.0.5.10 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::6ef0:49ff:fe5d:f994/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1202574 errors:0 dropped:0 overruns:0 frame:0 TX packets:791119 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1121271145 (1.1 GB) TX bytes:118165456 (118.1 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:59646 errors:0 dropped:0 overruns:0 frame:0 TX packets:59646 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11245335 (11.2 MB) TX bytes:11245335 (11.2 MB) [gaarai@home ~]$
Once you’ve run QuickSynergy on the server, you can close it out and will find a file at ~/.quicksynergy/synergy.conf
. This is the configuration file generated by QuickSynergy. I copied this file from ~/.quicksynergy/synergy.conf to ~/.synergy.conf
. This way my settings file won’t be rewritten if I accidentally run QuickSynergy later.
After you make the necessary changes, you can run Synergy again by running the following in terminal:
[gaarai@home ~]$ synergys -f --config ~/.synergy.conf --daemon [gaarai@home ~]$
This runs Synergy in the background. To stop Synergy in order to change a config, run the following in terminal:
[gaarai@home ~]$ killall synergys [gaarai@home ~]$
Automatically Run Synergy
After I got Synergy configured the way I wanted, I made sure that it would automatically start each time I logged in. I did this by adding the command line to run Synergy to Sessions:
- Click System > Preferences > Sessions
- Click Add
- Example settings:
- Name:
Synergy Server
- Command:
synergys -f --config ~/.synergy.conf --daemon
- Comment:
Start Synergy server on login.
- Name:
- Click Add
In a similar fashion, a client on Ubuntu can be set to automatically run upon login.
- Click System > Preferences > Sessions
- Click Add
- Example settings:
- Name:
Synergy Client
- Command:
synergyc --daemon 192.168.1.4
- Comment:
Start Synergy client on login.
- Name:
- Click Add
Setting up Windows to autoload is quite easy as you can just use the “AutoStart…” button to configure how you want it to automatically run.
Now it’s just time to tailor your setup to match exactly what you are looking for. You can find setup options on the Synergy site.
Have fun.
Did I help you?
that’s pretty friggin awesome. If I had a place to set up my lappy next to my desktop, I’d totally check that out. Either way, its definitely something for the future.
LOL… Hey Suite D. Good to see you. You know you want to be cool like me and get with the Synergy. 🙂
Sweet! Thanks a LOT. I was about to buy another video card for my computer so I could have dual monitors, but this is better 😀 Now I can can do more stuff without overloading my computer, and have linux on one and windows on the other.
Thank You. 🙂
great tip–especially since synergys runs on windows and linux
I’d like to be able to have the synergyc client start up at boot, not login. Have followed all the instructions I can find, they all refer to auto start up at login. That always means I have to use the keyboard attached to that computer to login, then the synergyc client starts working.
Is it possible to get it to work so I don’t have to use that other keyboard for logging in?
Am I missing something?
Thanks,
GCG.
I’ve looked for such a solution as well, but I’ve never found anything that worked. I found many posts talking about adding commands to various gnome init scripts, but none of them worked.
I understand your need to have such a solution as I too would like to have it. Unfortunately, I don’t have a solution for you.
I found a solution that I’ve got working at this website: http://tacticalcoder.com/blog/2009/05/using-synergy-software-kvm-with-osx-and-linux/
Seems to be working well!
Good luck
GCG.
Thanks for sharing the link. I’ll have to check it out.