Difference between revisions of "Synergy"

From ArchWiki
Jump to: navigation, search
m (Synergy Arch Client Updates)
m
Line 97: Line 97:
 
  /etc/rc.d/synergyc start
 
  /etc/rc.d/synergyc start
  
These are the steps for SLiM/Xfce4:
+
These are the steps for SLiM:
Note: Currently, there is no support when using inittab/SLiM because a pre-SLiM script cannot be executed.
+
{{Note|Note: Currently, there is no support when using inittab/SLiM because a pre-SLiM script cannot be executed.}}
  
 
Check http://synergy2.sourceforge.net for more information.
 
Check http://synergy2.sourceforge.net for more information.

Revision as of 02:50, 16 December 2009

Description

Synergy is a program that lets you share 1 keyboard and 1 mouse between multiple computers (different operating systems!) using the TCP/IP protocol.

Synergy also does other things like merging copy-paste, so you can copy something on one computer, and paste it on another one.

You can find more information on the official Synergy website: http://synergy2.sourceforge.net/


To use Synergy you need 1 server, this is the computer that has the keyboard and mouse attached. The other computers are the clients.

Configuration is only needed for the server computer.

You may also use the quicksynergy gui, which simplifies the configuration process.

Installing and starting the Synergy server

Arch Linux

To download Synergy for Arch Linux you can get it from the Extra repository:

pacman -S synergy

The configuration file for Arch Linux can be found at /etc/synergy.conf


The comments in the configuration file should give you enough information, otherwise check http://synergy2.sourceforge.net/ for more information.


To start the server, run:

synergys

This will run the server in the background. If you experience problems and you wish to run the server in the foreground, you can run instead:

synergys -f

If you want to run the synergy server everytime Arch Linux boots up, you have to make sure "synergys" starts up everytime Arch boots. There are several ways to do this...

Windows

Download the newest "SynergyInstaller-version.exe" from SourceForge: http://sourceforge.net/project/showfiles.php?group_id=59275&package_id=58013

Run the installation wizard.

After installation, open the Synergy program.

Select the option "Share this computer's keyboard and mouse (server)" and then click the "Configure..." button next to "Screens & Links"

Add screens, depending on how much computers/screens you have. And then make Links to make the server know where every screen is located. The names of the screens should be the hostnames, but you can also add aliases. A very simple example for 2 screens would be:

Screens:
    LEFTPC
    RIGHTPC
Links:
    RIGHTPC is right of LEFTPC
    LEFTPC is left of RIGHTPC

For more information about screens & links check http://synergy2.sourceforge.net

If you want to start the Synergy server everytime Windows starts, go to "Options -> Autostart".

Click "Test" to test the connection. You should get a new window displaying something like:

INFO: Synergy server 1.3.1 on Microsoft Windows Server XP
NOTE: started server
INFO: screen "LEFTPC" shape changed

Close the window and click "Stop" to stop the test.

Click "Start" to start the server. You can use the tray icon (or the task manager) to stop the server.

Mac OS X

I am told that Mac OS X has the same configuration as UNIX. Check http://synergy2.sourceforge.net for more information

Installing and starting Synergy clients

This assumes a server has been setup and configured *properly*. Make sure the server is already configured to accept the client before continuing.

Arch Linux

To download Synergy for Arch Linux you can get it from the Extra repository:

pacman -S synergy

In a console window, type:

synergyc -f server-host-name

Where server-host-name is the hostname of the server pc. This will manually verify the setup between the server and client.

Boot Automation - WORK IN PROGRESS

To automate the process on boot, some files need to be modified. The files in question highly depend on the display manager (SLiM, kdm, gdm), window manager (kde, gnome, xfce, openbox), and their respective permissions (if they differ from a standard Arch install).

These are the steps for kdm/kde 4.3.4:

  1. Install the startup script at the bottom of the page.
  2. Edit /usr/share/config/kdm/Xsetup. This file executes the contents (as root) before the login window appears.
#Add the following lines under the Xsetup comment.
/etc/rc.d/synergyc stop   #verify synergy is closed
/etc/rc.d/synergyc start

These are the steps for SLiM:

Note: Note: Currently, there is no support when using inittab/SLiM because a pre-SLiM script cannot be executed.

Check http://synergy2.sourceforge.net for more information.

Windows

Download the newest "SynergyInstaller-version.exe" from SourceForge: http://sourceforge.net/project/showfiles.php?group_id=59275&package_id=58013

Run the installation wizard.

After installation, open the Synergy program.

Select the option "Use another computer's shared keyboard and mouse (client)" and type the hostname of the server computer in the textbox.

If you want to start the Synergy client everytime Windows starts, go to "Options -> Autostart".

Click "Test" to test the connection. You should get a new window displaying something like:

INFO: Synergy client 1.3.1 on Microsoft Windows Server XP
NOTE: started client
NOTE: connected to server

Close the window and click "Stop" to stop the test.

Click "Start" to start the client. You can use the tray icon (or the task manager) to stop the client.

Mac OS X

Locate the synergyc program in the synergyc folder and drag it onto the terminal window. The full path will appear in the terminal. Append the following:

-f server-host-name

Where server-host-name is the hostname of the server pc.

So it will look like this:

/path/to/synergyc/synergyc -f server-host-name

Then press Enter Check http://synergy2.sourceforge.net for more information

possible startscript

Example for a startscript (Linux Synergy Client) Make sure to perform chmod 755 after saving this file.

/etc/rc.d/synergyc

#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
#put the server in the following line
SERVERALIAS="glady"
PID=`pidof -o %PPID /usr/bin/synergyc`
case "$1" in
 start)
   stat_busy "Starting Synergy Client"
   [ -z "$PID" ] && /usr/bin/synergyc "$SERVERALIAS"
   if [ $? -gt 0 ]; then
     stat_fail
   else
     /usr/bin/xset r on
     add_daemon synergyc
     stat_done
   fi
   ;;
 stop)
   stat_busy "Stopping Synergy Client"
   [ ! -z "$PID" ] && kill -9 $PID
   if [ $? -gt 0 ]; then
     stat_fail
   else
     rm_daemon synergyc
     stat_done
   fi
   ;;
 restart)
   $0 stop
   sleep 1
   $0 start
   ;;
 *)
   echo "usage: $0 {start|stop|restart}"
esac
exit 0



Known Issues

  • If Arch is being used as a client in a synergy installation, the server may not be able to wake the client monitor. There are some workarounds, such as:
    • Execute this via ssh, if ACPI is enabled
xset dpms force on



Additional information

If you experience problems with your keyboard repeat on the client machine (linux host), simply type

/usr/bin/xset r on

in any console.

External Links

Synergy website: http://synergy2.sourceforge.net

Configuring screens and links: http://synergy2.sourceforge.net/configuration.html