首页 > 代码库 > 关于【键鼠<局域网>共享软件:synergy】install

关于【键鼠<局域网>共享软件:synergy】install

Installation

Arch Linux

您可以download this software【synergy】:http://synergy-project.org/

Windows and Mac OS X

Download and run the newest installer 同linux下载

Pre-configuration【安装install之前的相关配置】

First determine the IP addresses and host names for each machine and make sure each has a correct hosts file.

  • Arch Linux - /etc/hosts                          linux下hosts【主机名与局域网ip匹配】文件路径
  • Windows - C:\WINDOWS\system32\drivers\etc\hosts   Window下hosts【主机名与局域网ip匹配】文件路径
  • Mac OS X - How to Add Hosts to Local Hosts File.   MAC下hosts【主机名与局域网ip匹配】文件路径
/etc/hosts

10.10.66.1 archserver.localdomain archserver
10.10.66.100 archleft.localdomain archleft10.10.66.105 archright.localdomain archright

对该文件进行编辑,修改文件内容, 格式如 bold粗体, ip、hostname 根据自己情况而定
主机ip  主机名.localdomain  主机名
Note: Check that the clients can reach the server.【保证client客户端可以connect连接server服务器】
 

本篇文章介绍如何将linux作为server:

synergy的配置config文件:

路径:/etc/synergy.conf, 可以 vi  /etc/synergy.conf       然后参照以下code内容

section: screens    desktop:        halfDuplexCapsLock = false        halfDuplexNumLock = false        halfDuplexScrollLock = false        xtestIsXineramaUnaware = false        switchCorners = none         switchCornerSize = 0    notepad:        halfDuplexCapsLock = false        halfDuplexNumLock = false        halfDuplexScrollLock = false        xtestIsXineramaUnaware = false        switchCorners = none         switchCornerSize = 0endsection: aliasesendsection: links    desktop:        down = notepad    notepad:        up = desktopendsection: options    relativeMouseMoves = false    screenSaverSync = true    win32KeepForeground = false    switchCorners = none     switchCornerSize = 0    keystroke(Control+l) = switchToScreen(desktop)    keystroke(Control+k) = switchToScreen(notepad)end

上面的红色字体为hostname主机名根据自己情况改变:

 

开启端口 port 24800 【synergy的服务port】:

iptables -A INPUT -i p33p1 -p tcp --dport 24800 -j ACCEPT

上面的红色字体部分,为 网卡名 采用 ifconfig 命令查看您的 机器。

 

 

编辑服务service 文件:

路径:      /etc/systemd/system/synergys@.service

直接: vi /etc/systemd/system/synergys@.service             进行编辑,内容参照如下:

[Unit]Description=Synergy Server DaemonAfter=network.target[Service]Type=forkingExecStart=/usr/bin/synergys --config /etc/synergy.confUser=%i[Install]WantedBy=multi-user.target

使服务生效

Then enable it as the appropriate user (replacing ‘mary‘ with your username):

# systemctl enable synergys@mary

# systemctl start synergys@mary

上面的红色字体为您的linux 用户名username

 

后台启动synergy:

# synergys -f

 

window,网上资料较多,不介绍,个人email:likaiweb@qq.com, 可以随时交流,乐意之至!

结果: