shithub: docs.9front.org

Download patch

ref: 3e3275363ba0db7377ad1de228a6886bbf292606
parent: afd49c3300fd489dedb79e0085da2a3627b1f3ec
author: Peter Mikkelsen <[email protected]>
date: Tue Oct 13 12:20:16 EDT 2020

Add section describing how to use 9P over drawterms network stack

--- a/9p-on-unix.md
+++ b/9p-on-unix.md
@@ -10,6 +10,22 @@
 
 	doas 9pfs -o allow_other 9front /mnt
 
+## 9pfs and drawterm
+
+When using drawterm it is possible to serve a 9P connection directly to the host system
+by binding `/mnt/term/net` over `/net` and starting exportfs(1) like shown in the script below
+
+	#!/bin/rc
+	
+	rfork n
+	bind /mnt/term/net /net
+	aux/listen1 -t tcp!*!12345 /bin/exportfs -r / &
+	os mkdir -p /tmp/drawterm
+	os 9pfs localhost -p 12345 /tmp/drawterm
+
+It requires 9pfs to be installed.
+A side bonus of doing it this way is, that it uses the drawterm's aan connection to keep the 9p connection up.
+
 ## v9fs
 
 The Linux kernel contains a 9p driver that can be made to mostly