FREE THOUGHT · FREE SOFTWARE · FREE WORLD

Share a Mouse and Keyboard between Windows and Linux

iconSynergy lets you easily share your mouse and keyboard between multiple computers on your desk, and it's Free and Open Source. Just move your mouse off the edge of one computer's screen on to another. You can even share all of your clipboards. All you need is a network connection. Synergy is cross-platform (works on Windows, Mac OS X and Linux).

synergy-monitors-demo

Synergy Server and Client

In synergy, the computer with keyboard and mouse you want to share is called server. I choose whichever computer has the best keyboard software as the server. In this case a Windows 8 machine is the server.

Now I can add as many clients as I want which will connect to the Windows 8 server. I like to have Macs and Linux boxes run the client.

Local Hosts Setup

First determine the IP addresses and host names for each machine you want to use with synergy and make sure each has a correct entry in each machines hosts file.

Hosts File Locations

192.168.1.220      alienlinux.localdomain         alienlinux
192.168.1.240      win8devil.localdomain          win8devil
Note: Check that the clients can reach each other by pinging both the IP, the alias (alienlinux) and the FQDN (alienlinux.localdomain).

Starting Synergy Client on Linux

The place that makes the most sense to start the synergy client is in your $HOME/.xinitrc file. That file is run by X on startup. You should stick this above the part of the file where the window manager is execed. Like above 'exec kde4'.

This uses the pidof command to test if synergyc is already running. If it is not already running it starts synergyc in the background.

/bin/pidof synergyc &>/dev/null || ( ( /usr/bin/synergyc -f --debug ERROR --name alienlinux --restart win8devil:24800 ) & )

Configuration for Windows Server

synergy.sgc

section: screens
	win8devil:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		switchCornerSize = 20
	alienlinux:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		switchCornerSize = 20
end

section: aliases
	win8devil:
		win8devil.localdomain
	alienlinux:
		alienlinux.localdomain
end

section: links
	win8devil:
		left = alienlinux
	alienlinux:
		right = win8devil
end

section: options
	heartbeat = 5000
	relativeMouseMoves = false
	screenSaverSync = false
	win32KeepForeground = false
	switchCorners = none 
	switchCornerSize = 0
end

Software keyboard linux Mac mouse Synergy Windows

 

 

Comments