9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: Re: [9fans] Setting 9pi Start State / Drawterm to 9pi
Date: Fri, 21 Feb 2014 10:28:23 +0000	[thread overview]
Message-ID: <e00c3dd558dedeb67f80b0a110799636@hamnavoe.com> (raw)
In-Reply-To: <CAJSxfmJZm=vLScHeOtERD5vDc90XSXRzBempg57Hepx+L1ua0w@mail.gmail.com>

> i'm not sure what type of kernel is on the stock 9Pi image.

The 9pi.img has both types of kernel in the dos partition.  To boot
the pi as a cpu server instead of a terminal, change 'kernel=9pi' to
'kernel=9picpu' in config.txt, and copy cmdline-cpu.txt to cmdline.txt

But I think the query was about a simple way to connect to your own
plan 9 terminal with drawterm, without making it into a cpu server.

> if it's a term
> kernel, you can't drawterm to it;

Actually that's not so.  For example, a quick-and-dirty method posted
to 9fans by Luke Evans on 10 Dec 2012 (which applies to any Plan 9
terminal, not just the pi):

	echo 'key proto=p9sk1 dom=plan9 user=glenda !password=MYPASS' >/mnt/factotum/ctl
	aux/listen -t tcp!*!ncpu /bin/cpu -R &

This will only allow the terminal owner to connect.  For more general
cpu-like service on a terminal, I use this script (which requires some
prior setup with auth/changeuser to create the lib/keys file):

	#!/bin/rc
	auth/factotum -g 'user=miller dom=hamnavoe.com proto=p9sk1 !password?'
	rfork ne
	echo auth server password:
	auth/keyfs -p $home/lib/keys
	aux/listen1 -t tcp!*!ticket /bin/rc -c '/bin/auth/authsrv -d $net' &
	service=cpu aux/listen1 tcp!*!17007 /bin/exportfs -a&
	service=cpu aux/listen1 tcp!*!cpu /bin/cpu -O &
	service=cpu aux/listen1 tcp!*!ncpu /bin/cpu -R &

Nowadays there's hardly any difference between cpu and terminal
kernels, and in fact I would advocate combining the two.  Only a few
lines of kernel source code need to be changed to allow it to decide
at boot time whether to behave as a cpu server or terminal, depending
on the setting of service= in plan9.ini.




  reply	other threads:[~2014-02-21 10:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21  6:49 Brian Vito
2014-02-21  8:51 ` Skip Tavakkolian
2014-02-21 10:28   ` Richard Miller [this message]
2014-02-21 12:42 ` erik quanstrom
2014-02-22  4:23 Brian Vito
2014-02-22  7:52 ` Richard Miller
2014-02-23  4:59 Brian Vito
2014-02-23  5:04 ` Shane Morris
2014-02-23 14:16 ` Richard Miller
2014-02-23 14:32   ` erik quanstrom
2014-02-23 14:50   ` Bakul Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e00c3dd558dedeb67f80b0a110799636@hamnavoe.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).