折腾了半天,记录一下。Ubuntu 20.04作为client, Win10作为server, 也就是用win的键鼠控制ubuntu.
直接安装1.8.8 stable版本,网上说的1.5.0“最后的免费版本”有鼠标用不了的bug
在Ubuntu下安装
sudo apt install synergy
遇到的坑:
- 没有libqt4xxx(后面忘了),通过apt安装,安装前需要先apt update和apt upgrade
- 安装后打开时,提示没有system tray,通过apt get sni-qt解决
在Windows下安装
https://sourceforge.net/projects/synergy-stable-builds/files/v1.8.8-stable/
下好.msi文件,安装,要输入序列号。感谢某人分享的方法 ,运行该段代码可以得到序列号。
//2017-June-3 scripted by genBTC, original code from Symless / Synergy (Github)
#include <iostream>
#include <sstream>
#include <iomanip>
static std::string
hexEncode (std::string const& str) {
std::ostringstream oss;
for (size_t i = 0; i < str.size(); ++i) {
int c = str[i];
oss << std::setfill('0') << std::hex << std::setw(2)
<< std::uppercase;
oss << c;
}
return oss.str();
}
int main()
{
std::string name;
std::string userlimit;
std::string email;
std::string business;
std::cout << "What is your name? ";
getline (std::cin, name);
std::cout << "How many userlimit max? be reasonable ";
getline (std::cin, userlimit);
std::cout << "What is your E-mail address? ";
getline (std::cin, email);
std::cout << "What is your business/company name? ";
getline (std::cin, business);
std::string key;
key="{v1;pro;" + name + ";" + userlimit + ";" + email + ";" + business + ";0;0}";
std::cout << "The Key is this: \n";
std::cout << hexEncode(key);
}
windows上运行软件(当时是1.5版本),在server configuration 里从右上角拖动一个图标到本机screen的旁边。Apply之后,一直报configuration file有非法字符的错,把设置里的screen name,比如“我的笔记本”“未命名”,全部改成纯英文就可以了。也看到有人说设置hotkeys会导致这个错误,需要删除hotkeys.
然后是Ubuntu上,取消勾选auto config,填上server的ip,screen name要和server上设置的那个完全一致。
其他可能有参考价值的文章:
教程
教程2
教程3(包含热键)
看不见鼠标
看不见鼠标2
设置好之后,体验非常的丝滑,在两台操作系统都不同的电脑之间,鼠标来去自如,像单主机接双显示器一样毫无卡顿感。共享剪贴板功能也非常实用。如果不是正版40美刀太贵,一定入正版…