TIPS ABOUT 9P CAPABILITIES

This page covers how to mount the wmii file system on Linux or Inferno, see 9P for a list of other 9P client libraries in various languages.

9p.ko

2.6.14 – 2.6.16

; modprobe 9p2000
; mount -t 9p $WMII_NS_DIR/wmii /mnt/wmii -o proto=unix,name=$USER,noextend

2.6.17 – 2.6.23

; modprobe 9p
; mount -t 9P $WMII_NS_DIR/wmii /mnt/wmii -o proto=unix,name=$USER,noextend

2.6.24 – current

; modprobe 9pnet
; modprobe 9p
; mount -t 9p $WMII_NS_DIR/wmii /mnt/wmii -o trans=unix,uname=$USER,noextend,dfltgid=$(id -g),dfltuid=$(id -u)

Afterwards the filesystem of wmii is exported to /mnt/wmii. Note that you can simplify the process using 9mount, with which the mount command becomes:

; 9mount -i 'unix!'$WMII_NS_DIR/wmii /mnt/wmii

Inferno

If you have installed inferno, you can mount the wmii filesystem if you edit the wmii script through setting a tcp-socket capable address:

export WMII_ADDRESS=tcp!localhost!5555

instead of the default unix-socket file based address.

From within inferno you can then mount the filesystem easily:

; mount -A tcp!localhost!5555 /mnt/wmii

Or with unix domain sockets, you can mount them in inferno through any of a number of ugly hacks. The following requires plan9port, and will work regardless of the value of your $WMII_ADDRESS:

; mount -A {os rc -c 'exec dial $WMII_ADDRESS' >[1=0]} /mnt/wmii

or netcat:

; mount -A {os sh -c 'nc -U /tmp/ns.$USER.$DISPLAY/wmii' >[1=0]} /mnt/wmii

I suspect that the overhead of piping through dial or netcat is comparable to the overhead of TCP.

Have fun ;)