標籤:des style blog http color strong
InstallationArch 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 archserver10.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/[email protected]
直接: vi /etc/systemd/system/[email protected] 進行編輯,內容參照如下:
[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 [email protected]mary # systemctl start [email protected]mary
上面的紅色字型為您的linux 使用者名稱username
後台啟動synergy:
# synergys -f
window,網上資料較多,不介紹,個人email:[email protected], 可以隨時交流,樂意之至!
結果: