⑨ lab ≡ who cares?!

Plan9/Vnc

How to connect from Plan9 to MacOS using vnc

⑨ lab ≡ 9front VNC screencast…

term% @{ramfs ; cd /tmp ; hget https://9lab.org/vid/plan9/vnc.mp4 > vnc.mp4 && treason vnc.mp4}

The above screencast was recorded on 9front Community vs. Infrastructure using wrec running on a Lenovo T420s featuring the program vncv that is used to log into a remote MacOS Big Sur system using the VNC Protocol (i.e. VNC).

The default vnc can not connect to MacOS Big Sur:

term% vncv steve.9lab.home
vncv: authentication failure: unknown auth type 0x51e2124

This issue has been resolved on 9front vnc in patch. If you do not use 9front the following patch should resolve the connection issue:

term% cat cmd.vnc.auth.c.patch
From: Igor Böhm <igor@9lab dot org>
Date: Wed, 22 Sep 2021 06:36:54 +0000
Subject: [PATCH] vnc: enable connecting to Darwin


Tested on MacOS Catalina and Big Sur releases.
---
diff 61f37abf576a02c7f1e3561cfaba3c0457f55c9d de22c9e5d93042f458a1e6c4b7f8ef97c1f68c2a
--- a/sys/src/cmd/vnc/auth.c	Fri Aug 27 16:13:11 2021
+++ b/sys/src/cmd/vnc/auth.c	Wed Sep 22 08:36:54 2021
@@ -33,6 +33,8 @@
 		v->vers = 37;
 	else if(strncmp(msg, "RFB 003.008\n", VerLen) == 0)
 		v->vers = 38;
+	else if(strncmp(msg, "RFB 003.889\n", VerLen) == 0)
+		v->vers = 38;  /* Darwin */
 	else /* RFC6143: Any other should be treated as 3.3. */
 		v->vers = 33;

Simply git/import the above patch and rebuild vnc:

% bind -ac /dist/plan9front /
% git/branch -n feature/vnc-darwin-patch
refs/heads/feature/vnc-darwin-patch: 61f37abf576a02c7f1e3561cfaba3c0457f55c9d
% git/import cmd.vnc.auth.c.patch
applying vnc: enable connecting to Darwin
M sys/src/cmd/vnc/auth.c
% cd /sys/src/cmd/vnc
% mk install
  …
% mk clean

NOTE that the above applied the patch in a branch (feature/vnc-darwin-patch). You could also import the patch onto the front main development branch.

Next, run ipso in a new window, adding an entry to factotum for authentication to work automatically. Here a sample entry:

key proto=vnc server=steve.9lab.home !password=St3v3J0bS?

Before you can get started there is one crucial setting that you have make on MacOS:

⑨ lab ≡ 9front Darwin Screen Sharing System Setting…

MacOS - Screen Sharing System Setting: Check VNC viewers may control screen with password…

Finally, this is how to start a VNC connection via vncv to a MacOS system:

% vncv steve.9lab.home

And here is the above screencast on youtube:

#Plan9 #9front