Project

General

Profile

Support #593

Sharing Mouse and Keyboard on Arch

Added by Daniel Curtis about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Workstation
Target version:
Start date:
04/08/2015
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:

Description

I use Arch Linux for my primary workstation OS, however I also have Ubuntu derivative workstations that I occasionally need to access. To make life easier I have one workstation that only has a monitor and network connection and I share my mouse and keyboard from my Arch laptop to with my other Ubuntu-based workstation using synergy. This is a guide to set up sharing a mouse and keyboard on Arch Linux with an Ubuntu client using synergy.

NOTE: This guide has DNS records for workstation1 (Arch) and workstation2 (Ubuntu); if DNS is unavailable, then add IP addresses for the workstations in /etc/hosts.

Setting Up The Synergy Server on Arch

  • Install synergy:
    sudo pacman -S synergy
    
  • Create a new configuration file:
    sudo cp /etc/synergy.conf.example /etc/synergy.conf
    
  • Edit the synergy server config file:
    sudo nano /etc/synergy.conf
    
    • And modify the config accordingly:
      section: screens
              # Define two screen hosts named workstation1 and workstation2
              workstation1:
              workstation2:
      end
      
      section: links
              # Set workstation2 above workstation1
              workstation1:
                      up    = workstation2
      
              # Set workstation1 below workstation2
              workstation2:
                      down  = workstation1
      end
      
  • Test the server in the foreground, you can run the following command instead:
    synergys -f
    ^C
    
  • The synergy server process needs to attach to your user's X session, which means it needs to run as your user. Enable it as the appropriate user:
    systemctl enable synergys@user
    systemctl start synergys@user
    

Setting Up The Synergy Client on Ubuntu

  • Install synergy:
    sudo apt-get install synergy
    
  • My system is setup to automatically log in, so I added a simple start up application by going to System -> Preferences -> Startup Applications and click Add:
    • Name: Synergy Client
    • Command: /usr/bin/synergyc -f workstation1
    • Comment: Connect to workstation1 keyboard/mouse
    • Save

Setting Up The Synergy Client on Arch

  • Connect to the synergy server manually:
    synergyc workstation1
    

Synergy With Systemd

  • To start the Synergy client with systemd, create a service file:
    vi /etc/systemd/system/synergyc@.service
    
    • And add the following:
      [Unit]
      Description=Synergy Client Daemon
      After=network.target
      
      [Service]
      EnvironmentFile=/etc/conf.d/synergyc.conf
      ExecStart=/usr/bin/synergyc --no-daemon --debug ${DEBUGLEVEL:-INFO} ${SERVERALIAS}
      User=%i
      
      [Install]
      WantedBy=multi-user.target
      
  • And optionally a config file:
    vi /etc/conf.d/synergyc.conf
    
    • And add the following:
      DEBUGLEVEL=WARNING
      SERVERALIAS=workstation1
      
  • To start the service for your user,
    systemctl start synergyc@user
    

Resources

#1

Updated by Daniel Curtis about 9 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 50
  • Estimated time set to 1.00 h
#2

Updated by Daniel Curtis about 9 years ago

  • Description updated (diff)
#3

Updated by Daniel Curtis about 9 years ago

  • Description updated (diff)
#4

Updated by Daniel Curtis about 9 years ago

  • Description updated (diff)
  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100
#5

Updated by Daniel Curtis about 9 years ago

  • Status changed from Resolved to Closed
#6

Updated by Daniel Curtis over 8 years ago

  • Subject changed from Sharing Mouse and Keyboard on Arch with an Ubuntu Client to Sharing Mouse and Keyboard on Arch
  • Description updated (diff)

Also available in: Atom PDF