UnixAos Usage Notes

This page is a personal collection of notes. For authoritative documentation, refer to
http://www.informatik.uni-bremen.de/~fld/UnixAos/ ,
http://www.ocp.inf.ethz.ch/wiki/,
http://www.oberon.ethz.ch/ and
http://www.ethoberon.ethz.ch/.

Installation and Configuration

The ext2 filesystem is a good choice for a removable flash store. Refer to the third paragraph in http://en.wikipedia.org/wiki/Ext2. In my observations InitCommands in Oberon.Text of Native Oberon were not executed properly from a FAT file system.

Installation instructions are in http://www.informatik.uni-bremen.de/~fld/UnixAos/Readme.txt .

if grep -q \^sys: /etc/group; then 
  use sys group 
elseif grep -q \^bin: /etc/group; then 
  use bin group 
else echo "Neither the sys nor the bin group is available." 
   echo "Installation aborted." 
   exit 
fi

Configuration

UnixAos is configured by Configuration.XML and the Oberon subsystem is configured by Oberon.Text. Refer to http://www.ethoberon.ethz.ch/betadocu.html.

The aos script installed by install.UnixAos, by default to /usr/bin/aos, adjusts the operating system environment before starting aos.{solaris,linux,darwin}. The following script is for user specific requirements. Reasonable locations for it are ~ and ~/bin. The script allows convenient and reliable use of working directory in a flash device which can be used in more than one system. If the filesystem is not mounted, fsck is applied before mounting.

For each host, create in the working directory files Configuration.<Host>.XML and Oberon.<Host>.Text. For example, a host named blunder requires Configuration.blunder.XML and Oberon.blunder.Text. This script copies Configuration.blunder.XML to Configuration.XML and Oberon.blunder.Text to Oberon.Text before starting UnixAos.

#!/bin/bash 
# A script to start UnixAos with a working directory in a removable flash store. 
# Aos with the flash store on various machines is accomodated by copying 
# machine specific configurations into Configuration.XML and Oberon.Text. 
# 
# Conditions for this script to work. 
# * The volume containing the working files has a reliable name 
#   assigned by a udev rule. 
#   https://wiki.archlinux.org/index.php/udev#Writing_udev_rules. 
#   In this instance the name is GRNSDHC41 or KingstonUSB or BlackSDHC1. 
# * The following assignment of this name to WorkingVolume is correct. 
# * A mountpoint exists for the working files.  A system may automount the 
#   volume at another location and automounting is harmless to this script. 
# * The following assignment to WorkingDirectory is correct. 
# * An appropriate entry exists in /etc/fstab.  This is an example. 
#   /dev/GRNSDHC41 /home/peter/MY ext2 defaults,noauto,user,users,exec 0  0 
# * /etc/sudoers is adjusted to allow the user to fsck the working filesystem. 
#   Execution of fsck can be tested interactively. 
# * The user can mount the working volume.  Note the user option in /etc/fstab. 
# * /usr/bin/aos attempts to create the link .aoshome to /usr/bin/aos in the 
#   Working Directory but a FAT file system does not allow links.  This can be 
#   resolved by bind mounting a directory, .aoshome, to /usr/bin/aos. 
#   Create the directory .aoshome in the Working Directory. 
#   Add a line to /etc/fstab to allow the user to perform the mount. 
#   /usr/aos /home/peter/MY/.aoshome none rbind,user,users 
#   My preference to reformat the flash card to ext2. 
# 
# WorkingVolume=BLKSDHC41 
WorkingVolume=GRNSDHC41 
echo WorkingVolume is $WorkingVolume. 
WorkingDirectory=MY 
echo WorkingDirectory is $WorkingDirectory. 
#Host=$(hostname --short) 
#HostInitial=${Host:0:1} 
#echo Host is $Host and HostInitial is $HostInitial. 
ConfigAndStartAos () { 
     AosContextDir=$PWD 
     cd $WorkingDirectory 
     if [ -f Configuration.$(hostname --short).XML ] 
          then 
          echo Copying Configuration.$(hostname --short).XML to Configuration.XML. 
          /bin/cp Configuration.$(hostname --short).XML Configuration.XML 
          if [ -f Oberon.$(hostname --short).Text ] 
               then 
               echo Copying Oberon.$(hostname --short).Text to Oberon.Text. 
               /bin/cp Oberon.$(hostname --short).Text Oberon.Text 
               /bin/rm --force --verbose AOS*.Log 
               /bin/rm --force --verbose Trap*.txt 
               /bin/rm --force --verbose .tmp.* 
#             sudo mount --bind /usr/aos .aoshome 
#             /usr/bin/getmail 
               /usr/bin/aos 
#             sudo umount .aoshome 
          else 
               echo Oberon.$(hostname --short).Text not present in $WorkingDirectory.  Aborting. 
          fi 
     else 
          echo Configuration.$(hostname --short).XML not present in $WorkingDirectory.  Aborting. 
     fi 
     cd $AosContextDir 
     }
