Oy vey. How do I explain this one without sounding like a total alien?
Ok, so I'm using a program called Synergy to share a keyboard between an Ubuntu desktop system and an Apple Powerbook. The program is made up of a "server" and a number of "clients". Since the Ubuntu desktop isn't going anywhere, I am using it as the server and the Powerbook is the client.
It works great. Much easier than having a zillion keyboards on my desk, or in this case reaching over to my laptop to answer an IM or e-mail. BUT, please note the SECURITY CONCERNS at the bottom of this article.
So here we go;
Step 1) Download Synergy2 for the Mac and install.
Download Synergy2 for the Mac and decompress synergy. The binaries come out as synergyc and synergys. synergyc is the binary we want to use on the Powerbook. I have mine in /opt/local/bin/.
Example; decompress the binary package via Apple's Terminal
scarr@awesome:~$ cd tmp && tar zxvf ~/Downloads/zxvf synergy-1.3.1-1.OSX.tar.gz
...etc... output of file...
scarr@awesome:~/tmp$ cd synergy-1.3.1/
scarr@awesome:~/tmp/synergy-1.3.1$ ls -al
total 2888
drwxr-xr-x 3 scarr scarr 4096 2006-04-02 16:17 .
drwxr-xr-x 4 scarr scarr 4096 2009-10-13 21:57 ..
-rw-r--r-- 1 scarr scarr 293309 2006-04-02 16:17 ChangeLog
drwxr-xr-x 2 scarr scarr 4096 2006-04-02 16:17 doc
-rw-r--r-- 1 scarr scarr 861 2006-04-02 16:17 README
-rwxr-xr-x 1 scarr scarr 1029440 2006-04-02 16:17 synergyc
-rw-r--r-- 1 scarr scarr 793 2006-04-02 16:17 synergy.conf
-rwxr-xr-x 1 scarr scarr 1593984 2006-04-02 16:17 synergys
Step 2) install the Synergy server on to our Ubuntu box.
From the command line, do the following;
scarr@awesome:~$ sudo aptitude search synergy
[sudo] password for scarr:
i quicksynergy - GUI for easy configuration of Synergy
i A synergy - Share mouse, keyboard and clipboard over the network
scarr@awesome:~$ sudo aptitude install synergy
You can use the other app in that list, QuickSynergy, to quickly set up the server config. If you do, the config that QuickSynergy generates will be in ~/.quicksynergy/synergy.conf. The downside of QuickSynergy; it doesn't seem to allow much customization, which you may need.
Step 3) Configure the Synergy server.
Configuring Synergy can be a bit confusing but once you've got the layout visualized it makes a lot more sense.
Here's my example config on the server side for reference, which is on the Ubuntu desktop;
section: screens
awesome:
codebook:
meta = alt
alt = meta
end
section: links
awesome:
left = codebook
codebook:
right = awesome
end
awesome is the Ubuntu desktop. codebook is the Powerbook.
So in "section: screens" we define what systems will share awesome's keyboard and mouse. If you'll notice, under codebook's example I've defined a swap of the alt and meta keys.
I've got an Apple keyboard hooked up to awesome, but when I enter codebook's screen, awesome sends an alt in the place of the command key and vice versa for alt. To fix that, I just swapped 'em. Depending on the keyboard you're using, you can mix and match. It's very handy to be able to do that. A list of the keys is in the synergys man page, but here they are below for reference.
· Modifier keys:
shift = {shift|ctrl|alt|meta|super|none}
ctrl = {shift|ctrl|alt|meta|super|none}
alt = {shift|ctrl|alt|meta|super|none}
meta = {shift|ctrl|alt|meta|super|none}
super = {shift|ctrl|alt|meta|super|none}
In "
section: links" we define
how these systems are configured.
So awesome is to the right of codebook.
[caption id="attachment_4544" align="alignnone" width="300" caption="Pardon The Mess! Awesome is to the right of Codebook"]
[/caption]
Step 4) Run the client and the server
- On awesome, the server, from the command line I run
synergys -c /home/scarr/.synergy/synergy.conf
This is pretty straight forward. I am running the daemon with the configuration we just wrote. It should slip into the background and you can close the terminal.
- On codebook, the client, from the command line I run
/opt/local/bin/synergyc -n codebook 10.10.10.10
In this instance, I am defining the name to send to the server as codebook. The IP address of awesome is 10.10.10.10, which is where codebook will connect.
If everything has gone according to plan you'll be able to slip between the two systems, taking the clipboard with you, which is astonishingly handy!
Step X) some automation
To get the server to start up when I log on to the Ubuntu box, I have asked Ubuntu to run it under System -> Preferences -> Startup Applications
To run the client on the Powerbook, I used Automator to make a shortcut to the terminal command.. This part is still somewhat messy, but it's easy and works.
SECURITY CONCERNS
Synergy is unencrypted and mostly passwordless (if you don't count obfuscating your computer name, which is already sketchy security since it is, once again, unencrypted). Do not use synergy on a network you do not trust implicitly. Because it is unencrypted, all communications between the synergy server and synergy client will be readable in plain text in TCP/IP packets.
There are ways around this, like tunneling synergy through SSH, but that's just one shelf above what I'm willing to explain. If you want to start down this road, you can look at http://www.securityfocus.com/infocus/1816 which is a good starting point.