question

Obo avatar image
Obo asked

VNC Access Wrong Colours and Slow

I currently have a setup I believe is similar to Victron's Remote Console setup. A Venus sets up a reverse SSH port forward, forwarding information from some port on a server I set up to port 5900 on the Venus. On the server there is a websockify WebSocket to TCP proxy. On a web page's front end, I'm running noVNC to make a WebSocket request to this server which then proxies over to the port on the server that forwards to port 5900 on the Venus.

I've gotten the display to work, but it's not the usual Victron color and also doesn't seem to draw only the area of the screen that has changed, or maybe draws every frame buffered instead of only the last one. I believe on the VRM Portal one of these approaches is taken as the image of the console will sometimes tear, but it's faster and more responsive than my current setup.

Any ideas of how to get the normal console view, and how to allow VNC to use the "optimised" drawing I referred to?

By the way, the display is still the normal Victron blue on the VRM Portal. It's only when accessed with my implementation that it's different.

Thanks!


screenshot-from-2021-11-12-14-55-56.pngImage Caption


remote console
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
Obo avatar image
Obo answered ·

I’ve found the answer. The problem stems from the fact that the VenusOS VNC server sends colour data in BGR instead of RGB, and it ignores the request from the noVNC client to send data in RGB. To fix this, one must swap the Red and Blue bytes in the core/decoders/hextile.js file whenever a data array is used to draw a new rectangle on the screen.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.