wayvnc
wayvnc copied to clipboard
multiple outputs?
hi, is there a way to provide multiple outputs? if not, what should be done to add such feature? thanks!
There is a neatvnc issue for this: https://github.com/any1/neatvnc/issues/19
Neatvnc already has the public interface for it (see nvnc_display), but it's not implemented yet behind the scenes. What's required to implement the feature is to move the encoders from struct nvnc into struct nvnc_display, some more refactoring and then reading the display layout from the compositor in wayvnc and have it create an nvnc_display per output.
If/when you do this, can you make it optional please? I actually like the fact that wayvnc only shows one of my displays (fits better in my client!)
As discussed elsewhere, we have so far identified 5 different use-cases around what to do when VNC connects to a remote system with multiple displays:
- [ ] Show all the displays as one giant screen (this is what x11vnc does)
- Split into its own issue: #226
- [x] Show only one display in the VNC client, but have a mechanism (keybind maybe?) to switch to other displays
- Update: implemented via
wayvncctl output-cycleandwayvnctl output-set
- Update: implemented via
- [x] Show only one display in the VNC client, and temporarily disable all other displays (so all windows & desktops move to this display), and undo on disconnect (I like this for sway)
- Update: implemented for sway-1.7 via examples/single-output-sway
- [ ] Create a new display as a side-car and extend the existing displays with it (effectively use a vnc client as an additional monitor!)
- Probably works with sway already; just needs documentation
- Split into its own issue: #225
- [x] Create a side-car output and move ALL content to it, and undo on disconnect (I like this better than the 2nd option above)
- Update: implemented for sway-1.8 (and later) via examples/single-output-sway
I have completed a series of PRs that implement part of this.
#171 introduces the wayvncctl command line tool, which can send IPC messages to a running wayvnc instance. And one of the commands I implemented is set-output which allows runtime switching of the Wayland output device.
So now you can set up a keybinding in your environment to run:
wayvncctl set-output --cycle=next
which will cycle through all your multiple outputs on-the-fly.
And #178 introduces wayvncctl events that can be used to run a script on every client connect/disconnect, so some clever scripting could maybe accomplish more of these scenarios!
Just finishing up #200 which adds an example script to disable all outputs but one when a client connects, and re-enable them on disconnect.
In light of the current state of support, I'm closing this issue and opening a new one for each of the outstanding use cases.
Closing this because multiple outputs are now pretty nicely supported.
@rpodgorny : If the work done so far doesn't meet your needs, please comment on the new related issues (#225 or #226), or open a new issue with more info about what behaviors you'd like to see with wayvnc and multiple outputs.