This was written in Markdown using acme on Plan9 with an sshfs mounted folder of my NextCloud setup (via a Linux host). Tidied up in Drafts, then posted on macOS using Marsedit! This post is for me really. ..it will also be a WIP.
initial post install stuff
Create a new user
Everybody seems to use the default user, Glenda (from Plan9 from outer space). This is the equivalent of a root* unix user. Except I do not like that.
*Well almost. There is no root user that is all powerful in plan9
This also shows how you run a lot of command stuff by cat’ing text to the running process. cwfs.cmd is the file server process that runs the CWFS filesystem (it’s different if you run another filesystem). You can do this in one step with the “con” tool. But i prefer to do each step one by one as I remember it better.
echo newuser chris >>/srv/cwfs.cmd
You also need to add the new user to the sys and upas groups.
echo newuser sys +chris >>/srv/cwfs.cmd
echo newuser upas +chris >>/srv/cwfs.cmd
Various how to pages also suggest the “adm” group too. I think this is equivalent to root. I have not yet added my user to it and not found any errors.
term% cat /adm/users
-1:adm:adm:glenda
0:none::
1:tor:tor:
2:glenda:glenda:
3:chris:chris:
10000:sys::glenda,chris
10001:map:map:
10002:doc::
10003:upas:upas:glenda,chris
10004:font::
10005:bootes:bootes:
I’ve no idea what the other groups are for!
Then reboot, login as this user. You will see errors. But run the newuser script to setup your $home folder and profile
/sys/lib/newuser
customise plan9.ini
This requires you to mount the 9fat filesystem which contains a plain text file (hey everything is plain text file!) that configures the boot process.
9fs 9fat
cd /n/9fat
“9fs” is equivalent to mount and “9fat” is the partition.
Nice and simple.
You now need to familiarise yourself with a text editor. Acme is the best. I have found myself having to use “ed” a streaming text editor. It’s Ok, but very basic and quite painful to do anything other than simple emergency edits. Keep backups!
acme plan9.ini
Setup plan9.ini to boot straightway into my user account
Once you have your user then you can bypass which filesystem to boot and which user to boot into.
Remembering that at anytime you are promoted for options in the boot process then you can type “!rc” at a prompt to launch a minimal terminal to fix the issue. ..and booting from the USB install image always allows you to easily mount the 9fat partition and fix things.
change the video driver to IGFX
customise your desktop – rio
Rio is the windowing application.
To customise Rio you need to edit your profile
acme $home/lib/profile
I now configure my profile to load a “$home/bin/rc/riostart”, which autostart a few tools and a few “rc” shells.
Change
rio
to
rio -i riostart
Mine is:
#!/bin/rcwindow 0,0,161,117 stats -lmisce
window -miny 130
window bar
# run a system shell on the serial console
~ $#console 0 || window -scroll console`
Bar is a cool little tool you will have to compile and install.
Change the font
Change the following line. There are many different fonts in /lib/font:
#font=/lib/font/bit/vga/unicode.font
font=/lib/font/bit/dejavusans/unicode.14.font
keyboard
Add this line just before loading rio:
cat /sys/lib/kbmap/uk > /dev/kbmap
misc
Setup SSH
The instructions are here. However, there is an omission in that first line as “role=client” needs to be added.
auth/rsagen -t 'service=ssh role=client' >$home/lib/sshkey # generate private key
auth/rsa2ssh $home/lib/sshkey >$home/lib/sshkey.pub # generate public key, if you need to share it
cat $home/lib/sshkey >/mnt/factotum/ctl # put the private key in the password manager
echo 'ssh sha256=DDDDDDDDDDDDDDDDDDDDDDDD server=scotgate.pixies' >> /usr/chris/lib/sshthumbs
a few useful tips
Mounting a linux filesystem over SSH
sshfs is useful.
sshfs chris@scotgate.pixies
cd /n/ssh
..will mount your $home folder on the remote host as /n/ssh
Note if you are using Drawterm then /srv/ has your root filesystem of the host already.