Tuesday, December 11, 2012

Random learnings (1)

Learning #1

My inquiry about how to set up a permanent ability for any registered drawterm users to log in to RasPilan 9 was met with a reply from Richard Miller indicating that a "Standalone CPU server" set up is the standard approach.

He referred me to the following HOWTO:

The good news is that apparently Richard has taken the trouble to provide an alternate kernel for this on the boot partition of the distribution image (called 9picpu), with a associated alternate cmdline.txt file called cmdline-cpu.txt.  This has the appropriate boot parameters to start Plan 9 in this role.

Now, at this stage, I'm not sure why this needs a special kernel (having read in the Plan 9 docs that the various roles where all provided for in one kernel).

Learning #2

Acme has a wiki view built in it seems.

  • Open the file /acme/wiki/guide
    This will show a file with a couple of commands:
    Local 9fs wiki
    Wiki /mnt/wiki
  • Execute each command line in term (select, middle click)
    As I understand this, the first line loads a wiki file system in the Local namespace of acme.
    Then the Wiki viewer is started with the root of the wiki content.
  • Right click in wiki links (text in square brackets to open the linked page)

Learning #3

The process specific namespaces allow some awesome simplifications compared to UNIX.
For example, from the point of view of a process:
  • /env/... contains all the process environment variables
  • /bin/... contains all the visible executable files/apps/utilities 
In one fell swoop there goes a couple of the awkward squad in a puff of conceptual symmetry.
Unix environment variables are pretty strange magical memory things.
Unix PATH is even worse (shiver).  How lovely that you can just arrange for all executable things to be unioned in the /bin directory.

Learning #4

/lib/profile is executed for the user at login.

Learning #5

Use 'bind' to union directories together.  For example:
bind -a $home/bin/rc /bin
will union the $home/bin/rc directory (where user scripts are normally stored) into /bin.
The -a here means 'after' (i.e. less precedence than what is already in /bin).
Per #3, this means that scripts are looked up automatically (i.e. are on the executable search 'path').

Learning #6

The 'snarf' buffer is available at /dev/snarf

Learning #7

You can target multiple objects in an argument by using '*' in a path, e.g.:
awk '{print $1}' /proc/*/status
or just
ls /proc/*/status

No comments:

Post a Comment