Welcome to the adventure

Install latest Synergy on Ubuntu

Saturday April 1, 2006

Took me about 15 google searches to get the latest Synergy running on Ubuntu (dapper, should apply to and work with other Ubuntus) and I’ve found what I needed. Hopefully this will save someone some time.

The latest build (at the time of writing) in Ubuntu Dapper is 1.2.2 which is a full year old. With Synergy being so buggy (don’t get me started — it took until 1.3.0 to get this “bug” fixed — “Clients now detect loss of connection to server and reconnect”), it’s useful to have the latest build that hopefully fixes some of those bugs. The packages always seem to lag way behind the version for Synergy, so here are some tips to get the thing installed by source. The comments and instructions here are for Dapper pre-release and Synergy 1.3.0.

Update: If you have the latest Synergy in your apt repository (run “sudo apt-cache show synergy” to see) then you can just install that (”sudo apt-get install synaptic”) and not worrying about compiling it from source. But if the packages are outdated, you can compile it by source as described here to get the latest version.

You can try and convert their RPM release to .deb using

alien synergy*.rpm

(requires package alien), and install it with

sudo dpkg -i synergy*.deb

but the synergy executable produced always complains about a missing version of libstdc++.

Alternatively, you can grab it from source. The configure script will complain like so:

configure: error: You must have the XTest library to build synergy

Well, just install it then, right? Unfortunately, searching with synaptic for “xtest” in both description and name doesn’t yield any relevant results. Of course, that’s because you need to search for “xtst” (duh!) and there you will find libxtst-dev. How intuitive.

With that, configure should proceed, but “make” may bomb out in the middle with an error like this:

