synergy: sharing the keyboard and mouse
January 16th, 2008 edited by TinchoArticle submitted by Carles Pina from Catux-LUG. And guess what? We still need you to submit good articles about software you like!
There are many occasions at which a user needs to use two computers at the same time, even with two different operating systems, all in the same desktop. One of the most annoying things that might happen is that you will need to use a different set of keyboard and mouse for each computer with the resulting waste of space on your table.
One of the first solutions that firstly came to mind was to use only one set of keyboard and mouse to access the other computer through some kind of terminal software such as VNC, ssh, FreeNX,… but, sometimes we would prefer to really use the other computer, providing us with access to two real screens (very comfortable), for graphical design tasks, games, closer feeling to the user interface, etc. This is the case we are going to talk about.
What is synergy?
Synergy is a multi-platform client-server program designed to share the same keyboard and mouse for different computers connected by network.
How do yo use it? (in other words, how to change from one computer to the other): The basic usage consists of just moving the mouse pointer from one screen to another, though it also includes some kind of protection for those cases when the pointer is at the corner of the screen for other purposes like closing a window using the x at the top-right. Nevertheless, the option to configure a keyboard shortcut to move between screens is given.
Configuration
The configuration is pretty straightforward: you need to define the screens’ layout (which screen is situated on the right, left, top, bottom).
For example, if we had two computers, one called “desktop” and the other one “laptop”, and we wanted to use the keyboard from desktop (then desktop will act as the server), we need to write the following configuration file in /etc/synergy.conf
, or any location if we started synergys with the --config PATH_TO_CONFIG flag.
section: screens desktop: laptop: end section: links desktop: right = laptop laptop: left = desktop end
Computer names are the same name the hostname
command reports.
Then, in the computer that acts as server we will execute, to read the configuration from /etc
:
$ synergys
Or, to read the config from our home directory:
$ synergys --config ~/.synergy.conf
And then, in each client computer:
$ synergyc SERVER_IP
If we have problems, we can track them using:
$ synergyc -f SERVER_IP
Information
In the project’s webpage you can find very good documentation.
Please note that synergy doesn’t offer secure connections yet, but we can use any VPN or SSH tunnel to avoid our sessions being captured in the network. See the security page in the project’s website.
Also check the quicksynergy package, which is a graphic user interface for synergy.
Synergy has been available at the Debian and Ubuntu repositories since long ago.
Thanks a lot to Fran Hermoso for the extensive text correction and improvement and to Peral for showing me synergy.
January 16th, 2008 at 7:14 am
Another neat synergy feature is clipboard sharing. Cut and paste works between the two computers even if they are running different operating systems.
January 16th, 2008 at 7:15 am
Indeed Synergy is a great tool. Unfortunately,
what you didn’t mention is that Synergy’s development seems to have ceased - and that it does’n work well under newer X versions (have a look at the Ubuntu forums, for example, there’s a long thread about freezes and massive lags) which might to be related to the xcb library.
January 16th, 2008 at 10:39 am
if you use X only, give x2x a try, it is very lightweight and quite reliable.
January 16th, 2008 at 10:42 am
Hey, I think it should be:
section: links
desktop:
right = laptop
laptop:
left = desktop
end
They can’t be both on the left, right?
January 16th, 2008 at 12:05 pm
I’ve been using x2x through an ssh X tunnel for this:
ssh -X othermachine x2x -west -to :0
January 16th, 2008 at 1:12 pm
I use x2x (over ssh) for this every day.
If you want to do the same with Windows, there’s x2vnc.
(I’ve tried x2vnc with a Mac too, but it was too slow, apparently due to translating the Mac 3D effects to VNC.)
January 16th, 2008 at 6:08 pm
There is another Project called Mango Lassi, which claims “Synergy done right”
http://0pointer.de/blog/projects/mango-lassi.html
January 17th, 2008 at 5:45 am
Synergy is cool but what I’m lookin for is to use second computer as an extra monitor with my laptop. I saw an demo of this somewhere but now I can’t find a software/method for the task.
Any suggestions?
-akhbit
January 17th, 2008 at 2:52 pm
Bane: corrected, thanks.
January 17th, 2008 at 8:33 pm
I was using x2vnc, worked well except didn’t do the clipboard thingy.
Alas, neither synergy nor x2vnc allow placing xinerama or placing a window from one host on another.
(I have a Ubuntu / Win2k pair)
I tried mucking about with Xming on the Win2k and x2vnc but it was very flaky.
February 12th, 2008 at 10:01 pm
akhbit, you can set up synergy, then from the secondary machines run
$ ssh -X yourself@laptop
$ gnome-session (or whatever)
This will give you an extra monitor
February 27th, 2008 at 5:10 pm
’synergy’ is dead jargon. it has been rendered meaningless by constant misuse. suggest that you attempt creativity in future. i mean how stupid do want to appear?
February 27th, 2008 at 7:18 pm
This Program is A BLESSING.
Works Fabulously also on Windows and MacOS X.
Just great.
Replaces the 30$-80$/machine Multiplicity which consumes far more resources.
Good work!
May 10th, 2008 at 4:46 am
-akhbit
MaxiVista might be the software you are looking for. It allows you to use another PC as an additional monitor.