Control Ubuntu and Mac OS X from one computer

I just installed Synergy on my Ubuntu and Mac OS X laptops and now I can control both from one keyboard and mouse. It works fairly well, although I do wonder:

  1. What are the special Mac keys mapped to on my beige PC keyboard?
  2. I’ll have to stretch if I move my Macbook away from my desk. (joking)

It’s easy enough to install, on Ubuntu the Linux version is already in the repositories, so the following will install a simple gui tool to configure and run a server.

aptitude install quicksynergy

That will install Synergy as well.
Run “quicksynergy” from a terminal, go to the “Use” tab and give it the IP address of your machine. Then enter the hostname of your second (or third or fourth..) computer in whichever direction you want. My Macbook is on the left.
screenshot-quicksynergy

Before clicking “Execute”, I downloaded the Mac OS X version of Synergy, untarred it and after reading the documentation, fired up the client with:

./synergyc -f 192.168.1.20

Moments later, the following message popped up on my Ubuntu terminal,

NOTE: CServer.cpp,278: client “donncha-o-caoimhs-macbook.local” has connected

Now I can move the mouse cursor off the left side of my Ubuntu screen and it starts moving on my Macbook!

I don’t think I’ll use it full time as I’d strain my back or neck typing on a keyboard in front of me and twisting my neck to see my Macbook but it’s a nice tool to have. Over WiFi moving the mouse cursor stuttered a small bit, so it’s unlikely you’ll want to do intricate pixel work with it.
I’ll have to try a day’s work with it to judge it properly.

