Dear Genodians,
Late this week I decided it was time to add a VNC server to my "suite", spent a bit of time on that, here's my feedback. Skip to bottom for "actionable" stuff.
My first instinct was to grep repos/ genode-world for the string "vnc" since those two are my go-to places to find ports.
Found VNC-related libs and a "hello world" style example server. (its Makefile seems to need tweaking BTW).
Checked out https://genode.org/about/challenges and indeed VNC server is listed there as a potential future task. So that settled it, I thought, I will have to wait until someone volunteers (or volunteer myself). But reading more carefully, I noted it referenced the old "Framebuffer" interface instead of the up-to-date "Gui" interface, and "Input" instead of "Events". So that prompted me to also grep my internal notes and... found a reference to https://genodians.org/jschlatow/2021-06-09-vnc-server , which addresses my need neatly. Yay !
It seems to require a one-liner patch though, otherwise it crashes with a "invalid zero alloc" style message. So I just went ahead and hardcoded a non-empty initial _area (setting it to 320,200) on the first line of this constructor here (_area gets set to the correct screen size later in the code path anyway). Seems leaving it set to "capture.screensize" sets it to an empty area otherwise.
https://github.com/jschlatow/goa-pkgs/blob/e881b9e236aa2c2d5083259f9dea68e40...
Will look into adding password support etc but I'm already quite a happy camper at any rate, this propels me way ahead.
***
Some low-priority recommendations (for after the 23.05 release when the dust settles):
* maybe update (or remove) the "challenges" entry about a VNC server * maybe look into "make test/ vnc server example" : I solved the "example.o not found" error with a hackish hardcoding of the full path (strange that it's needed, the "vpath" gmake directive should suffice? my gmake skills are close to zero so not sure) * maybe look into the "zero alloc" crash.
Cedric
Hi Cedric,
On 14/05/2023 12:51, ttcoder@netcourrier.com wrote:
Dear Genodians,
Late this week I decided it was time to add a VNC server to my "suite", spent a bit of time on that, here's my feedback. Skip to bottom for "actionable" stuff.
My first instinct was to grep repos/ genode-world for the string "vnc" since those two are my go-to places to find ports.
Found VNC-related libs and a "hello world" style example server. (its Makefile seems to need tweaking BTW).
Checked out https://genode.org/about/challenges and indeed VNC server is listed there as a potential future task. So that settled it, I thought, I will have to wait until someone volunteers (or volunteer myself). But reading more carefully, I noted it referenced the old "Framebuffer" interface instead of the up-to-date "Gui" interface, and "Input" instead of "Events". So that prompted me to also grep my internal notes and... found a reference to https://genodians.org/jschlatow/2021-06-09-vnc-server , which addresses my need neatly. Yay !
It seems to require a one-liner patch though, otherwise it crashes with a "invalid zero alloc" style message. So I just went ahead and hardcoded a non-empty initial _area (setting it to 320,200) on the first line of this constructor here (_area gets set to the correct screen size later in the code path anyway). Seems leaving it set to "capture.screensize" sets it to an empty area otherwise.
https://github.com/jschlatow/goa-pkgs/blob/e881b9e236aa2c2d5083259f9dea68e40...
In what scenario have you encountered the zero-alloc crash? In goa? On Sculpt? I've been recently made aware of the zero-screensize-issue by the screenshot component but haven't seen any issue with the vnc server so far.
Will look into adding password support etc but I'm already quite a happy camper at any rate, this propels me way ahead.
Password support would be a very welcome contribution.
Some low-priority recommendations (for after the 23.05 release when the dust settles):
- maybe update (or remove) the "challenges" entry about a VNC server
- maybe look into "make test/ vnc server example" : I solved the "example.o not found" error with a hackish hardcoding of the full path (strange that it's needed, the "vpath" gmake directive should suffice? my gmake skills are close to zero so not sure)
- maybe look into the "zero alloc" crash.
Thanks for the feedback. I already fixed the example.o issue [1] and will be looking into the zero-alloc crash once I'm able to reproduce it.
[1] https://github.com/genodelabs/genode-world/issues/327
Cheers Johannes
Thank you for your response Johannes,
It seems to require a one-liner patch though, otherwise it crashes with a
"invalid zero alloc" style message.
So I just went ahead and hardcoded a non-empty initial _area (setting it
to 320,200) on the first line of this constructor here (_area gets set to the correct screen size later in the code path anyway). Seems leaving it set to "capture.screensize" sets it to an empty area otherwise.
https://github.com/jschlatow/goa-pkgs/blob/e881b9e236aa2c2d5083259f9dea6
8e40470556b/vnc_server/src/vnc_output.h#L162
In what scenario have you encountered the zero-alloc crash? In goa? On Sculpt? I've been recently made aware of the zero-screensize-issue by the screenshot component but haven't seen any issue with the vnc server so far.
Neither, actually I build vnc_server manually, and then integrate it into my proprietary "software suite" using my Jam scripts. But today I've prepared a way to replicate the problem by compiling/building from my publically available repo on chiselapp.com, or even simply with the actual contents of the config file I provide in the ticket below.
Will look into adding password support etc but I'm already quite a happy
camper at any rate, this propels me way ahead.
Password support would be a very welcome contribution.
Then I should probably open a ticket to coordinate/upstream my changes if I can pull that off. Won't happen for a few months yet though.
Thanks for the feedback. I already fixed the example.o issue [1] and will be looking into the zero-alloc crash once I'm able to reproduce it.
Filed ticket #328 on genode-world. See you there when you have spare time (this issue can wait) :-)
Cedric