在win10和centos7上编译synergy
在win10和centos7上编译synergy
Synergy功能简介
同一局域网中多台机器共享一套键盘鼠标,支持Windows、Linux、MAC设备,鼠标键盘物理连接的机器做服务器端,其他机器做客户端程序,在服务器端对各台机器进行简单配置,在客户端输入服务器端IP地址或网络名,即可体验其强大功能。
准备工作
1,获取Synergy源码
git clone https://github.com/symless/synergy-core.git
2,安装win10上需要的工具
1, Install Git for Windows
2, Install Visual Studio Professional 2015 with Updates
a, Select Custom
b, Deselect all
c, Within Programming Languages
, select Visual C++
d, Git for Windows should already be installed
3, Download the Windows 10 SDK Web Installer
a, Click Download the installer
(not the iso)
b, Use default options for first 2 screens
c, On the feature screen, untick everything except Debugging Tools for Windows
4, Install Bonjour
a, Download: Bonjour SDK for Windows v3.0
5, Install Qt
a, Install to C:\Qt
b, Select Qt 5.9.5
6, Add ‘C:\Qt\Tools\QtCreator\bin’ to the system PATH
7, Install CMake
a, Add CMake to PATH for all users
8, Restart Qt
9, Set CMAKE_PREFIX_PATH
environment variable to \path\to\qt\qt_version\msvc2015_64
10, Now follow the compile steps below
3,安装cento7上需要的工具
sudo yum groupinstall "Development Tools"
sudo yum -y install epel-release cmake3 boost-static git libXtst-devel qt5-qtbase-devel qt5-qtdeclarative-devel libcurl-devel openssl-devel
编译
1, win10 上编译
1,将源码位置配置到CMake中:配置源码目录和编译目录,一般都是在源码目录下新建一个build目录来进行编译。
2,执行Configure,选择合适的编译器,然后点Finish。
之后会进行配置,完成之后会出现如下界面:
3,点击Generate,生成项目文件
4,在上面我们配置的编译目录E:\synergy-core\build
就会看到已经生成vs2015的工程文件:
直接双击打开synergy-core.sln文件进行编译,不出意外一般都会成功:
2,centos7上编译
cd Projects/synergy
mkdir build
cd build
cmake ..
make
配置使用
synergy配置很简单,其说明文档也比较清楚,我只有两台电脑,一个笔记本win10,一个台式机centos7,台式机公用笔记本的键盘鼠标,我的配置文件如下:
# sample synergy configuration file
#
# comments begin with the # character and continue to the end of
# line. comments may appear anywhere the syntax permits.section: screens# three hosts, named "moe", "larry", and "curly"laptop:centos:
endsection: links# for moe, larry is to the right and curly is above.laptop:right = centos# for larry, moe is to the left and curly is also above.# note that curly is above both moe and larry# and that the connection between moe and larry is symmetric# (i.e. they're in opposite directions of each other).centos:left = laptopendsection: aliases# curly is also known as shemplaptop:james-laptopcentos:james-centos
end
在win10上以管理员身份运行cmd,进入到编译环境下执行:
synergy-core.exe --server --config synergy.conf
在centos7上以root身份运行如下命令即可:
sudo ./synergy-core --client 192.168.10.104
其中192.168.10.104
为win10的ip地址。然后就可以通过一个键盘一个鼠标控制两个电脑了。
我是在win10上写了一个简单的批处理来直接双击打开可以参考:
@ echo off
echo 正在启用超级管理员权限...
%1 %2
ver|find "5.">nul&&goto :st
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :st","","runas",1)(window.close)&goto :eof:st
copy "%~0" "%windir%\system32\"
echo 启用超级管理员权限成功 cd /d D:\Program Files\synergy"synergy-core.exe" --server --config synergy.conf
在win10和centos7上编译synergy相关推荐
- 如何在CentOS7上编译WELD
如何在CentOS7上编译WELD 准备工作 安装RUST 安装LLVM 编译WELD 准备工作 在docker上用centos7镜像运行容器: docker pull 获取镜像: docker pu ...
- tfs 安装mysql.h_如何在centos5或centos7上编译安装tfs rcserver 模块?
已在docker centos7上成功编译rcserver模块,具体步骤如下: docker run -ti tfs:latest /bin/bash 1.进入到rcserver模块目录 cd /mn ...
- CentOS7上编译多版本PHP并同时运行及systemd设置
为什么80%的码农都做不了架构师?>>> CentOS7最大改变是systemd代替过去的systemV服务,于是配置服务的方式改变了,用systemctl替代过去的servi ...
- 在CentOS7上编译GreenPlum5.3.0
Step.1 为yum添加国内镜像源 下载阿里镜像源 $ cd /etc/yum.repos.d $ sudo wget -nc http://mirrors.aliyun.com/repo/Cent ...
- 在centos7上编译安装nginx
题前,先放一个有图有真相的博客链接:https://www.cnblogs.com/zhang-shijie/p/5294162.html 虽然别人说的很详细,但还是记录一下 1.VMWare Wor ...
- 64 win10位系统上编译出的32位的可执行程序到其他机器上无法运行_MoreThanJava计算机系统概述...
「MoreThanJava」 宣扬的是 「学习,不止 CODE」,本系列 Java 基础教程是自己在结合各方面的知识之后,对 Java 基础的一个总回顾,旨在 「帮助新朋友快速高质量的学习」. 当然 ...
- 在centos7上编译EDK2
环境 centos7 [root@localhost ~]# uname -a Linux localhost.localdomain 3.10.0-1160.el7.x86_64 #1 SMP Mo ...
- mysql5.7源码安装 简书_在CentOS7上编译安装MySQL 5.7.13步骤详解
MySQL 5.7主要特性 更好的性能 对于多核CPU.固态硬盘.锁有着更好的优化,每秒100W QPS已不再是MySQL的追求,下个版本能否上200W QPS才是用户更关心的. 更好的InnoDB存 ...
- 在win10上编译webRTC(问题篇)
参考链接:https://webrtc.org.cn/mirror/ 主要是记录<在win10上编译webRTC(编译篇)>中,遇到的问题,以及解决方案.仅作为记录用. 问题一 在编译生成 ...
最新文章
- 设计模式(35)-----设计模式阶段性总结(一句话概括一个模式)
- 9大数据集6大度量指标完胜,周志华等提出深度森林处理多标签学习
- 编译安装MySQL5.6失败的相关问题解决方案
- vc编程中出现 fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include stdafx.h”?...
- SAP HR信息类型
- 树-当前结点与列表页不符的处理
- 安卓入门系列-02创建一个项目
- 每周一算法之六——KMP字符串匹配算法
- [Ajax] 实现跨域访问
- S5PV210体系结构与接口04:代码重定位 SDRAM初始化
- 页式管理--物理地址计算问题小结
- HashTable源码
- dreamweaver网页制作模板
- ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException 解决方案【SOLVED】
- InnoDB---深入理解事务提交--02
- [思维模式-13]:《复盘》-1- “知”篇 - 认识复盘
- rabbitmq reply-code=404, reply-text=NOT_FOUND
- 浅议抖音短视频平台的利与弊
- RMQ倍增,附赠有趣小故事一发
- 无驱、代码自动植入:新一代软件保护锁——圣天诺LDK-HL