Cromulent
Posts: 20
Joined: Tue Jun 19, 2018 1:40 pm

Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 7:15 pm

I've got a Raspberry Pi 3 Model B+, and one of the things that stops me using it more is that I only have a small desk with a single keyboard and mouse. I'm under the impression that a KVM is what I want but can anyone recommend something to use so I can flip a switch and the keyboard and mouse switch to the Raspberry Pi and back again?

If I could do the same with an HDMI monitor that would be even better, but I can use the second monitor input if required. It is the keyboard and mouse problem that is my biggest concern.

k-pi
Posts: 896
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 7:25 pm

USB KVMs are expensive, so likely best solution would be to use an unpowered USB hub, just plug that in & out between them, with keyboard & mouse attached. There are HDMI splitters that allow input from different sources, so one attached to your monitor, with feeds from both computers should work.

fruitoftheloom
Posts: 19835
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 7:38 pm

Cromulent wrote:
Thu Jan 17, 2019 7:15 pm
I've got a Raspberry Pi 3 Model B+, and one of the things that stops me using it more is that I only have a small desk with a single keyboard and mouse. I'm under the impression that a KVM is what I want but can anyone recommend something to use so I can flip a switch and the keyboard and mouse switch to the Raspberry Pi and back again?

If I could do the same with an HDMI monitor that would be even better, but I can use the second monitor input if required. It is the keyboard and mouse problem that is my biggest concern.

Maybe ?

https://www.ebay.co.uk/itm/2-Port-HDMI- ... 2915521527
adieu

My other Computer is an Asus CS10 ChromeBit running Chrome Operating System.
HP Envy 4500 Wireless Printer supported by HPLIP software in Raspbian Buster.
Raspberry Pi Model 2B v1.1

User avatar
neilgl
Posts: 525
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 7:39 pm

You probably do not need any other keyboard / mouse or switch. Use VNC viewer on the PC to look at and use the pi desktop remotely (enable VNC on the pi).
For terminal text only stuff, enable SSH on the pi and use "putty" on the PC (an excellent terminal emulator).

Roken
Posts: 285
Joined: Sun Dec 31, 2017 4:35 pm
Location: UK

Re: Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 7:57 pm

Take a look at synergy - https://symless.com/synergy

Works a treat, and multi-platform.
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

User avatar
neilgl
Posts: 525
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 8:11 pm

The VNC and SSH are free of course.

pfletch101
Posts: 449
Joined: Sat Feb 24, 2018 4:09 am

Re: Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 8:55 pm

neilgl wrote:
Thu Jan 17, 2019 7:39 pm
You probably do not need any other keyboard / mouse or switch. Use VNC viewer on the PC to look at and use the pi desktop remotely (enable VNC on the pi).
For terminal text only stuff, enable SSH on the pi and use "putty" on the PC (an excellent terminal emulator).
+1
I have 3 Pis. I only attached a keyboard and monitor to the first two once (each) when I was setting them up; the third has never had a keyboard or monitor attached, since I did an entirely 'headless' install.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4956
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Solution to use same keyboard and mouse as desktop PC?

Thu Jan 17, 2019 10:52 pm

FWIW, and, since VNC is "much easier these days" and the devices I've used are difficult to get now, possibly of "historical interest" only, this what I used to work with multiple Pi's and a netbook until the netbook battery began to fail (sometime after Raspbian Jessie was released):
http://www.cpmspectrepi.uk/raspberry_pi ... ngHub.html
http://www.cpmspectrepi.uk/raspberry_pi ... tcher.html
The switching hub is still in use for keyboard/mouse switching between a Pi and the netbook's replacement, but since the latter works better with using it's VGA output and my current display/TV has two HDMI inputs as well as VGA I don't use the HDMI switch. Other Pi's are either used headless via PuTTY/SSH or VNC.
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

W. H. Heydt
Posts: 10364
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Solution to use same keyboard and mouse as desktop PC?

Fri Jan 18, 2019 12:50 am

Maybe I'm old fashioned but... For Pis, I use a 4-port HDMI/USB KVM switch. Specifically, an Iogear MiniView: https://www.iogear.com/product/GCS1794MDPKIT/

Because other equipment I have uses VGA and PS/2 connectors, I slave the HDMI/USB KVM to one set of ports on an 8-port Trendnet VGA & PS/2 KVM that I've had for a long time, going through the needed adapters. (And, yes, being able to switch among 11 devices is what I need.)

hippy
Posts: 5385
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Solution to use same keyboard and mouse as desktop PC?

Fri Jan 18, 2019 1:14 am

If one is on a budget, a multi-pole multi-way switch and some hacked USB extension cables could work, switching one hub with its mouse and keyboard to any number of Pi's, add a cheap HDMI selector and you are sorted.

It might be better to use a powered hub or powered from just one Pi so you don't have to switch 5V, and just common all the 0V rather than switching them.

A passive push-button SCART selector can be useful as it allows random selection, usually provides break before make, and you can hide the hub, even a Pi, in a large enough one.

I've got all the bits but haven't tried it yet. You might have bumped it up the To Do list. When I get it done I'll let you know how it fares.

LTolledo
Posts: 1549
Joined: Sat Mar 17, 2018 7:29 am

Re: Solution to use same keyboard and mouse as desktop PC?

Fri Jan 18, 2019 2:14 pm

I've used a 2-way 2-port USB switch for my RPi3B+ and RPi3B. Both have their own monitor though. I have 1 set of wireless keyboard and mouse the dongle of which is plugged into one of the ports. The rest of the RPis/other SBCs are accessed from either the RPi3B+ or RPi3B via VNC and/or SSH.

I got it when I was in Akihabara in Tokyo
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
HawaiianPi
Posts: 4277
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Solution to use same keyboard and mouse as desktop PC?

Fri Jan 18, 2019 10:24 pm

Depending on what you want to do with your Pi, using a software solution like SSH or VNC may be fine. I have several headless Pi computers I access through SSH or VNC. Either solution is easy to configure and completely free (for personal use).

SSH is a remote connection to the command line shell (you type commands and get text output, which is great with Raspbian Lite). Real VNC is a remote desktop system allowing you to access the Raspberry Pi Desktop GUI from another computer using the free RealVNC viewer software.

This is a screenshot from my Win10 laptop with an external monitor.
Win10_Raspbian_VNC_remote_desktop.jpg
Win10_Raspbian_VNC_remote_desktop.jpg (68.16 KiB) Viewed 649 times

The left side is my Windows desktop on the external monitor with an SSH terminal open to my Creeper Pie Minecraft SMP server (Raspbian Lite on a 3B+). The right side is the laptop's monitor with RealVNC viewer running full screen and connected to another Pi's Desktop (Raspbian Stretch with Desktop on a different 3B+). By moving my mouse back and forth between the 2 screens and the the SSH terminal I can use any of the three computers. And it didn't cost me anything more than the time it took to set it up (which isn't much, because it's not complicated).

So what's the catch? There's always a catch, right? With SSH, not so much. However, with any remote desktop connection there will be lag. If you use your Pi for things that don't need real-time feedback, then remote desktop works fine. What you can't do is play games or watch videos. You might be able to play turn-based strategy games, and there is an experimental work around for videos (not HD), but in general remote Desktop connections are not ideal for that kind of stuff.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Cromulent
Posts: 20
Joined: Tue Jun 19, 2018 1:40 pm

Re: Solution to use same keyboard and mouse as desktop PC?

Sun Jan 20, 2019 9:16 pm

Thank you all for the replies and sorry for the delay in replying to the questions.

I want to use the Raspberry Pi for operating system development so I need a hardware option because SSH or any other network connection won't be available. I've done some looking, and it appears that I can get an HDMI and USB KVM switch with four connections so I can use 3 Raspberry Pis and a desktop PC with the same monitor, keyboard and mouse.

You are right though that the KVM is not cheap. The one I am looking at costs £100 but I figure it is a one-off expense and will make everything much easier to use, so I think it'll be worth it.

hippy
Posts: 5385
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Solution to use same keyboard and mouse as desktop PC?

Mon Jan 21, 2019 9:43 pm

Got round to building my DIY KVM over the weekend -

£2.00 - Two-off, four-port USB hubs
£0.20 - Two-pole two-way slide switch
£6.00 - Three-way HDMI selector
------
£8.20

Two hubs because I wanted two USB plugs. Soldered one hub into the other so it's a seven port hub now.

Seems to be working well. There's some delay after switching while the Pi detects the hub and I have to switch the hub and HDMI separately, but for what I need it's good enough.

As an added bonus it can be used to create a powered hub without feeding back power to the Pi, and for another quid and soldering another cut-up cable I can turn it into an OTG hub.

Code: Select all

                                                    __
                      .-------------------- R 5V --|  |  USB
                      |       /O----------- W D- --|  | plug
                      | .---O/    .-------- G D+ --|  | 
                      | |      O--|-.  .--- B 0V --|__| Power
         __           | |         | |  |            __
   USB  |  |-- 5V R --' |     /O--' |  |    R 5V --|  |  
 Socket |  |-- D- W ----' .-O/      `--|--- W D- --|  |  USB
        |  |-- D+ G ------'    O-------|--- G D+ --|  | plug
 To Hub |__|-- 0V B -------------------^--- B 0V --|__|
 

Return to “Beginners”