In file included from CXWindowsClipboard.cpp:15:
CXWindowsClipboard.h:24:3: error: #error X11 is required to build synergy
In file included from CXWindowsClipboard.cpp:21:
CXWindowsUtil.h:23:3: error: #error X11 is required to build synergy
CXWindowsClipboard.h:38: error: expected `)' before ‘*’ token

Thanks synergy for telling me I don’t have X11! And thanks for telling me this during the BUILD stage rather than the configure stage! Of course on Ubuntu you DO have X11. Synergy just needs to explicitly be told where the includes are, because for some reason, it can’t find them itself. You can do this via the arguments x-includes and -x-libraries to ./configure, as someone helpfully posted here.

So, in summary:

sudo apt-get install libxtst-dev
./configure -x-includes /usr/include -x-libraries /usr/lib --prefix=/usr
make
sudo make install

Update: this might also be of use-
Start Synergy with GDM on Ubuntu

33 Comments »

  1. […] I use synergy a lot to share my mouse and keyboard between different machines running different operating systems. I also run ubuntu at home so this blog post on running the newest version of synergy came in handy a few minutes ago. Thanks to the author of the post.   […]

    Pingback by mike.howsden.com » synergy April 17, 2006 at about 12:04 am

  2. Synergy…

    Sweet! In order to get a compatible version on Ubuntu, I followed Phil Crosby’s instructions (Google cache): sudo apt-get libxtst-dev
    ./configure -x-includes /usr/includes -x-libraries /usr/lib –prefix=/usr
    make
    sudo make install Being able to co…

    Trackback by Sam Ruby May 3, 2006 at about 10:45 am

  3. I’m very new to Linux, and Ubuntu, so apologies if I’m stating the obvious and/or missing some important point. But, I went into Synaptic Package manager, and did a search on the word synergy. It came up with synergy 1.3.1-1ubuntu1.
    Can’t I just install it that way? I’m going to try it out and let you know whether it works.
    -aleska

    Said by aleska August 16, 2006 at about 10:35 pm

  4. Awesome it works great! I’m about to post a blurb on what I did (from the n00bs persepctive of course).
    http://www.skarulis.com
    Regards,
    aleska

    Said by aleska August 17, 2006 at about 12:52 am

  5. Thanks Phil! With the aid of your instructions, I was able to install Synergy 1.3.1 from source on Ubuntu 6.06, but had to do a couple of other things.

    First of all I was getting:

    configure: error: C compiler cannot create executables

    and also:

    configure: error: C++ preprocessor “/lib/cpp” fails sanity check

    Googling around suggested I install a few packages, so after doing:

    sudo apt-get install gcc libc6 libc6-dev cpp g++

    …everything worked fine. :)

    Said by Chris Barnes September 11, 2006 at about 1:44 pm

  6. This is Reaaly helpful you did a great job in posting this.

    Sri

    Said by sri September 12, 2006 at about 8:03 am

  7. Works perfectly!

    One comment, not sure why it’s different tho is that i used -x-includes /usr/include and not /usr/includes as you mentioned. I’ve just installed dapper 6.6.1 fresh, strange.

    Thanks for the great resource with this one, saved me hours at least!

    Said by Tom September 16, 2006 at about 7:37 am

  8. ubuntu - smoke reloaded…

    Had a chat to a pal jonathan (vhata) this morning online, and somehow we came to talking about ubuntu vs. debian vs. gentoo etc. Now jonathan has always been a hardcore linux user, always prefering a zsh shell to anything else graphicy, but he was sayi…

    Trackback by tom.blog September 16, 2006 at about 8:18 am

  9. Thanks Tom, you’re right, the path should be /usr/include. Fixed.

    Said by philc September 16, 2006 at about 3:15 pm

  10. Thanks, this saved me a lot of time ;)

    Said by Micha October 6, 2006 at about 7:26 am

  11. Oh, wow. I’ve been trying to install Synergy all afternoon.. until I found this. Kudos for saving my sanity. :)

    Said by David Still October 14, 2006 at about 12:29 am

  12. I had a few problems getting things going. This was my final installation script:

    – beg: ~/install/synergy/install_from_source –
    #!/bin/sh

    sudo apt-get install alien
    sudo apt-get install libxtst-dev
    sudo apt-get install gcc libc6 libc6-dev cpp g++

    # Download the source code RPM…
    export sourceforge=optusnet.dl.sourceforge.net
    export sourceforge=211.29.132.142
    wget http://$sourceforge/sourceforge/synergy2/synergy-1.3.1-1.src.rpm

    # Convert the RPM to DEB package…
    sudo alien synergy-1.3.1-1.src.rpm

    # Install the DEB source package…
    sudo dpkg -i synergy_1.3.1-2_i386.deb

    # Build the source…
    cd ./synergy-1.3.1
    ./configure -x-includes /usr/include -x-libraries /usr/lib –prefix=/user
    make

    # Finally, install!
    sudo make install
    – end: ~/install/synergy/install_from_source –

    And then it gets launched from my .xsession file ala:

    – beg: ~/.xsession –
    # Startup the Synergy Client…
    /usr/bin/killall synergyc
    sleep 1
    /user/bin/synergyc –name myScreenName myServerName
    – end: ~/.xsession –

    Note it’s launching from /user/bin instead of /usr/bin - I think that’s a bug in the make script.

    Said by Spaz November 7, 2006 at about 9:43 am

  13. It’s worth noting that I did all of that under 6.06.1 LTS Dapper Drake.

    After posting the above, I went back into Synaptic and did a Complete Removal of the synergy package. After making sure I had the Universe (Binary) repository enabled and Reloading the repositories, I was able to do a normal install of the “synergy 1.3.1-1ubuntu1″ binary package.

    It’s likely that all people need to do to get their basic binary package working is to run the following command to ensure that the necessary libraries installed:
    sudo apt-get install gcc libc6 libc6-dev cpp g++

    Good luck everyone!

    Said by Spaz November 7, 2006 at about 10:03 am

  14. Works like a dream, Muchos Kudos to the author of this one. Doubt I’d have got it working myself.

    Happy Days!

    Said by Mellow November 14, 2006 at about 6:13 pm

  15. Great! Exactly the same package, with exactly the same name, is needed on Debian. No wonder, given the two distributions are still virtually the same, but still I’d like to say Debian, Debian Debian my Debian Deb Deb Debian, so that google will make this page show up on “X-Test Synergy Debian”. Debian Synergy Debian X-Test.

    Said by Malagmyr November 19, 2006 at about 6:18 pm

  16. […] Install latest Synergy on Ubuntu » eightpence - Phil Crosby Godsend of a blog article on installing Synergy on Ubuntu. Check out the comments if you hit additional errors. (tags: synergy ubuntu edgy eft) […]

    Pingback by Life, it is a Travesty… » links for 2006-11-03 November 19, 2006 at about 6:57 pm

  17. Thanks for this!

    Said by Dave November 25, 2006 at about 3:30 pm

  18. thank you so much amigo! it works flawlessly :)

    Said by rob December 7, 2006 at about 10:34 am

  19. Thank you. There is also related link in Ubuntu documentation site -
    https://help.ubuntu.com/community/SynergyHowto. This link also has some extra informations like how to get packages if you could not find synergy using apt-get.. etc. I just installed 6.10 and I could not find synergy package( even after enabling all repositories), so I had to build from source. It works fine.

    Said by mkgs December 22, 2006 at about 4:50 pm

  20. Thanks for your help on this one!

    Said by knugfjunk January 30, 2007 at about 11:13 pm

  21. This helped me get it installed on Fluxbuntu! Thanks a lot!

    Said by aliu February 10, 2007 at about 11:02 pm

  22. Thanks man! Your post helped :)

    Said by Uri March 23, 2007 at about 1:29 pm

  23. Many thanks. It REALLY saved someone some time…

    Said by wMaN March 28, 2007 at about 1:46 am

  24. Very Helpful..Thanks

    Said by MLJ April 10, 2007 at about 7:50 pm

  25. THANKS to all. Any question I had about this was very cleanly summed up by:
    Chris Barnes September 11, 2006 at about 1:44 pm
    AND
    Spaz November 7, 2006 at about 9:43 am

    Said by jeffyclark May 29, 2007 at about 4:44 pm

  26. Thank you so very much. I ran into the ‘missing XTest’ issue which caused me to stumble across this page.

    Can’t guess how much time you saved me :~) Thanks again.

    Said by Geoff May 31, 2007 at about 12:38 am

  27. Hello, Thanks for getting this all into one place! Our Ubuntu Feisty installation has this for the XTest library:

    stratton:~/src/synergy/synergy-1.3.1> dpkg -l | grep libxtst
    ii libxtst6 1.0.1-3build1
    X11 Testing — Resource extension library

    but ./configure with the above-mentioned options does not
    find XTest.

    I am not allowed to apt-get install to the system, and I am not
    really wanting to try to install the library in my $HOME directory.

    Could someone kindy show me which XTest libraries work? dpkg -l
    output would help, but if there is a nice apt-cache command or
    something, that would be nice.

    Thanks!

    Said by fotoguzzi June 20, 2007 at about 5:50 am

  28. Sorry, my bad:

    fab04:/home/foo> dpkg -l | grep libxtst-
    ii libxtst-dev 1.0.1-3build1
    X11 Record extension library (development he

    is what it should look like. Thanks!

    Said by fotoguzzi June 20, 2007 at about 5:24 pm

  29. “Of course, that’s because you need to search for “xtst” (duh!) and there you will find libxtst-dev. How intuitive.”

    lol

    thanks a lot.

    Said by bbb August 23, 2007 at about 6:48 am

  30. Wery help full and funny guide to read, I got Synergy install from source in ubuntu. Big Thanks :)

    Said by Thanks! January 16, 2008 at about 5:59 pm

  31. Most helpful! I’ve been using the apt version with (Kubuntu) Dapper LTS, but the client keeps falling over on one of my boxes, so I wanted to build a debug version. The Xtst error led me straight to your page. :)

    Said by Kevin Martin February 17, 2008 at about 12:47 am

  32. Great! It was really helpful. Thanks!

    Said by RS April 25, 2008 at about 11:30 am

  33. Its crap

    Said by Screaming Flea August 2, 2008 at about 7:00 pm

Leave a comment