Add a HTML5 client for the remote desktop protocol

Operating Systems / Haiku - Michael Lotz [mlotz.ch] - 21 November 2017 21:18 EST

It is implemented using websockets and canvas darwing. It directly speaks the remote desktop protocol. A websocket proxy that translates the TCP connection into a usable form is needed. Websockify works for this out of the box directly under Haiku.

Note that not all drawing modes are implemented, and most of them don't have a good match on the canvas side. Fonts are also not properly supported yet. A sans serif font will be used on the client for everything and the metrics between the client and server will diverge and cause drawing artifacts.

Usage:

- Run an application with a target screen to create the desktop:

TARGET_SCREEN=5001 Terminal

- Use a websocket proxy to expose the port via websockets:

websockify.py 5000 localhost:5001

- Open HaikuRemoteDesktop.html in a browser and connect.

To get the full desktop experience you may want to run Tracker and Deskbar inside the virtual desktop. As they are both single launch and controlled by the launch_daemon, you have to stop them via:

launch_roster stop x-vnd.be-trak launch_roster stop x-vnd.be-tskb

And then start them manually from within the virtual desktop:

/system/Tracker & /system/Deskbar &

85195eb807 Add a HTML5 client for the remote desktop protocol.
data/html5_remote_desktop/HaikuRemoteDesktop.html | 76 +
data/html5_remote_desktop/HaikuRemoteDesktop.js | 2241 +++++++++++++++++++++
2 files changed, 2317 insertions(+)

Upstream: cgit.haiku-os.org


  • Share