debauchee / barrier

Open-source KVM software
Other
27.46k stars 1.51k forks source link

Feature Request: Monitorless Server #478

Open LupenWonse opened 4 years ago

LupenWonse commented 4 years ago

Feature Request

It would be great to have the option to setup a server as "monitorless". Meaning that a server should handle mouse and keyboard on multiple clients without itself participating in the monitor layout.

Use Case

A user having multiple desktop systems wants to use a single mouse & keyboard for the entire setup. There is no main system which is always on.

Instead a lightweight server (e.g. a Raspberry pi) which is always on can handle the keyboard and mouse input on the systems. Therefore a single keyboard and mouse can be used with the systems no matter which one is currently on or off. It must be ensured that only the low power device is on.

ctsrc commented 4 years ago

I just commented on a similar issue (#447) and I'll reproduce the same comment here as it might be of use to you:

I haven't tested this with Barrier, but I've used programs like Xvfb, Xephyr and Xpra for similar and other purposes before – running graphical software on a headless server, or running software on a secondary virtual display in order to interact with them programmatically to capture screenshots while still being able to use the computer without interfering with the screenshots that are being produced.

It was a while ago since I last used any of those pieces of software but the section titled "Start at boot" in the Xpra article on the Arch Linux wiki is probably a good place to start no matter which distro you are using.

https://wiki.archlinux.org/index.php/Xpra#Start_at_boot

maxlock commented 4 years ago

I have this exact use case as well. As a workaround is it worth considering 1x1 pixel virtual monitor using xvfb etc for the headless node?

maxlock commented 4 years ago

I have this exact use case as well. As a workaround is it worth considering 1x1 pixel virtual monitor using xvfb etc for the headless node?

Updating my own question, It appears you may not be able to attach a real mouse/keyboard to xvfb and additionally the dummy xserver won't scale down to 1x1. So nothing really workable yet.

edit: may work on a raspi, I'm trying to do it in docker https://github.com/similicious/barrier-headless

evantandersen commented 2 years ago

Could this perhaps use linux-specific stuff? How does X11 read the input from the mouse/keyboard? Maybe barrier could open /dev/mouse etc directly?

Alex-bdrs commented 2 years ago

I have the issue like this: I have one monitor connected with two PC (win and linux). I can choose PC for monitor by button on it but I don't wont to have two keyboards.

epe commented 1 year ago

Any idea how the server could switch to a defined client by entering a key sequence?

My usecase is sharing a barcode scanner (wireless, though depending on a USB cable & charger) and making up a barcode with a sequence to switch to each client... Any ideas?