User Tools

Site Tools


Boot Camp 9p resource

x (an amd64 plan9front1 complement to the SDF Plan 9 Boot Camp2)
xSDF Plan 9 Boot Camp 9p communication resources (please ask for help)

The rio rc prompt is accessable with 9front Drawterm or an rcpu connection. A user name (-u USER) is required.

  $ ./drawterm -a -h -u USER
Optional: drawterm -h -u USER
Optional: drawterm -a -h -p -u USER

A Drawterm rc prompt (without rio; teletype only):

  $ ./drawterm -G -h -u USER
xA Drawterm file transfer hint:% lc /mnt/term

Possible "Tea Note" Presentation commands from the 9p rio rc prompt (%).

bboard:bboard [-nps] [-r n]9p contrib directory
broke:broke [ user ] - broken processes go away
castor:castor [address] - A Gemini browser for Plan 9
com:com - An early version of commode9p contrib directory
df:df - disk usage9p contrib directory
dircp:tar, dircp - archiver
auth/factotum:factotum, fgui, userpasswd - authentication agent3
figlet:FIGlet - display large characters made up of ordinary screen characters
find:find [-1dfq] [path …]9p contrib directory
finger:toe - A very basic finger client for plan9/9front.
mkhomepg: 9p contrib directory
mug:mug - convert an image to a face icon
p:p - paginate
src:src, Bfn - find source code for executable
top: 9p contrib directory
tweak:tweak - edit image files, subfont files, face files, etc.
upas/fs -f:upasfs - mail file server
vdir:vdir [-r] [directory] If the -r flag is passed, delete will recursively delete directories. (A minimalistic visual directory browser for Plan9.)9p contrib directory
walk:walk - walk a path
who:who, whois - who is using the machine

bboard example

date and time example

xA scheduled Plan 9 Boot Camp TEA NOTE
xStart the clock in a rio rc window.
  cpu% cp /adm/timezone/US_Pacific /env/timezone && clock.amber

The command will pick up the new timezone, but nothing already running or not sharing the environment will be affected.

broke example

  cpu% psu -a | grep Broke
  cpu% broke
  cpu% broke $user

commode example

  cpu% com
  commode version 6
  @h  help
  @f  finger user
  @l  list rooms
  @p  peek into a room
  @g  goto a room
  @w  who
  @i  idlers
  @r  review 50 lines
  @R  review N lines
  @u  post a shortened url
  @a  aNONradio schedule
  @q  quit
  :   emote
  !   run a command

Run com in a rio rc window, rather than a vt, to benefit from the Plan 9 I/O.

face example

castor example

A castor example.

  cpu% castor gemini://

9p rio rc prompt example

  cpu% echo $prompt
  cpu% prompt='9p: '
  9p: echo $prompt
  9p: prompt='⑨p: '

9p html directory example

mkhomepg is used to automate the process. The process includes a 5 to 10 minute wait after mkhomepg & touch, once a background task is preformed. Review for a static review of the mkhomepg results.

cpu% mkdir /usr/$user/html
  cpu% mkhomepg
  cpu% touch /usr/$user/html/index.html
  cpu% sed 10q /usr/$user/html/example.html
  <h6>1st example</h6>
  2nd example
mothra -k$user/index.html
mothra -k$user links to all of the active homepages.

9p gemini index location

  cpu% touch /usr/$user/html/index.gem
castor gemini://$user/index.gem

1 plan9front running natively on hardware. 2 NetBSD Xen [] running Plan 9 Boot Camp participants' VMs, during the announced Plan 9 Boot Camp occurrences. 3 Security in Plan 9; The user may or may not have a secure store in which all his keys are kept.

9p mail example

A detailed 9p mail example.

default 9p lib/profile

The mentioned default profile may look slightly different than the SDF 9p profile.

