Keyboard and Mouse Switch

Having trouble with your Linux system?

Keyboard and Mouse Switch

Postby Triviadave » Fri Dec 16, 2016 9:21 am

Does anyone know of a keyboard and mouse switch which works with Linux and Windows?
Ideally for 3 devices, although 2 would also be acceptable. And, as is always the case, spending less would be great (I did look at KVM switches, but they tend to be quite expensive if you want video included).
I have some slightly awkward requirements to make things interesting though.
My two main computers are a dual booting Linux/Windows box, and a Linux box (probably) being set up as a server. I also have a Raspberry Pi which is connected up to one of the monitors, making the whole set up a bit of a mess (3 keyboards on one desk is horrible).
I don't think a software solution would work (but am happy to be wrong on this - fewer cables is always good) because my monitor set up changes frequently (I have two pcs and 2 monitors, and can onnect either box to either monitor, or both, in any configuration (by switching inputs on each monitor) so one monitor may not always be "to the right" of the other.
A keyboard toggle would be ideal (I think), as my main keyboard has a macro function, which can be stored on the keyboard, so I could just assign a button to each device.
Any suggestions gratefully received.
Triviadave
 
Posts: 24
Joined: Fri Mar 28, 2014 6:02 pm

Re: Keyboard and Mouse Switch

Postby johnlane » Fri Dec 16, 2016 2:22 pm

Have you thought of a software solution?

It might work if the 3 machines form part of your desktop. Search for "synergy". I am not sure how windows would fit into that, however...
johnlane
 
Posts: 33
Joined: Fri Feb 21, 2014 11:22 am

Re: Keyboard and Mouse Switch

Postby Triviadave » Sat Dec 17, 2016 12:21 pm

johnlane wrote:Have you thought of a software solution?

It might work if the 3 machines form part of your desktop. Search for "synergy". I am not sure how windows would fit into that, however...


Hi John, thanks for the suggestion, I had looked at Synergy and it does work with Windows, but relies on the monitors being in a "fixed" location relative to each other (and each computer gets 1 monitor). Given the way I use the computers (I will often use one computer with both monitors, but I think using Synergy when I cross from one monitor to the other it would swap to the other computer), I can't guarantee that.
Triviadave
 
Posts: 24
Joined: Fri Mar 28, 2014 6:02 pm

Re: Keyboard and Mouse Switch

Postby Triviadave » Thu Feb 23, 2017 8:16 pm

Just thought I would update this thread with a few new developments. Apologies, it's a long one.
Well, I eventually bit the bullet and ordered a cheap USB switch from ebay. Following a small issue where I used the wrong power supply for a USB hub, releasing the smoke that makes electronic devices work (and bizarrely a whiff of TCP), a quick trip to buy a new keyboard (doh!!!), a play around to discover that you don't need to power a USB hub just for a keyboard and mouse (DOH!!!), and another cheap USB switch, I had a nice little box blu-tacked to my desk ready to go.

I fired up the computers, the initial setting was for the windows PC. I logged in, everything ran smoothly. It worked exactly as I wanted, then I switched to the linux box - perfection. It is available more or less instantly and again, worked with no issues. I switched back and after about ten seconds the keyboard and mouse were available on the windows PC. This became a bit of a theme. Windows doesn't appear to like rapid switching of things it was using. Eventually, the cheap nature of the switch showed itself, and one channel of the switch stopped working. Back to square one.

At this point I spoke to someone who uses Synergy on a daily basis, who convinced me that it was very good, and would probably be suitable for what I wanted. He basically explained that Synergy doesn't see individual monitors, but a desktop, so it doesn't matter how many monitors you have on one desktop, it can still work the way I wanted it to, he also said that it would work with more than two monitors (which had been another one of my concerns).

After much umming and ahhing (and getting frustrated about having two keyboards on my desk), I decided to buy Synergy and see what it could do. Initially, I decided to set the windows PC up as the server as it was in use for more of the time than the linux box. Once the server was set up, I setup the client on the linux box, and tried the connection. It worked first time. It was a bit eerie seeing the mouse jump from one desktop to the other, but there seemed to be a bit of lag when switching back to the windows desktop, and then when I tried to use the linux box, there were periods when the keyboard and mouse would just stop working. Following my experience with the USB switch, I decided to try the linux box as the server. It worked perfectly... for about twenty minutes, then the connection would freeze and I would get kicked off the windows desktop, and couldn't reconnect. Sometimes I could restart the server successfully, but sometimes not. It was effectively useless, as I couldn't rely on it.

I discovered that when it was closed (in windows), Synergy would leave a task running in the background. I stopped the task, restarted Synergy and it worked. For a few hours this time, and then stopped again. It would do this semi-repeatably, run for a random amount of time, then stop. Sometimes, I could stop the background task and restart Synergy and all would be well for a while, but not always. Additionally, I would have to manually change the IP address the client was looking for if the server was ever restarted, which was a pain in the proverbial without a keyboard and mouse. I did a bit of mostly unsuccessful googling about the background task, but discovered an interesting comment that I hadn't seen anywhere else. Rahter than define the IP address as shown on the server window, you could just use ServerName.local. I thought that might be handy as it would stop me having to manually change the IP address every time the server restarted, so tried it out. Suddenly the connection was stable, as Synergy starts automatically on start-up in windows, you can even use the keyboard and mouse from the other computer to log in. It is brilliant.

You setup Synergy as a 3x3 grid of desktops, and where there is a common border between two desktops, you can pass across the border onto the other desktop, with barely a stutter (occasionally the cursor disappears for a second when you switch but I think it still responds). There are still a few niggles though. The extra buttons on my mouse don't work off the main desktop, I am struggling to set up more than one additional desktop, and I am struggling to get it installed on my Raspberry Pi (I have seen successful reports for older versions, but don't have th knowledge yet to sort it for the latest version of Synergy). The biggest problem though, is that if you try to play games on the windows PC (the main reason I use it) the mouse is completely uncontrollable so I still have two mice on my desk, but have gone down to one keyboard. Hopefully at some point I will reduce further still.
Triviadave
 
Posts: 24
Joined: Fri Mar 28, 2014 6:02 pm


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron