If I connect the RasPi to my laptop by USB is there any software which allows my laptop to be KVM (Keyboard, Video, Mouse)?
PuTTY may work, but it doesn't have graphics.
If I connect the RasPi to my laptop by USB is there any software which allows my laptop to be KVM (Keyboard, Video, Mouse)?
PuTTY may work, but it doesn't have graphics.
I recall PuTTY having some X11 extension, but I use VNC which, I suspect, is LAN/WiFi only.
Setup RNDIS and you have a network connection between the two over USB.
Probably not what you're after, but when I need to commission or fix an otherwise headless Rpi I use an HDMI USB dongle on the laptop
There are network KVM solutions around that handle it all, making a physical device look just like a remote desktop session, but this approach needs no extra software, and just works.
(You probably wouldn't want to do graphics design or CAD with this setup, but for setting the hostname / Wifi / whatever and un-buggering the customised read-only boot script I use it is quite handy).
You’re going to need a network connection. It might be possible to establish one over USB but ethernet or wireless will be a lot more practical.
What OS is the laptop running?
If the laptop is running Linux then SSH and X11 forwarding is the most common option. You can enable it in your client’s config file (see ‘man ssh_config’ for documentation) or with the ‘ssh -X’ command-line option. Within the SSH session, run your graphical application(s).
If the laptop is running Windows then you have a couple of options.
(1) Enable WSL2 on Windows. Use SSH and X11 forwarding from inside a WSL2 shell, exactly as described above. This is my usual approach.
(2) Set up a remote desktop server on the Pi and use the Windows Remote Desktop application to connect to it. You get a complete desktop session this way.
On anything Debian-derived, to install the server:
apt install xrdp
If you don’t have a desktop environment (or some other kind of X session) installed you’ll need to install that too. If it’s a normal RPi OS install then you probably already have one.
Notes:
Probably also not what you're after, but I have a console adapter, which takes hdmi/vga/dp and kbd/mouse over a USB cable. It saves hunting for a "crash cart" in datacentres, a bit pricey for home use though ...
vjp2,
Yes. Better yet, the RasPi already comes with such software, and although you did not mention whats on your laptop it likely also has such software on board.
(I currently can't remember the names of both host and client prograsm, but a quick google should give you them).
You could also look for VNC (or something similar).
A remark though. You cannot just plug an USB cable into both the RasPi and laptop and expect it to work : Both are hosts, and as such will not talk to each other.
You would need a special USB host-to-host cable (with a hidden proxying 'puter somewhere in the cable), which needs to emulate a standard ethernet connection.
Regards, Rudy Wieser
PuTTY can do X11 forwarding over SSH, but you still need to provide an X display.
If you have a Pi 4 or 5, the USB-C port is dual-role and can be configured as a USB 2 device, where you can configure the Pi as a 'gadget' that appears to the PC as a network, keyboard, mouse, serial or storage device, using a regular USB-C cable (although you may need to power the Pi another way). The same goes for the microUSB USB port on the Zeroes. The 1A/3A models can also do it but you need a USB A to A cable.
Theo
Theo,
I knew the zeros' could do it, but thought that the "grown up" versions couldn't.
Thanks for the info. Now I only need to remember it ... :-|
Regards, Rudy Wieser
For Windows, Mobaxterm does all you need in a point and click way.
Except it is crippleware, or nagware
I use RealVNC client on Windows and Android to access RealVNC server (built into older versions of Rapsberry PiOS) or some other VNC server that is built into current versions of RPiOS. That works very well and gives me a virtual desktop.
It allows me to run a Pi "headless" (no KVM) and control it from the PC or phone/tablet. If I view the HDMI output from the Pi on a TV, I see the same screen on there as on the RealVNC client.
I also use Real VNC between two Windows PCs. The difference in that case is that all comms has to go via a cloud server so there is slight lag compared with Windows to Pi which is direct by TCP.
Doesn't work when connected through USB.
Is this
I said RNDIS tens of post back.
Don't know why the OP would insist on USB; he didn't mention what RPi he is using. But I agree on Ethernet or WiFi, even headless (SSH).
Maybe because he has no Ethernet on a PI Zero (w)
The request is how to do KVM stuff via a USB connection.
The first search hit on RNDIS for Linux was how they are trying to expunge the horribly insecure Microsoft protocol from the Linux kernel!
---druck
Oh noes!!!!!! MS and insecure protocols.
Yes, RNDIS is insecure. But do you know what, if you allow someone to plug any random device into your computer then insecure protocols are the least of your problems. If it's your device and your computer then it's no big deal.
It's still in the 6.12.x kernel on Raspberry Pi OS.
And when it's dropped then stand by for howls from just about every Android owner on the planet when they find USB Tethering no long works with Linux.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required