2014-02-25

[Technology] Building Synergy

Synergy is software that will share a keyboard, mouse, and clipboard between computers over a network.  It's great.  If you have multiple machines in one place, you can just drag your mouse cursor between their screens, even if they're running different operating system.



I want to start off by saying that synergy seems like great software.  I used it a lot in the past, and was very pleased with the results.  It wasn't very user friendly then, and at some point it was no longer actively maintained.  It seems to be actively maintained now, and even has file drag-and-drop support between computers (for Windows and Mac, not for Linux yet ;_;).  In the rest of this post, I'll be detailing each step and obstacle I encountered trying to set up synergy 1.4.16 (the latest as of today) on Fedora 20.  In part, I hope it helps the next person who tries this and perhaps Googles their error messages.  Know that if you're just a regular user, don't take the issues that arise below as a cause for terror.  You can do what you should, just install the package from the repository (if you're fine not having your key presses be encrypted over the network...) and not worry about anything.  A lot of the problems below will emerge from me not properly understanding what's expected, but then that goes to show how straightforward or not building Synergy can be.



A quick summary is:


  • can't install from RPM

  • can't build from source using cmake

  • can't install from source using configure

  • just copied binaries out of RPM in the end :(



attempt 1: installing from an RPM


I run Fedora Linux 20.  The version Fedora has in its repository is 1.4.10.  The latest version from synergy-foss.org is 1.4.16 and has some features I would like.  synergy-foss.org provides a pre-built package for Fedora, but there's an issue with their package for 1.4.16 preventing it from installing.


Error: Package: synergy-1.4.16-1.x86_64 (/synergy-1.4.16-r1969-Linux-x86_64)
           Requires: libcurl.so.4(CURL_OPENSSL_3)(64bit)

They explain that in their release notes.  Basically the packages get built on a Ubuntu installation which has an out-dated version of curl.  Whoops.  So, I'll take the opportunity to build it myself.


attempt 2: building from source, with cmake (their recommendation)


The first problem I have in building is that their wiki tells me to use their hm script.  First, I try following hm.sh's own suggestion of


$ ./hm.sh build -g 1

Error: option -g not recognized

Hmm, double check the wiki and ... aha, yes, apparently -g should go to conf and not build.  When I try doing


$ ./hm.sh conf -g1
Error: Could not find qmake.
Error: Cannot continue without qmake. 

Fine.  I install qt-devel, and set PATH to include the directory containing qmake


PATH=$PATH:/usr/lib64/qt4/bin ./hm.sh conf -g1

Success.  Next step,


$ ./hm.sh build
Entering dir: build/release
make: *** No targets specified and no makefile found.  Stop.

... Great. The instructions say I can skip the hm script, so yay.  I follow its advice and go to


$ cd build/

$ make
make: *** No targets specified and no makefile found.  Stop.


attempt 3: building from source, the old fashioned way (not their recommendation)


... Alright.  I see that there is a configure script.  I am used to doing ./configure && make && make install, so let's try it the old fashioned way. The next problem I encounter is with Xtst,


Missing library: Xtst

I thus installed libXtst-devel (which may have been unnecessary; libXtst was already installed) but still, I get that error message.  I then grep'd about and checked CMakeError.log.


/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=XTestQueryExtension    CMakeFiles/cmTryCompileExec218679776.dir/CheckFunctionExists.c.o  -o cmTr\
yCompileExec218679776 -rdynamic -lXtst -lXext -lX11
/usr/bin/ld: cannot find -lXtst

Hmm.



I then went to /tmp/ and tried compiling with -lXtst myself and... it worked.



I deleted the build directory, and unpacked a new one, and ... it worked.  Annoyingly, their configure script apparently doesn't check again, and I'm not sure what you would use to clear its memory of the failure. Ah well.



Next problem is this:


CMake Error at tools/CMakeLists.txt:87 (add_library):
  Cannot find source file:
    cryptopp562/3way.cpp

I poked about with find and grep and ultimately found tools/cryptopp562.zip.  If I just use unzip on it, it actually dumps all its files into the tools/ directory, so, clean up that mess, and then create cryptopp562, and unzip it into there.



And ... it works.  I think.  I manage to success do "make", but then there's no "make install" target.  Hmm, let's check hm.sh again; yup, there's an install target!


$ ./hm.sh install

Not yet implemented: install

...



I peeked in bin/ and found a bunch of binaries that are familiar to me from the old synergy/synergy2 days, but reading the User Manual and the User Wiki to find out how to set it up again almost exclusively references a GUI, and none of these binaries are a GUI...


attempt 4: pillaging the RPM


OK, let's just extract the contents of the 1.4.16 RPM and see how the .desktop application file works and- aha, there is another binary, synergy, that hasn't been built.  Let's just copy these into ~/.local/bin and ... it works.



It works.


running it


Now, getting it to run.  Two more hiccoughs.  One was that I needed to open the firewall port.  Using FirewallD in Fedora, I used this command,


firewall-cmd --add-port=24800/tcp

Next, I configured the server to know the client using the GUI, and they could finally connect.  Hurrah! 



It's running beautifully now.  Hopefully future releases will Just Work on Fedora like older releases. :)

Keine Kommentare:

Kommentar veröffentlichen

Dieses Blog durchsuchen

Labels

#Technology #GNOME gnome gxml fedora bugs linux vala google #General firefox security gsoc GUADEC android bug xml fedora 18 javascript libxml2 programming web blogger encryption fedora 17 gdom git emacs libgdata memory mozilla open source serialisation upgrade web development API Spain containers design evolution fedora 16 fedora 20 fedora 22 fedup file systems friends future glib gnome shell internet luks music performance phone photos php podman preupgrade tablet testing typescript yum #Microblog Network Manager adb apache art automation bash brno catastrophe css data loss debian debugging deja-dup disaster docker emusic errors ext4 facebook fedora 19 gee gir gitlab gitorious gmail gobject google talk google+ gtk html libxml mail microsoft mtp mysql namespaces nautilus nextcloud owncloud picasaweb pitivi ptp python raspberry pi resizing rpm school selinux signal sms speech dispatcher systemd technology texting time management uoguelph usability video web design youtube #Tech Air Canada C Electron Element Empathy Europe GError GNOME 3 GNOME Files Go Google Play Music Grimes IRC Mac OS X Mario Kart Memento Nintendo Nintendo Switch PEAP Selenium Splatoon UI VPN Xiki accessibility advertising ai albums anaconda anonymity apple ask asus eee top automake autonomous automobiles b43 backup battery berlin bit rot broadcom browsers browsing canada canadian english cars chrome clarity comments communication compiler complaints computer computers configuration console constructive criticism cron cropping customisation dataloss dconf debug symbols design patterns desktop summit development discoverability distribution diy dnf documentation drm duplicity e-mail efficiency email english environment estate experimenting ext3 fedora 11 festival file formats firejail flac flatpak forgottotagit freedom friendship fuse galaxy nexus galton gay rights gdb german germany gimp gio gjs gnome software gnome-control-center google assistant google calendar google chrome google hangouts google reader gqe graphviz growth gtest gtg gvfs gvfs metadata hard drive hard drives hardware help hp humour ide identity instagram installation instant messaging integration intel interactivity introspection jabber java java 13 jobs kernel keyboard language language servers languages law learning lenovo letsencrypt libreoffice librpm life livecd liveusb login lsp macbook maintainership mariadb mario matrix memory leaks messaging mounting mouse netflix new zealand node nodelist numix obama oci ogg oggenc oh the humanity open open standards openoffice optimisation org-mode organisation package management packagekit paint shedding parallelism pdo perl pipelight privacy productivity progress progressive web apps pumpkin pwa pyright quality recursion redhat refactoring repairs report rhythmbox rust sandboxes scheduling screenshots self-navigating car shell sleep smartphones software software engineering speed sql ssd synergy tabs test tests themes thesis tracker travel triumf turtles tv tweak twist typing university update usb user experience valadoc video editing volunteering vpnc waf warm wayland weather web apps website wifi wiki wireless wishes work xinput xmpp xorg xpath
Powered by Blogger.