VNC server thoughts

ttcoder at netcourrier.com ttcoder at netcourrier.com
Sun May 14 12:51:32 CEST 2023


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

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








More information about the users mailing list