19 thoughts on “Control Ubuntu and Mac OS X from one computer

  1. Nope, I spend 90% of my time on my Ubuntu desktop. Macbook is “my other computer” that really only ever gets a look in when I tweet or bring a computer downstairs. My dev servers are all remote!

  2. Hmm, interesting … I’ve been a lot about Linux lately, as I want to get out more, go do some work in Starbucks or whatever for a few hours every day, and the less intrusive nature of netbooks appeals for that. Doesn’t look as if there will be an Apple netbook anytime soon, so, I guess it’s going to have to be Ubuntu on a 10″ MSI Wind or something along those lines.

    The only things holding me back, really, are Textmate and VoodooPad.

  3. I would suggest you check out Vim. Force yourself to spend an hour at it as it’s a text editor completely unlike anything you’ve used before. All my work is done through it.
    Gnome has gedit, and I’m sure KDE has it’s own version.

    On a small screen, Vim is probably the best thing as it’s a console app, no gui taking up realestate!

  4. Thanks Donncha, good suggestion, I mucked around with Vim years ago before I switched, hopefully I still have some of my Vim muscle-memory. I must say, Textmate was a major productivity booster for me when I first stumbled upon it but, yes, for a 10″ screen, a console app is the way to go.

  5. Remember that Synergy is sending all the data unencrypted, so if you’re on a corporate network, you’ll probably want to use ssh to forward the synergy connections.

  6. Hadn’t even thought of that Liam. Good point. WiFi here is fairly safe probably and I’ve disabled it already because I got bored of it 🙂

  7. As to you key mapping question, I’m not sure how Synergy will expose them, but if you were to plug a standard “Windows” keyboard into your Mac, you’d get the following:

    (PC – Mac)
    Control – Control
    “Windows” key – Command
    Alt – Option

    I switched the last two via Keyboard preferences on my Mac so the key mappings would match up to what’s printed on the keys of my Logitech Wave keyboard.

  8. Hi Donncha – I’ve been using Synergy for about a year now between a Vista PC and an opensuse 11 laptop and it works well. I did have problems with games and cursor switching but it’s easy enough to customise Synergy with lock and unlock key commands. I can see your point about next strain, the laptop is very much off to one side. I suppose I could change that but can’t really be bothered!

  9. If you want a nice UI for synergy on OS X try our SynergyKM. I use synergy across a macbook pro, vista desktop and ubuntu laptop (oh the bane of web testing) and its awesome. SynergyKM is easily the best front end for synergy though.

  10. I used Synergy full-time for about two years. Finally I gave up the desktop computer and now I just use a laptop with a monitor. No more synergy, no key mapping issues, no keeping an extra mouse connected so I could restart synergy on the other system…

  11. I’ve got three computers (Mac Leopard, Mac Tiger, and Vista) all on one monitor with synergy sharing the keyboard and mouse. I used that so I could get one 30″ monitor (with three inputs) instead of 3 21s (and still saved the company some money). Sweet.

    The only complaint I have is that there’s no easy way to ctl-alt-del the windows machine unless it’s the server.

  12. I didn’t know about QuickSynergy. I’ve been using SynergyKM on Mac for about a year, and love having 5 monitors & displays (including Laptop & its external). The ability to share keyboard mouse *&* clipboard is pretty cool!

    @Liam – Holy Shmoly! 😉 Good tip about the ssh connection. Here’s a nice write up on it:

    http://ubuntu-tutorials.com/2007/04/16/update-securing-synergy-over-the-wire/

    After perusing that, I enabled that on my MacBook Pro by adding this to an executable Shell Script I called synergy_over_ssh.sh:


    ssh -f -N -L 24800:[synergy-server]:24800 [synergy-server]

    NOTE: Replace [synergy-server] with the IP address or name of your [synergy-server]–the computer that is sharing its keyboard & mouse.

    Then chmod 755 synergy_over_ssh.sh and add it to ‘System Preferences > Accounts > Login Items’ and you should be good to go.

    Check to ensure synergy is running over ssh by executing ps -aux|grep ssh from the command line in Terminal.app:


    webclay:zzBin webclay$
    webclay 6722 0.0 0.0 599700 380 s000 R+ 3:33PM 0:00.00 grep ssh
    webclay 6481 0.0 0.0 75640 216 ?? Ss 3:19PM 0:00.00 ssh -f -N -L 24800:[synergy-server]:24800 [synergy-server]
    webclay 6480 0.0 0.0 77288 1912 ?? S 3:19PM 0:00.03 /usr/bin/ssh-agent -l

  13. Whoop! Meant to add this too:

    http://synergy2.sourceforge.net/faq.html#faq5

    What security/encryption does synergy provide?

    Synergy provides no built-in encryption or authentication. Given that, synergy should not be used on or over any untrusted network, especially the Internet. It’s generally fine for home networks. Future versions may provide built-in encryption and authentication.

    Strong encryption and authentication is available through SSH (secure shell). Run the SSH daemon (i.e. server) on the same computer that you run the synergy server. It requires no special configuration to support synergy. On each synergy client system, run SSH with port forwarding:

    ssh -f -N -L 24800:server-hostname:24800 server-hostname

    where server-hostname is the name of the SSH/synergy server. Once ssh authenticates itself, start the synergy client normally except use localhost or 127.0.0.1 as the server’s address. SSH will then encrypt all communication on behalf of synergy. Authentication is handled by the SSH authentication.

    A free implementation of SSH for Linux and many Unix systems is OpenSSH. For Windows there’s a port of OpenSSH using Cygwin.

  14. Hi Donncha,

    You’re a lifesaver, I’ve been looking for something like this for ages, I have a Debian desktop and a Windows (I know, but it pays some of the bills) laptop.

    Was using VNC but it’s not really what I wanted. Can’t wait to try this out !

    Bob

  15. I used to use the old synergy between my desktop and a laptop sitting beside it (both XP) — mostly to share work across the CPUs really. Like I’d start some very intensive script on one of them then switch to the other to continue doing something else. But finally I gave up on it and just use terminal server from one machine to the other. It was just a little too fiddly where as MSTSC just works — admittedly Windows specific. I guess if I end up in a multi OS environment again I’ll be switching back to synergy.

  16. Hi,

    i must be doing something wrong because i can’t get it to work.
    My macbook is the server and my ubuntu 9.04 nettop the client.
    So in quicksynergy i should only make use of the ‘Use’ tab and there fill in mac’s ip?

    Greetings,

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close