Instruction of using Haiku remote desktop

Haiku has remote desktop feature and HTML5 remote desktop client. It is not complete yet but someone may find it useful.

Instructions to setup Haiku remote desktop:

  1. Install websockify by git clone it is needed to convert TCP server to websocket server.
  2. Run python -m websockify 5000 localhost:5001 in websockify directory.
  3. Run some application to start remote desktop: TARGET_SCREEN=5001 Terminal. Terminal can be replaced by something else.

Instructions to connect to remote desktop:

  1. Download contents.
  2. Open HaikuRemoteDesktop.html.
  3. Set IP address of Haiku PC, port should be as in websockify (5000 in this case), set screen size and press ‘Connect’.
  4. Remote desktop with opened Terminal or what you specified at start will be displayed.

There’s also a page on the website that details how to use the native application:

I can’t get this to work. Do I have to connect from a haiku client?

Also I had to use python3 to start socksify in the server.

You have to either connect from a Haiku client, or use the HTML5 client which is not documented in that page (or anywhere else, as far as I know).

I tried to open the HaikuRemoteDesktop.html file with the .js file on Chrome on my Mac, but it seems the web socket will not open - I think I’m using the correct IP of the since I can open an ssh from the Mac terminal. Which port?

Do I have run something in the terminal on the remote Haiku machine (or is some deamon running automatically)?

I was able to make this work by slightly modified original instructions.

On haiku box:

  1. git clone

On another box:

  1. wget
  2. wget

On haiku box

  1. cd websockify
  2. python3 -m websockify 5000 localhost 5001
  3. (From another terminal) TARGET_SCREEN=5001 Terminal (Can be another application than Terminal)

On other box

  1. Open HaikuRemoteDesktop.html in a browser
  2. Type in host ip and port (5000) and connect

If you’re running haiku in a VM with a NAT network card setup you will need to set up port forwarding. In virtual box:

  1. Open VM settings, click network, then advanced:
  2. Click port forwarding, and add a new rule like below (replace with actual guest IP if it is different).
  3. This rule routes port 5000 on the guest (haiku VM) to (localhost port 2222). So now on the host machine the RD can be accessed by putting into the remote desktop html
  4. Voila

Sweet - it’s working!! THANKS @Munchausen !!!

I’m running Haiku on VMWareFusion on same Macbook as web client (not using NAT so didn’t need to do the port forwarding)

I ran this (slightly different than yours):

python3.8 -m websockify 5000 localhost:5001

Tip: (or someone with git access who can modify the .html file)

Add this script to the head section of the .html file to take full browser screen dimensions:

<!DOCTYPE html>
		<title>Haiku Remote Desktop</title>
            const getWidth = () => {
                document.getElementById('width').value = document.body.clientWidth;

            const getHeight = () => {
                document.getElementById('height').value = document.body.clientHeight;
		<script src="HaikuRemoteDesktop.js"></script>
	<body onload="init();getWidth();getHeight();">
		<div id="connectForm">