Synergy

This can take a bit to get going correctly, as the implementation differs somewhat between os versions. The first step is to configure a server (where your mouse and keyboard are at), the proceed to the clients (which don't have keyboard or mouse).

Server Install

Windows

  1. Download from http://synergy-foss.org/pm/projects/synergy/tabs/download
  2. Install with the defaults
  3. In the start menu, right click on Synergy+ and "Run as administrator"
  4. Click AutoStart and choose 'When You Log In'  (the other option doesn't work with Vista and Win 7)

Linux

Example is Fedora 14 (64 bit version) hence the su -c rather than sudo. After installing, you will edit the Display Manager scripts so it starts automatically after X loads. Then restarts as you after you log in, so it runs as a process you can control. 
  1. su -c "yum install synergy-plus.x86_64"
  2. su -c "vim /etc/gdm/Init/Default"
# Synergy Server Start Block
SYNERGYS=`gdmwhich synergys`
if [ x$SYNERGYS != x ] ; then
$SYNERGYS --config /etc/synergy.conf
fi

# put the new Synergy section right above the 'sysmodmap' entry belowsysmodmap=/etc/X11/Xmodmap

        3.  su -c "vim /etc/gdm/PostLogin/Default"

# Place right at the bottom
/usr/bin/killall synergys
sleep 1
/usr/bin/synergys --config /etc/synergy.conf


Mac

In addition to configuring as the Linux box above is, you can use the GUI wrapper supplied by SynergyKM. This wrapper works, where as others I tested do not (at this time at least with OS 10.6  http://alternativeto.net/software/synergy/?platform=mac)

  1. Download and install: 
    1. http://synergy-foss.org/pm/projects/synergy/tabs/download (the mac version)
    2. http://sourceforge.net/projects/synergykm/


----->


Server Configure

Windows

  1. Find your computer's name.  (Type the command hostname at a command prompt. Note: what your computer thinks it's name is, is more important that what it's actual DNS name is)
  2. Add a new screen with that name. 
    1. Click the 'Configure'  button
    2. Click the '+' icon. 
    3. Put your computer's name in the screen name field. Leave the other settings at the defaults and hit OK. 
  3. Add a screen for your other computer(s) with their host names. (use the hostname command for linux)
  4. Link the screens
    1. In the Links section, select [New Link]. 
    2. Configure the three drop downs with this logic: (Say you have a Left-PC and a Right-PC - parenthetical 'of' and 'is' added here just to clarify)
      1.  'left'   (of)   'Right-PC'  (is) 'Left-PC'        -  and click +
    3. Repeat for the other screen with:
      1. 'right' (of)   'Left-PC'     (is) 'Right-PC'          -  and click +
  5. Close and click Test to prep for the client config testing

Linux

  1. Find your computer's name.  (Type the command hostname at a command prompt. Note: what your computer thinks it's name is, is more important that what it's actual DNS name is)
  2. Edit the synergy.conf file  
    1. su -c "vim /etc/synergy.conf"
    2. section: screens
      Server_Host_Name:
      Client_Host_Name:
      end
      section: links
      Server_Host_Name:
      left = Client_Host_Name
      Client_Host_Name:
      right = Server_Host_Name
      end
Where the above says "Server_Host_Name:", put in the actual host name - such as "Right-PC:"  complete with the colon. Once again, this is their self-reported hostname. Type hostname at each host to be sure

Client Install

Windows

    TODO

Linux

The example below is using Fedora 14 (64 bit version)

su -c "yum install synergy-plus.x86_64"


CONTINUE HERE - work in progress


Client Configure 

Linux

Test

/usr/bin/synergyc -f 132.235.63.13


Edit the GDM Init Script 

(so you can login with the server's keyboard and mouse)
su -c "vim /etc/gdm/Init/Default"

(put the new section right above the 'sysmodmap' entry)
# Synergy Client Start Block
SYNERGYC=`gdmwhich synergyc`
if [ x$SYNERGYC != x ] ; then
        $SYNERGYC Synergy_Server_Hostname_or_IP_Goes_Here
fi

sysmodmap=/etc/X11/Xmodmap

Edit the GDM Login Script

(because things started at init get terminated when you login)
su -c "vim /etc/gdm/PostLogin/Default"

(Place right at the bottom)
/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc Synergy_Server_Hostname_or_IP_Goes_Here

Windows

    TODO


Test

On the server in a terminal window, start synergy with the foreground option as follows:

/usr/bin/synergys -f --config /etc/synergy.conf


On the client in a terminal window, telnet to the the server 24800 to verify you can connect. Then start the client as follow

/usr/bin/synergyc -f Server_Host_Name

Now you should be able to move your mouse around. If that goes well, reboot both systems and see if the init process works. If that fails, start adding "echo something meaningful >> /tmp/synergy-start-trace" to the gdm init scripts to see what's going on

Notes

Data is sent in the clear. If you are worried you about that, you should consider tunneling over ssh. 


Notes on the Server's  Firewall

Linux
In general, you want to add the specific host (or hosts) you identified above. DHCP can make this tough, however, as your hostname (or IP) will change from time to time, so you may want to add your local subnet and trust that synergy doesn't have any exploits and your neighbors are benign. 

Create an IPTABLES File
su -c "vim /etc/sysconfig/synergy-firewall-rules"

In this file, we will put entries in the 'IP Tables Save File' format. If you have more than one client, and a line for each.

-A INPUT -p tcp -s Client_Host_Name --dport 24800 -j ACCEPT

Or, if you want to add a range (because of DHCP)

-A INPUT -p tcp -s 192.168.1.1/24 --dport 24800 -j ACCEPT

Add the IPTABLES File

You can use the GUI firewal tool, under 'Custom Rules', Add this file to the 'filter' table.





Comments