I've just released #wayvnc v0.6.0 with a new and shiny control interface.
See release announcement here: https://github.com/any1/wayvnc/releases/tag/v0.6.0
Special thanks go to @lack for implementing the control interface.
As usual, this release is also accompanied by releases of the support libraries: Neat VNC and aml. See https://github.com/any1/neatvnc/releases/tag/v0.6.0 and https://github.com/any1/aml/releases/tag/v0.3.0
So it looks like my wayvncctl IPC and command line tool are almost all grown up!
It's come a long way since my vague idea back in November, and I'm proud of what it's become, largely thanks to the patient guidance of @andriyngvason and all the work he's already done on #wayvnc
There we go. About 3 months after looking into it, I have opened the last PR in a series that implements the feature I wanted in #wayvnc
https://github.com/any1/wayvnc/pull/200
It was fun, and now there's more I want to do in the project!
#wayvnc #opensource #software #DeveloperStories
There we go. About 3 months after looking into it, I have opened the last PR in a series that implements the feature I wanted in #wayvnc
Now it's time to add more commands and events:
• command to list all clients
• command to list all outputs
• command to disconnect a client
• event when output capture device changes
• command to terminate #wayvnc
Each one is in its own git commit, but all in the same area, so there's the age-old question; one PR per command (but they have to be done sequentially else code conflicts), or one bigger PR that's harder to review…
The maintainer preferred one big one:
https://github.com/any1/wayvnc/pull/192
So that's close... But if #wayvnc isn't running my example-event script doesn't start, and if wayvnc exits my script exits too.
So I added optional '--wait' and '--reconnect' flags to wayvncctl; the '--wait' flag will poll for the Unix domain socket before running a command or listening for events, and '--reconnect' will, as the name implies, try to reconnect if wayvnc edits.
https://github.com/any1/wayvnc/pull/185
And events that indicate when each of these things happen:
So on with https://github.com/any1/wayvnc/pull/178 : Here I built that #wayvnc event mechanism, plus a registration IPC so that we only send events to control socket clients that are expecting them. And of course started with the events I wanted most: client-connected and client-disconnected which give details about a VNC client plus the current connected client count.
I added an example script showing how to use a bash read-loop and #jq to have a function that fires when the connection count changes.
So wayvncctl was born (or will be, next release). I can bind a key in #sway to run:
wayvncctl set-output --cycle=next
And my #wayvnc session cycles through the Wayland outputs - a working mechanism to use all the outputs!
But what about my original dream to temporarily disable inputs when VNC connects, and restore when VNC disconnects? The control socket allowed remote control, but I needed asynchronous events that #wayvnc could send out when, say, a new VNC session was established…
After some experimentation, I was able to refactor the #wayvnc main code to do just that: stop capturing one output, move the virtual inputs, and start capturing another!
To test it I had code that caught SIGUSR1 and rotated through the outputs. Fun, but not a great user interface. So I went about making a key-bind engine in wayvnc, and I submitted the PR:
https://github.com/any1/wayvnc/pull/163
Soon after, I got a wonderful review from the maintainer @andriyngvason - it was not quite ready…
No! I can't. There didn't seem to be any way to get #wayvnc to run a script for me, so I opened a GitHub issue asking for what I wanted, fully intending to implement it myself: https://github.com/any1/wayvnc/issues/158
In the course of this great discussion, we arrived at 3 important conclusions:
• Wayvnc running a script itself has security implications
• An external control socket like swaymsg could do all this and more
• Multi-output support has more interesting use-cases
So time to consider the use-cases…
Yet again, #sway came through with exactly the timing I needed. If I connect to VNC and just disable the right-most output, everything automatically shifts to the one remaining output. No need to even involve kanshi or reconfigure waybar:
swaymsg output DP-3 disable
Then when I'm done, this brings it back again:
swaymsg output DP-3 enable
This actually worked very nicely!
Next: Can I automate this so the "disable" happens when I connect over #wayvnc, and "enable" when I disconnect...?
I'm currently implementing a control socket and related wayvncctl command line tool for #wayvnc, and it's been a fun journey! Thought I'd share my (ongoing) experiences.
It all began, as all fun #OpenSource projects begin, with an itch I needed to scratch....
#OpenSource #developer #OpenSourceSoftware #development #stories
#wayvnc #opensource #developer #opensourcesoftware #development #stories
I haven't coded in #C for a while, but have been working on a fun contribution to #wayvnc over the last few weeks. The kindness of the main dev on IRC and GitHub reviews as I revive my rusty C skills reminds me why I love #opensourcesoftware ❤️
#c #wayvnc #opensourcesoftware
Actually, can any one tell me what "average reported frame damage" means? This is in the context of #wayvnc, and my "frame damage" starts out low, but pretty quickly climes to 95.9% and holds there -- and my screen starts flickering. I'm _assuming_ that those two are related, but I don't really know what "frame damage" means.
all the Internet results seem to assume that I'm concerned about damage to the frame of my car and I'm _pretty_ sure my car isn't involved in getting pixies to my monitor
Actually, can any one tell me what "average reported frame damage" means? This is in the context of #wayvnc, and my "frame damage" starts out low, but pretty quickly climes to 95.9% and holds there -- and my screen starts flickering. I'm _assuming_ that those two are related, but I don't really know what "frame damage" means.
all the Internet results seem to assume that I'm concerned about damage to the frame of my car and I'm _pretty_ sure my car isn't involved in getting pixies to my monitor
Really nice, since recently #swaywm supports vnc via #wayvnc. Just only gave it a real quick test and it worked on my local network through an SSH tunnel, just have to pick a sweet #wayland vnc tool - #gnome #vinagre appears to be a bit buggy
#wayland #vinagre #swaywm #wayvnc #gnome