bind -qa $home/bin/rc /bin
bind -qa $home/bin/$cputype /bin
touch $home/lastlogin
case terminal
	echo -n accelerated > '#m/mousectl'
	echo -n 'res 3' > '#m/mousectl'
	prompt=('term% ' '	')
	fn term%{ $* }
case cpu
	bind /mnt/term/dev/cons /dev/cons
	bind -q /mnt/term/dev/consctl /dev/consctl
	>[2] /dev/null {
		cp /dev/sysname /mnt/term/dev/label
		if(wsys=`{cat /mnt/term/env/wsys} && ~ $#wsys 1) {
		if not {
	bind -a /mnt/term/dev /dev
	prompt=('cpu% ' '	')
	fn cpu%{ $* }
	if(! test -e /mnt/term/dev/wsys){
		# call from drawterm
		if(test -e /mnt/term/dev/secstore){
			auth/factotum -n
			read -m /mnt/term/dev/secstore >/mnt/factotum/ctl
			echo >/mnt/term/dev/secstore
		if not
case con
	prompt=('cpu% ' '	')

Useful modifications of the lib/profile above the case terminal statement.

lib/profile snippet from above "case terminal"
bind -qa $home/bin/rc /bin
bind -qa $home/bin/$cputype /bin
bind -qa /usr/sdf/bin /bin
touch $home/lastlogin
case terminal <= THIS IS THE CASE TERMINAL LINE; no need to edit this line.
xOptional: the $user can omit the upasname=$ line if using the account without E-mail.

Useful modification of the lib/profile below the case cpu statement. Include upas/fs after plumber.

lib/profile snippet from below "case cpu"
		if not
		plumber <= THIS IS THE PLUMBER LINE; no need to edit this line.
xOptional: the $user can omit the webcookies, webfs, plumber, and upas/fs lines to reduce number of processes initially, starting programs manually when needed.
programgrouping commands
faces -iplumber;upas/fs;faces -i
comwebfs;comhget needs webfs to pull the aNONradio schedule; @a
mothra -kwebfs;mothra -k
xOptional: the $user can view the number of processes (numberofprocesses) initially, then later after starting or stopping applications manually.
  cpu% ps | awk '$1 !~ /^(glenda|none|upas)$/ { print $1 }' | sort | uniq -c | sort -n

Reference book

1.Introduction to Operating Systems Abstractions Using Plan 9 from Bell Labs (pdf; external archive)
a.execute[d] in the background; page 97, 102, 155, 184, 247
b.mount table; page 161-164, 167-168, 327
2.Introduction to Operating Systems Abstractions Using Plan 9 from Bell Labs (pdf; external archive)
a.5.8. The file descriptor bulletin board; page 123-125
b.7.6. Local name space tricks; page 164-166
c.7.7. Device files; 166-167
d.7.8. Unions; page 167-169
e.7.11. Sand-boxing; 172-173
f.7.12. Distributed computing revisited; page 174-177
g.9 — More tools; 201
i.9.1. Regular expressions; 201-205
ii.9.2. Sorting and searching; 205-210
iii.9.3. Searching for changes; 210-214
iv.9.4. AWK; 214-219
v.9.5. Processing data; 219-224
vi.9.6. File systems; 224-228
h.14.2. The local machine; 358-359
i.14.3. Distributed security and authentication; page 359-362
j.14.4. Authentication agents; 362-367
Topic / Subject
AWKtitle:(AWK programming)
xPrevious dedicated links are located at the VPS Plan 9 / 9front tutorial. (wiki)

Conclusion or close

The wiki formatting used in this tutorial was reviewed with the SDF Plan 9 Boot Camp plan9front mothra browser, and the mothra option '-k': % mothra -k. The intention was to support those SDF Plan 9 Boot Camp participants who may participate (in the Boot Camp) with a low-speed Internet connection. The outcome of the mentioned formatting decision is pending the approval of future wiki editors. Have fun.

boot_camp_9p_resource.txt · Last modified: 2022/08/28 03:46 by hc9