if [ -b /dev/$WorkingVolume ]      then      if mountpoint -q $WorkingDirectory           then # Working volume is mounted; fsck not required.           ConfigAndStartAos      else           # Working volume is not mounted; perform fsck.           if /sbin/fsck -t ext2 $WorkingVolume                then                echo Filesystem in $WorkingVolume passed fsck.                mount -v /dev/$WorkingVolume                ConfigAndStartAos           else                echo fsck found a problem in $WorkingVolume and attempted repair. Try again.           fi      fi else      echo /dev/$WorkingVolume containing working files not connected. Aborting. fi

Usage Tips, Mouse and Keyboard

The <Esc> key is used to interrupt a task. For example it can interrupt a long running FTP.GetFiles in the Oberon subsystem.

Mouse usage is unusual but efficient. Definitely worth the small effort to learn. A mouse with three buttons or two buttons and a wheel is essential. If a mouse button is pressed unintentionally, press all mouse buttons before releasing any. All mouse buttons together have no effect.

Proportionality of Text in Viewer

An Oberon subsystem can be opened with a command in the Autostart section of Configuration.XML as in this example.

<Section name="Autostart"> 
     ... 
     <Setting name="Start an Oberon process" value="Oberon.Start Oberon 1100x704 0 74 ~"/> 
     ... 
</Section>
The dimensions, 1100x704, can be adjusted for satisfactory proportioning of text in a viewer. If the Oberon window is stretched, by grabbing the lower right corner with the mouse, the proportionality of text to viewer is preserved.

Receiving Email

Mail.Panel in the Oberon subsystem can receive mail from a smarthost with TLS provided by stunnel. Install stunnel on the local *nix host and configure as in this example.
# localhost:/etc/stunnel/stunnel.conf 
# Example SSL client mode services 
[Oberon-pop3] 
client = yes 
accept = localhost:110 
connect = smart.host.com:995
In Oberon.<Host>.Text set the incoming server to localhost.
NetSystem = { 
     ... 
     POP = "localhost"     {* incoming mail server *} 
     ... 
     POPMode = "POP3"     {* POP3 or APOP *} 
     EMail = "me@my.domain.name"     {* your return address *}
Set the authentication using NetSystem.SetUser as in this example. "@" can not appear in the client ID in this command. This will fail.
NetSystem.SetUser pop:me@my.email.domain:password@localhost ~
If the client ID contains @, percent-encode it as %40 in the NetSystem command.
NetSystem.SetUser pop:me%40my.email.domain:password@localhost ~
For the percent-encoding to work, add URI.Mod, modify NetSystem and compile as described in OberonUsage. The compiler is in UnixAos; not in the Oberon subsystem.

Sending Email

Analogous to receiving mail as described above, mail is sent via the local Exim daemon which supports TLS.

Copyright (c) 2014, Peter Lyall Easthope. All rights reserved.

Valid CSS! HTML5 conformance
Best viewed with a Web browser.

HTML.Compile * ~ ET.OpenAscii UnixAosUsage.html ET.OpenAscii Peter.css Desktops.OpenDoc UnixAosUsage.html FTP.Open easthope@easthope.ca FTP.PutFiles UnixAosUsage.html => "/public_html/UnixAosUsage.html" ~ FTP.Close