Manjaro Difference between revisions of "Keyboard and Mouse Sharing"

Difference between revisions of "Keyboard and Mouse Sharing"

From Manjaro
imported>Handy
(Marked this version for translation)
 
(23 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Synergy - Mouse & k/board Sharing Across Multiple OS's==
<languages/>
__TOC__
<translate>
{{note|This page it out of date.  It should be updated to include barrier as well}}
= Overview = <!--T:1-->


[http://synergy-foss.org/ Synergy] is a brilliant piece of software that doesn't require much effort to get going, Though  faultless autostart did require some configuration.
<br clear="all" />
==So What Does Synergy Do?== <!--T:2-->


 
<!--T:3-->
 
==Introduction==
 
Synergy is a brilliant piece of software that doesn't require much effort to get going, Though after that it required me some more time to get it to function just how I want it to = faultless autostart.
 
==So What Does Synergy Do?==
 
I can now use my favourite keyboard & mouse to operate two computers (synergy will do plenty more computers if you have them) one at a time of course...  
I can now use my favourite keyboard & mouse to operate two computers (synergy will do plenty more computers if you have them) one at a time of course...  


The two machines are set up to load synergy when they boot, & it doesn't matter what order the server or the client is booted in, when they are both up, synergy automatically does its stuff, using next to no system resources.
<!--T:4-->
With two machines set to load synergy when they boot it doesn't matter what order the server or the client is booted in.  


Synergy uses next to no system resources and even shares the clipboard as well!
<br clear="all" />
==Bug Awareness== <!--T:5-->


==The Three B's - BS, Blurb & Bug:==
<!--T:6-->
Running Openbox, I can't make use of synergy until OB has loaded. But some Linux display managers you can use it before hand.


Years ago I paid a lot of money for a really good quality four machine handling KVM switch box. It worked very well via keyboard command until the day it failed. :(  In those days when I was fixing computers, that KVM was far superior to synergy because it was hardware that was system independent & worked on anything that had a working BIOS.
While it should already be fixed, there is an old bug that can produce 1-2 second black screens. For most this is fixed by issuing the command 
xset -dpms
If necessary, the command can be placed in ''~/.xinitrc'' so the problem never appears.  
<br clear="all" />
==The Synergy Server:== <!--T:7-->


For my needs today, the synergy system shits all over a KVM, though there are varying limitations which are dictated by the display manager / OS you are using.
===Installation:=== <!--T:8-->


Running Openbox, I can't make use of synergy until OB has loaded. On some Linux display managers you can use it before hand & I'm sure that OS/X & the various Windows all have their strengths & weaknesses in this regard. In the end this doesn't really matter to me as I spend very little time outside of OB anyway. So for my current computer usage synergy is all but gob smacking perfect.  
<!--T:9-->
Rather than me duplicating it, the Archwiki has a great page on [https://wiki.archlinux.org/index.php/Synergy Synergy installation].


All but? Yes, just one tiny bug that effects a few of us. For some users when moving the mouse from one computer screen to another you get a one or (far more rare) a two second black screen.
<br clear="all" />
 
===Configuration:=== <!--T:10-->
I got the one second one when moving from the client to the server. For most this is fixed by issuing the command  '''xset -dpms'''. This works for me so I issue it in ''~/.xinitrc'' so the problem never appears.
 
This problem has been around for about a year, & someone has written a patch for it inside of the last month, so I'll hang back & wait for the next release which I expect to have killed this bug, in the mean time I no longer know it exists.
 
I'm sure that this bug no longer exists, don't be put off by it.
 
 
==The Synergys Server:==
 
 
 
===Installation:===
 
Rather than me duplicating it, the Archwiki has a great page on [https://wiki.archlinux.org/index.php/Synergy/ Synergy installation].
 
 
===Configuration:===


<!--T:11-->
My '''/etc/hosts''' file follows which should speak for itself:
My '''/etc/hosts''' file follows which should speak for itself:


 
<!--T:12-->
192.168.1.3            rightpc.localdomain  rightpc        ## the HP server
192.168.1.3            rightpc.localdomain  rightpc        ## the HP server
  192.168.1.6            leftpc.localdomain      leftpc          ## the iMac client
  192.168.1.6            leftpc.localdomain      leftpc          ## the iMac client


<br clear="all" />
===Synergy.conf=== <!--T:13-->


===Synergy.conf===
<!--T:14-->
 
Here is a great start (a complete solution in my case) for a very smoothly running pair of machines (easily edited for more though), via one mouse & keyboard being connected to the synergys server - this '''synergy.conf''' is the server configuration file which does the job faultlessly for me:
Here is a great start (a complete solution in my case) for a very smoothly running pair of machines (easily edited for more though), via one mouse & keyboard being connected to the synergys server - this '''synergy.conf''' is the server configuration file which does the job faultlessly for me:


 
<!--T:15-->
 
#synergy.conf
#synergy.conf
   
   
  section: screens
  section: screens
Line 97: Line 91:
  switchCornerSize = 4
  switchCornerSize = 4
  end
  end
 
<br clear="all" />
This '''synergyc.conf''' file suits my uses perfectly, I found it on the Arch wiki, & it needed no functional modification. I put it in /home/handy as a <.dot> file i.e. ~/.synergy.conf .
This '''synergyc.conf''' file suits my uses perfectly, I found it on the Arch wiki, & it needed no functional modification. I put it in /home/handy as a <.dot> file i.e. ~/.synergy.conf .


OK, that is the server taken care of above, now its time for;-
<br clear="all" />
 
==The Synergy Client(s):== <!--T:16-->
==The Synergy Client(s):==
 
Install synergy.


<!--T:17-->
Install synergy


<!--T:18-->
sudo pacman -S synergy


===Client /etc/hosts:===
<br clear="all" />
===Client /etc/hosts:=== <!--T:19-->


<!--T:20-->
Edit the '''/etc/hosts''' file, mine is below for those that do need to reference, & if you do make sure you compare it with the server side one posted earlier on this page:
Edit the '''/etc/hosts''' file, mine is below for those that do need to reference, & if you do make sure you compare it with the server side one posted earlier on this page:


  192.168.1.6    leftpc.localdomain              leftpc          ## the iMac client
  <!--T:21-->
192.168.1.6    leftpc.localdomain              leftpc          ## the iMac client
  192.168.1.3    rightpc.localdomain            rightpc        ## the HP server [/code]
  192.168.1.3    rightpc.localdomain            rightpc        ## the HP server [/code]


<br clear="all" />
===~/.xinitrc=== <!--T:22-->


 
<!--T:23-->
====Synergy shares the clipboard too!!!====
 
''(By the way, due to synergy I could just use the keyboard shortcuts to copy the above from the Terminal on the client & then move my mouse over to the server where I'm typing this & then use the keyboard to paste it! '''Synergy shares the clipboard too!!!''' Which is brilliant.)''
 
 
 
===~/.xinitrc===
 
Add the following to the '''~/.xinitrc''' file (guess how I copied it?):
Add the following to the '''~/.xinitrc''' file (guess how I copied it?):


  synergyc -d ERROR rightpc
  <!--T:24-->
 
synergyc -d ERROR rightpc
No need for the xset -dpms bug fix on this machine thankfully (It extremely likely that this bug is now long dead).
 
 
==Conclusion:==
 
The server is where the hardest work is, beyond that it comes down to getting your auto-start sorted so that it just works no matter which machine(s) come on in what order. For me the above works in that regard perfectly, (once Openbox has loaded).


I hope the above makes the info that is already on the net just a little easier to optimise for your usage.
<br clear="all" />
==Conclusion:== <!--T:25-->


I'm SO happy to at last not be swapping the ***king keyboards & mouses all the time, it drives me ***king nuts.
<!--T:26-->
The server is where the hardest work is, beyond that it comes down to getting your auto-start sorted so that it just works no matter which machine(s) come on in what order. For me the above works in that regard perfectly once Openbox has loaded.
</translate>
[[Category:Contents Page{{#translation:}}]]

Latest revision as of 17:43, 7 September 2021

Other languages:
English • ‎русский
Note
This page it out of date. It should be updated to include barrier as well

Overview

Synergy is a brilliant piece of software that doesn't require much effort to get going, Though faultless autostart did require some configuration.

So What Does Synergy Do?

I can now use my favourite keyboard & mouse to operate two computers (synergy will do plenty more computers if you have them) one at a time of course...

With two machines set to load synergy when they boot it doesn't matter what order the server or the client is booted in.

Synergy uses next to no system resources and even shares the clipboard as well!

Bug Awareness

Running Openbox, I can't make use of synergy until OB has loaded. But some Linux display managers you can use it before hand.

While it should already be fixed, there is an old bug that can produce 1-2 second black screens. For most this is fixed by issuing the command

xset -dpms

If necessary, the command can be placed in ~/.xinitrc so the problem never appears.

The Synergy Server:

Installation:

Rather than me duplicating it, the Archwiki has a great page on Synergy installation.


Configuration:

My /etc/hosts file follows which should speak for itself:

192.168.1.3             rightpc.localdomain  rightpc         ## the HP server
192.168.1.6             leftpc.localdomain      leftpc          ## the iMac client


Synergy.conf

Here is a great start (a complete solution in my case) for a very smoothly running pair of machines (easily edited for more though), via one mouse & keyboard being connected to the synergys server - this synergy.conf is the server configuration file which does the job faultlessly for me:

#synergy.conf

section: screens
	leftpc:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		switchCorners = none +top-left +top-right  +bottom-left +bottom-right 
		switchCornerSize = 0
	rightpc:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		switchCorners = none +top-left +top-right +bottom-left +bottom-right 
		switchCornerSize = 0
end

section: aliases
leftpc:
192.168.1.6
rightpc:
192.168.1.3
end

section: links
	leftpc:
		right = rightpc
	rightpc:
		left = leftpc
end

section: options
	heartbeat = 1000
	relativeMouseMoves = false
	screenSaverSync = false
	win32KeepForeground = false
	switchCorners = none +top-left +top-right  +bottom-left +bottom-right 
	switchCornerSize = 4
end


This synergyc.conf file suits my uses perfectly, I found it on the Arch wiki, & it needed no functional modification. I put it in /home/handy as a <.dot> file i.e. ~/.synergy.conf .


The Synergy Client(s):

Install synergy

sudo pacman -S synergy


Client /etc/hosts:

Edit the /etc/hosts file, mine is below for those that do need to reference, & if you do make sure you compare it with the server side one posted earlier on this page:

192.168.1.6     leftpc.localdomain               leftpc          ## the iMac client
192.168.1.3     rightpc.localdomain             rightpc         ## the HP server [/code]


~/.xinitrc

Add the following to the ~/.xinitrc file (guess how I copied it?):

synergyc -d ERROR rightpc


Conclusion:

The server is where the hardest work is, beyond that it comes down to getting your auto-start sorted so that it just works no matter which machine(s) come on in what order. For me the above works in that regard perfectly once Openbox has loaded.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.