VNC server thoughts

Johannes Schlatow johannes.schlatow at genode-labs.com
Mon May 15 11:41:40 CEST 2023


Hi Cedric,

On 14/05/2023 12:51, ttcoder at 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/e881b9e236aa2c2d5083259f9dea68e40470556b/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.

> 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



More information about the users mailing list