This blog is about the Linux Command Line Interface (CLI), with an occasional foray into GUI territory.
Instead of just giving you information like some man page, I hope to illustrate each command in real-life scenarios.

Search This Blog

Saturday, July 12, 2014

Share the keyboard and mouse using Synergy - part 2/2

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.

Installation

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:

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.

Setup

First, configure Synergy on the primary machine. Then, the secondary machine. The setup procedure is as follows:

Run Synergy.

You will ﬁnd the Synergy program under the Accessories menu for Debian GNOME, and
Applications/Utilities for Fedora KDE.

Synergy Premium or not.

Synergy Premium is the non-free version. Not interested.

Specify Server or Client.

For the primary machine - the one with the keyboard and mouse that you want to use - select Server.
Select Client for the secondary machine.

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).

The following screen is displayed for configuring the primary machine.

Click Configure Server.

By default, the grid contains a single node labeled with the hostname of the primary machine ('panther').
Double click the node to edit its settings.

Optionally, enter a new Screen Name, say 'Desktop'. Then, add the hostname ('panther') as an alias.

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.

Edit the still unnamed secondary machine. Give it a meaningful screen name. Add the hostname as the alias.

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.

Auto-starting Synergy

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.