Unbuntu上安装有一点点的麻烦,独立安装包总提示有问题,rpm也不能直接用。
我个人解决的方法很简单,就是在Synaptic Package Manager上搜索Synergy,找到后安装。
不过执行的时候需要到usr/bin下找到synergyc。
我是把Linux的这个作为client,所以很简单,直接用:
synergyc 158.182.*.* (server的IP)
Server端需要修改synergy.conf文件。我还没用过。不过应该也不难。
我中间还修改了主机名。这么做的:
使用下面的命令来查看当前主机的主机名称:sudo /bin/hostname
或者:
hostname
使用下面的命令来设置当前主机的主机名称:sudo /bin/hostname newname
要永久重设主机名则需手工修改/etc/hostname文件。
--------------------------
转载一篇写的详细的文章。英文的。原文: http://eightpence.com/install-latest-synergy-on-ubuntu/
Install latest Synergy on Ubuntu
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