Part 1 of this 2-part series covers x2x, a nifty software tool that lets you use the keyboard and mouse of one X terminal to control another. If you want to control more than 1 other machine, or the machines are on different platforms (Linux, Mac OS X, and Windows), Synergy is the tool.
My primary machine runs Debian 7.5 - aka Wheezy. I want to use the keyboard and mouse of this machine to control my secondary machine which runs Fedora 19. I have both good news and bad news for you - regarding installation.
First, the good news. Both the Debian and Fedora releases have included Synergy in their official package repositories. Installation is as simple as:
# For Debian $ sudo apt-get install synergy # For Fedora $ sudo yum install synergy
Now, the bad news. The 2 Synergy versions from the respective repositories, 1.3.8 for Debian Wheezy and 1.4.10 for Fedora 19, are incompatible. Starting Synergy on the secondary machine generated this error message:
2014-07-09T20:33:52 WARNING: failed to connect to server: incompatible client 1.3 You're using different versions of synergy on the client and server. You should use the same version on all systems.
The solution I recommend is to download the latest stable release - 1.5.0 at the time of writing - directly from the Synergy download site.
# For Debian $ sudo dpkg -i synergy-1.5.0-r2278-Linux-x86_64.deb # For Fedora $ sudo rpm -i synergy-1.5.0-r2278-Linux-i686.rpm
First, configure Synergy on the primary machine. Then, the secondary machine. The setup procedure is as follows:
- Run Synergy.
- Synergy Premium or not.
Synergy Premium is the non-free version. Not interested.
- Specify Server or Client.
- Enable Encryption.
After you click Finish, which screen to display next depends on whether you selected Client or Server.
- Configure Server (For primary machine only).
Next, add a new node representing the secondary machine to the grid. Drag the monitor icon, and drop it at the grid location relative to how it is physically positioned with respect to the primary machine. In my case, the secondary machine is located to the left of the primary machine.
- Configure Client (For secondary machine only).
Specify the IP address of the Server (the primary machine).
- Click Start.
This starts the actual Synergy Server - or Client - program using the latest configuration data.
Now, you can slide the mouse of the primary machine to the left, crossing the left edge, and into the screen of the the secondary machine. You can return to the primary machine by sliding the mouse to the right, crossing the right edge.
Instead of manually launching Synergy, you can set up auto-start for Synergy like any other X application. For GNOME 3, execute the command gnome-session-properties to bring up the Startup Applications Preferences app. For KDE 4, follow this chain of menus: Applications / Settings / System Settings / System Administration / Startup and Shutdown.
You can launch Synergy using the command-line interface.
For the primary machine:
- Prepare the Synergy configuration file (~/.synergy.conf).
$ cat > ~/.synergy.conf section: screens Laptop: Desktop1: end section: links Desktop1: left = Laptop Laptop: right = Desktop1 end section: aliases Desktop1: panther Laptop: localhost.localdomain end
- Start the Synergy Server.
$ synergys -f
The -f option means that the program is run in the foreground. The log messages are displayed in the terminal. Very useful for troubleshooting.
For the secondary machine, execute synergyc with the IP address of the primary machine:
$ synergyc -f 192.168.1.103