Acorn NC Server Documentation
UNIX SERVER BASELINE PACK
Document Version 0.02 ***DRAFT***
Pack Name: base 0.11 Beta
Pack Description: Baseline NC OS 1.06 boot structure
1.0 Pack Dependencies:
2.0 Unix Dependencies:
3.0 Installation:
3.1 Installing the Unconfigured NC Boot Structure
3.2 Determining the NC's Hardware Address
3.3 Unix Configuration
3.3.1 IP Addresses
3.3.2 NFS Export
3.3.3 PCNFS Authentication
3.3.4 bootp
3.3.5 ntp
3.4 Overview of NC Boot Procedure
3.5 Basic NC Boot Hierarchy Configuration
3.5.1 Debug Mode
3.5.2 Networking and Routing
3.5.3 Printing
3.5.4 Proxying
3.5.5 Secure Socket Layer
3.6 User Security and Login Methods
3.6.1 Challenge - Response
3.6.2 Smartcard
3.6.3 Hardwire
4.0 NC Applications and User Filespace Management:
4.1 User Home Directory Structures
4.2 Public versus Private Applications
4.2.1 Adding Public NC Applications
4.2.2 Adding Private NC Applications
4.3 Launching NC Applications from HTML
5.0 Setting Configuration Options in NC NVRAM:
5.1 Static Addressing
5.2 The Administration Application
Bibliography:
Appendix A: Dictionary of NC Environment Variables
Appendix B: List of Common NC OS Filetypes
17/02/98 DW First Draft for internal comment
12/03/98 DW Second Draft incorporating typesetting conventions, Appendix B
done, Appendix A started, deletion of outdated references and
general tidying-up.
Outstanding Issues added.
This document contains details of file contents and file catalogues as seen from Unix, file contents and file catalogues as seen from NC OS, and commands which should be typed by the Unix super-user at their shell prompt.
The typesetting conventions used throughout this document are as follows:
Acorn Trinity (similar to Times Roman) body text
Acorn Corpus Unix config files and Unix filenames
and catalogues
Acorn Corpus Bold text to be typed by the sysadmin at a
Unix shell prompt
Acorn Homerton NC OS config files and NC OS
filenames and catalogues
Where appropriate, text which should be substituted with command arguments is set in italics between angle brackets <>, and lists of additional optional parameters are enclosed within square brackets []. HTML tags enclosed within angle brackets are not italicised.
A troubleshooting section would be useful.
Details of browser mods to add extra MIME types and mappings should be included.
Should consider adding a dictionary of the commands which can be embedded within obeyfiles.
The NC base pack is not dependent on any other NC packs being installed.
The NC 0.11 Beta base pack must be installed on a Unix host running the following:
nfsd
pcnfsd for user authentication. If this is not installed (see man pcnfsd),
consult your Unix vendor.
bootpd BSD-style; see installation. Solaris 2.6 dhcp will also work.
bootpd is not required if static IP addrs are to be configured into
each NC; see later.
timed An NC must be able to take details of real time from a timeserver
visible on the network it is connected to. This does not have to be the
NC boot server.
Login as or su to root, cd to the directory where you want the "NC boot" directory to reside (this is conventionally /exports/home/ncd/) and cp the base distribution (base.tar.gz) to it.
Uncompress the distribution...
# gunzip base.tar.gz
# tar xvf base.tar
Recursively set the UID:GID tuple for the files in the boot hierarchy to 32767:9999; eg
# chown -R 32767:9999 boot
Alternatively, if this hierarchy is top be exported with read-write enabled, set the tuple to the UserID:GID of an appropriate administrator user (preferably not root) and
# chmod -R o-w boot
# chmod -R o+r boot
The MAC (Ethernet) address of each NC client is usually found on the outside of the box, or in a packing slip. Alternatively plug the NC into a suitable monitor (eg an AKF60 or SVGA) and the power supply; the MAC address (in the form xx:xx:xx:xx:xx:xx) is the first item displayed on screen.
If you are using a Domain Name Server, the arp command will show entries similar to below:
# Device IP Address Mask Phys Addr
le0 base-address xxx.xxx.xxx.xxx 01:01:01:01:01:01
le0 hostname xxx.xxx.xxx.xxx 02:02:02:02:02:02
le0 0.255.255.255 xxx.xxx.xxx.xxx 00:40:b8:00:00:01
Find the devices which do not have hostnames, or which have IP addresses not within your domain range. These devices need to be assigned an IP address, which should be added as an entry to the bootptab file along with the listed Physical Address (see later). All Acorn-sourced NC OS 1.06 devices have a MAC address of the form 00:00:a4:11:xx:xx.
In order to set up the infrastructure required to boot Ethernet NCs, it is necessary to be the super-user.
The host name and IP address to be assigned to each NC should be added to the /etc/hosts file and/or NIS (Network Information Service, formerly YP) map. If NIS is used, it is important to force (or wait for) a push of the maps. The NC's hostnames and IP addresses should also be added to the site DNS; this is particularly important if the NCs are intended to run X servers.
In order that the Network Computer can read files in the NC directory structure now set up (eg. /export/home/ncd), it must be shared using NFS. Note that the /export/home/ncd/boot directory can be exported as a read-only filesystem, whereas the individual user directories should be exported read-write with the appropriate owners and permissions to maintain access control.
In BSD systems, this is achieved by amending the /etc/exports file (see man exports for details). After making the changes to the NFS exports database, it will be necessary to prompt the controlling nfsd daemon to re-read the file in order for the changes to take effect. You should be aware that some flavours of Unix require any exported hierarchy to be a complete filesystem and not just a directory within a filesystem; unless you have /export (or whatever) stored as a separate partition (which gets mounted according to /etc/fstab at system boot time) you may need to specify all of / in /etc/exports. Exporting / should be avoided if at all possible by judicious disc partitioning. Some Unix variants may also require the -alldirs suffix added to the export option; see man exports to determine whether this is the case on your server.
For SVR4 systems, use the share command to add new nfs shares (see man share), e.g.
share -F nfs -o ro /export/home/ncd/boot
On Solaris 2.x systems, the share command should be appended to /etc/dfs/dfstab
You may wish to check for error messages after re-starting NFS (e.g. typing errors in the exports file). Typically, error messages are recorded in the system log (see man syslog), and the last few error messages can be viewed by typing:
# tail /var/log/messages
For the NC to connect an authenticated user once its bootstrap has finished executing, it is necessary to have pcnfsd running on the server. pcnfsd requires no configuration of its own; it can be run either from an rc file or via inetd (see man pcnfsd for details on your own server's options). pcnfsd will authenticate users who have entries either in the server's local /etc/passwd or (if YP / NIS / NIS+ is configured and running) on the appropriate master passwd server.
Several freeware sources exist, as well as commercial implementations (eg http://www.sun.com/solstice/Networking-products/PC-NFS51.html); as the NC uses pcnfsd's RPC support rather than attempting to open a UDP socket, 4.4BSD's rpc.pcnfsd can be used with appropriate systems.
bootp must be installed on the system to enable the NC to get its configuration information from the server, unless the NCs are to be configured to use static IP addressing from their own NVRAM. The bootp server (bootpd) can normally be found in /usr/etc or /usr/sbin (for further details see man bootpd). If the software is not installed it will be possible to obtain it from your vendor. Alternatively there are various publicly available versions (see ftp://sunsite.doc.ic.ac.uk/computing/operating-systems/unix/FreeBSD/FreeBSD-stable/src/libexec/bootpd). Some bootp implementations (on eg IRIX 5.3) are intended specifically for use in booting discless Unix workstations, and hence the methods for configuring them may not match the setup below; if you have been supplied with such an implementation,you should obtain and compile one of the freeware bootpd implementations above, or use the bootp implementation from the NC Server pack if appropriate.
2. The file /etc/services (see man services) should contain the following lines:
bootps 67/udp #Bootstrap Protocol Server
bootps 67/tcp
bootpc 68/udp #Bootstrap Protocol Client
bootpc 68/tcp
3. The file /etc/bootptab needs to be modified to contain an entry for the NC:
.ncdefault:\
:ht=ether:\
:bf=/export/home/ncd/boot:\
:ds=xxx.xxx.xxx.xxx:\
:gw=xxx.xxx.xxx.xxx:\
:hn:\
:sm=xxx.xxx.xxx.xxx:\
:vm=rfc1048
ncxxx:tc=.ncdefault:ha=xxxxxxxxxxxx:ip=xxx.xxx.xxx.xxx
The header section (from ".ncdefault" to "rfc1048") represents the various boot configurations. The header defines:
· ht - host hardware type
· bf - bootfile (The NC uses this field to pass the NFS mount path which holds
the !nfsboot application).
· ds - Domain Name Server address list
· gw - gateway
· sm - subnet mask
· vm - vendor magic cookie selector (vendor specific options)
Each entry comprises a name for the NC, followed by the following definitions:
· tc - table continuation (points to similar "template" host entry)
· ha - host hardware (Ethernet MAC) address
· ip - host IP address
Note that the following values should be added to bootptab (numbers refer to the annotations in Figure 2):
:ds=xxx.xxx.xxx.xxx:\ Replace xxx with DNS IP address
:gw=xxx.xxx.xxx.xxx:\ Replace xxx with router IP address
:sm=xxx.xxx.xxx.xxx:\ Replace xxx with subnet mask
ncxxx: Replace xxx with name for a given NC (Acorn
suggests the use of "nc" followed by an ascending
numeric)
ha=xxxxxxxxxxxx: Replace xxx with hardware (MAC) address of the
NC (omitting field-separating colons)
ip=xxx.xxx.xxx.xxx NC IP address
NB. Some bootp daemons (e.g. SCO Unix 3.2v4.2) use only slightly different bootptab file formats, and it is possible that the suggested configuration will cause the daemon to crash. If this occurs remove the leading full-stop (".") from the .default header and entry, then re-run bootpd. In addition, some bootptab files may already contain a .default entry which breaks the above model; if so, remove the pre-existing entry. Alternatively consult your Unix system manual.
4. The file /etc/inetd.conf (BSD) or /etc/inet/inetd.conf (some SVR4) should include:
# <service> <tli> <proto> <flags> <user><server_pathname> <args>
bootp dgram udp wait root /usr/sbin/bootpd bootpd
or similar as applicable.
inetd is the internet "superserver" which should be run at boot time by /etc/rc.local (or similar). Its purpose is to listen for connections on certain internet sockets, decide what service the socket corresponds to, and invoke a program to service the incoming request.
An NC has no real-time clock of its own; instead, it determines its concept of real time at boot time from a timeserver. If you do not have a network timeserver already visible via your network which serves network time over the ntp protocol, you should install timed on one of your Unix hosts (see man timed for details).
When the Ethernet NC is switched on, it goes through the following boot sequence provided static addressing has not been configured into the NC:
1. NC broadcasts its physical (MAC) address in a bootp message
2. NC server's bootpd process recognises this message, and does a lookup in its
bootptab to see if the hardware address is listed. If this is the case, it sends a
bootp reply to the NC comprising the NC's IP address, resolved name, DNS
host, gateway, netmask and location of exported boot partition. The NC reads its
IP address, resolved name and bootfile location from this reply, and the remaining
information is discarded.
NB. The server which responds to the bootp request must also be the server which
is exporting the NC boot structure; bootp forwarding is not supported.
3. The NC mounts the server at the point defined by the "bf" field of the bootp reply;
pcnfs is not used at this point as the NC mounts as user "nobody" (UID: 32767,
GID: 9999), ie user authentication is not required and pcnfsd is bypassed. The
NC labels this mount point NFSBoot.
4. The NC starts the !nfsboot application, by executing the !nfsboot/!run,feb
obey file.
In the unextended baseline distribution, this detects whether the NC is running NC
OS version 1.06 and that the NC network hardware is Ethernet, and switches
control to the !nfsboot/106/runether file. An error is reported in the case
of the NC running a different OS version or attempting to connect via a non-
Ethernet transport layer.
5. The !nfsboot/106/runether file sets up numerous NC -side environment
variables and installs assorted softloadable modules on the NC; it is not intended
for modification by the sysadmin. It repeatedly examines the contents of the
ncconfig/106 directory, which contains the sysadmin-configurable options
for all the NCs booting from the given server. The files in this directory are
executed (*obeyed, in NC parlance) by the NC in the following order:
debug
servername
setupnet
setupssl
setupprint
setupproxy
5. At the end of this process, the ncconfig/pernc/all106ncs directory is
accessed to determine per-server or per-site customisation options; all NCs will
*obey the ncconfig/pernc/all106ncs/run file.
6. If a directory exists within the ncconfig/pernc hierarchy which has a name
corresponding to the resolved name of any NC booting from the given server, that
NC and only that NC will proceed to *obey the run file therein for the purpose
of per-NC customisation.
7. If a softloadable copy of the NC browser (!NCFresco) is present in the
ncfresco directory, the NC will softload it and use it subsequently. If not, the
NC will use the default version of !NCFresco supplied in its ROM.
8. At either step 5 or step 6, the NC environment variable security$status will be set
to one of three values; "login", "smartcard" or "hardwire". The !nfsboot/106/
desktop,fea file contains a three-way switch which launches the appropriate
authentication and user home directory mounting system (details on all three
metrics later).
IT IS IMPORTANT TO NOTE THAT any environment variable which is set in any of these configuration files can be reset or unset in any file which is executed later than it (or indeed later on in the same file); this allows a degree of control identical to the "deny from all" followed by "allow from a.b.c.d" system in the Apache WWW server.
All commands in all files in the ncconfig hierarchy may be commented out by prepending a pipe (|) to the start of the appropriate line in the file. Commands, variable names and filenames in NC OS are case insensitive.
The NC boot hierarchy has a simple debug mode which prints verbose output to the NC's screen relating to the progress of the boot sequence as booting takes place. Initially, the NC is in a bare command-line only environment; as NC OS scrolls its debug information down the screen, CTRL and SHIFT on the NC's keyboard will, when pressed, suspend progress so the information can be read. Releasing SHIFT will cause progress to be resumed, but more slowly.
When the NC reaches the point in its boot sequence where its window manager starts, clickable error boxes will be displayed indicating the part of the boot process which is about to start. During recognition and execution of installed public and per-NC private applications (see later), a window is opened displaying the path to each application; press the spacebar on the NC's keyboard to progress from processing one application to the next (this feature was implemented in order to ease the process of isolating boot sequence failure owing to application problems to the application at fault).
Full debug mode is enabled by changing ncconfig/106/debug to read:
Seteval Debug 1
Seteval Netinfo 1
To enable an NC to display just its networking details rather than full debug, Debug can be set to 0 and Netinfo left set to 1. Setting both to 0 disables all debugging information.
NOTE THAT for the name of your server to be correctly displayed by the NC when Netinfo is turned on, the server's name should be assigned to the Server$Name NC environment variable; this is done in ncconfig/106/servername .
As stated previously, the NC does not make use of all the information supplied to it by the bootp server; in particular, network routing and resolving must be set up explicitly within the NC boot structure. Fortunately, the parameters which are not registered by the NC's bootp client are those which are very likely to be invariant across all NCs booting from a given server.
The following parameters are set up in the ncconfig/106/setupnet file
Routing:
syntax: route -e add net default <IP addr of gateway> <number of hops to gateway>
The route command is found within the area of the boot structure pointed to by bin$path; this is set up within !nfsboot. Thus a route command must be prefixed bin:
Address of the DNS:
syntax: set inet$resolvers <DNS host IP addr>
Resolved name of the local domain:
syntax: set inet$localdomain <resolved domain name>
The "resolverconfig" line immediately following the setting of inet$localdomain must be left as is; both inet$resolvers and inet$localdomain MUST BE SET before the resolverconfig call is made or the NCs will behave unpredictably.
Netmask:
syntax:fixnetmask <Netmask value in hex, preceded by 0x>
As with the route command, bin: should be prepended to the fixnetmask command.
For an explanation of the allocation and behaviour of netmasks, see Acorn Support Group Application Note 283, available via anonymous ftp from ftp.acorn.co.uk in /pub/documents/appnotes .
Time synchronisation:
syntax: set inet$timeserver <ntp host IP addr>
An NC has no real-time clock, and must thus take its concept of real time from a network-based ntp time feed. As with Unix, the start of the NC epoch is at midnight on January 1st 1970.
Hosts, Networks, Protocols and Services:
The NC's own equivalents of BSD's /etc/hosts, /etc/services and /etc/protocols are contained in the etc directory as found in the same boot directory containing !nfsboot (ie NOT in the server's own /etc).
NCs can be made to print either via their local parallel port or over the network to a suitably configured Unix print server. All network printing options at the NC's end are configured in the ncconfig/106/setupprint file.
The printer type is configured by the printer$ environment variable; other variables point to the appointed print server by using the following syntax:
NFS#Printer::<resolved print server name>.<printer name>.<UserID>[<password>]
A default of printing as user "nobody" is supplied; per-NC or per-user customisation can be achieved by adding appropriate lines to an ncconfig/106/pernc/<resolved NC name>/run file or a user's !run,feb file (see later). If this is done you should be aware that some pcnfsd implementations do not use RPC correctly when authenticating print jobs; this can result in authentication errors when spooling. If this happens, consult your Unix vendor or build the pcnfsd implementation supplied as part of the Unix server utils pack accompanying this distribution.
The server must be configured as an NFS print server, ie it must be running lpd and / or lpq and have the job spooling directory NFS-exported. Consult man lpd or man lpq and man printcap for details, or refer to your Unix vendor.
By default, an NC ships with drivers for a number of printers contained in its ROM. The base hierarchy accompanying this document reconfigures the NC at boot time to point to a set of printer drivers contained on the server, thus making the list of supported printers extensible.
A number of additional printer drivers are supplied in the ncconfig/106/Printers/Printers directory; the file ncconfig/106/Printers/Supported contains the list of printer drivers and appropriate strings presented on the printer configuration menu (part of the Admin application; see later) and their position in this menu. Appending names of printer definition files and description strings in acordance with the format of the existing entries will enable such printers to be selected either as part of the Admin application or within ncconfig/106/setupprint .
The NC is capable of interacting with a local or remote http proxy, and is configurable both for proxy IP address and port number. Proxying is configured in the ncconfig/106/setupproxy file; all proxying options are turned off by default, but may be turned on by removing the prepending | characters.
Enabling proxying:
syntax: Set NCFresco$ConfigProxyHttpEnable Yes
This is the master switch to turn proxying on; other proxy-related variables may be set, but if this variable is not set proxying will not take place. If this variable is set, other proxy-related variables must be set also.
Nominating an http proxy:
syntax: Set NCFresco$ConfigProxyHttp <IP addr of proxy>:<port number on which proxy expects URL requests>
Note that responses (served pages) from the proxy to the NC will be expected to be received on port 80.
Setting proxy-ignored domains:
syntax: Set NCFresco$ConfigProxyHttpIgnore <domain name> [<domain name> <domain name> ...]
If pages from any specific domains are to always be fetched directly rather than via an in-use proxy server (eg pages which are dynamically generated), the NC can be forced to fetch all pages from specific domains directly rather than via the proxy by supplying a space-separated list of domains in this environment variable.
Loading of the SSL module is controlled by the ncconfig/106/setupssl file; SSL is disabled by default ,ie both lines in this file must be commented out by prepending them with a pipe (|), and the SSL module is not included as standard in the base distribution in order to comply with UK export restrictions.
In accordance with international export restrictions, the NC SSL implementation uses RSA encryption with a maximum key length of 48 bits. The code was left softloadable rather than being incorporated into the NC ROM so that locales which have tighter restrictions than the UK on the use of strong cryptography are not forced to import the code; if the code is not loaded, the NC browser will present an error box when pointed at a page exported via https.
The SSL module forms a part of the optional NC security pack, which can be obtained from Acorn by arrangement (and, for non-UK customers, appropriate export licence).
The NC and its boot structure is designed to integrate with existing Unix user home directories and user management practices; three methods of logging on to an NC and the network as an authenticated user are supported.
It is worth noting at this point that users' NFS home directories are often cluttered, and the addition of NC-related files to a home directory which is already in use from a desktop system will only make the situation worse. Acorn has adopted a system, as can be seen in the etc/passwd file in the supplied boot structure (where the NC's etc directory is at the same level in the exported hierarchy as the !nfsboot directory), where all NC-related files are stored in an "nchome" directory within the actual home directory of the user. The existence of a consistent toplevel NC home directory name for all users is also expected to be useful as a point of reference for NC administration tools in the future.
This method mirrors the standard Unix UserID - Passwd challenge-response method of user authentication, and is invoked by setting the NC's login$status environment variable to "login"; in the supplied boot structure this variable is set in ncconfig/106/pernc/all106ncs/run .
Once previous stages of booting have been completed, the NC starts its browser and loads the page ncconfig/106/login/passwd/Logon,faf over NFS; this page may be customised by the sysadmin to present graphics appropriate to their organisation, but it should be noted that the line
<META NAME="browsermode" CONTENT="desktop">
must be preserved in the HTML head in order to deny the user access to the NC browser's toolbar until after authentication has taken place.
Once username and password have been entered, a script inside !nfsboot is called which examines an etc/passwd file which can be found in the same boot directory as !nfsboot (ie it is NOT the master /etc/passwd file!). This file has one or more lines of the format:
<username as accepted by the NC> <resolved name of the Unix host which their home directory is located on> <Path on that Unix host of their home directory> <username as accepted by login on the Unix host containing their home directory>
The user's password as typed into the Logon,faf page is submitted to the Unix server hosting the user's home directory for checking against the contents of that Unix server's /etc/passwd ; if that server is appropriately configured, it can pass the query to NIS / NIS+ as it does with Unix logon attempts.
NOTE THAT the Unix server hosting the user's home directory must be running pcnfsd.
If the login attempt fails, the page ncconfig/106/login/passwd/Fail,faf is displayed. This page may also be customised by the sysadmin, but again the
<META NAME="browsermode" CONTENT="desktop">
must be preserved.
If the login attempt succeeds (ie the UserID - Passwd pair is verified by the server hosting the user's home directory), the home directory as specified in the NC's etc/passwd file is NFS mounted and labelled NCDHome by the NC. An obeyfile (effectively an NC equivalent of a piece of shellscript) is then run so that, if the sysadmin wishes, a user can boot applications unique to them which are contained within their own filespace (more on this later); if the sysadmin does not wish the user to have this capability the file may simply be zeroed, chowned to an admin or dummy user, its write bits unset and its public read bit set.
The HTML page NCDHome:Home (Home,faf when viewed from Unix) is then loaded over NFS into the NC browser. As the user is at this point authenticated, pages or application files within the user's home directory which are owned by that user do not need to have their public read bits set. All HTML pages referenced from this page and subsequent pages can have the more normal .html file extension.
This method requires the user to have an appropriately-programmed smartcard, and is invoked by setting the NC's login$status environment variable to "smartcard"; in the supplied boot structure this variable is set in in ncconfig/106/pernc/all106ncs/run .
Once previous stages of booting have been completed, the NC starts the Sennen application (inside !nfsboot); this displays a non-syadmin-customisable "insert smartcard" screen.
Once a smartcard is inserted, the user is prompted to enter a four-digit PIN
which (if correct) unlocks the NFS mount details on the smartcard. The following information is retrieved from the smartcard:
·File server IP address
·Username
·Password
·URL of home page
The mount request for the user's home directory is made using the information retrieved from the smartcard; the directory is then NFS mounted and labelled as NCDHome by the NC.
NOTE THAT the server hosting the user's home directory must be running pcnfsd.
NOTE ALSO THAT this login process will not (currently) cause the obeyfile within the user's home directory to be executed.
The NC browser then requests the user's home page (Home,faf).
For the purposes of software development, most developers will not need to utilise the user identification and authentication services offered by the Smartcard interface, and for a "test bench" setup the rigour of a challenge-response login arrangement is generally not required either. Also it is envisaged that NCs may be used in an environment where it is desirable for them to auto-boot from power on to complete usability without any need for user input regarding network authentication.
It is therefore possible to configure the NC's login$status environment variable to "hardwire"; this will cause the NC to execute the ncconfig/106/login/hardwire/run file rather than run the applications associated with challenge-response or smartcard logins.
The file has the following structure:
|| Bootstrap hardwired for NC Admin home dir (dumping ground for the new HTML)
Comment
nfs
Selects the NC's NFS client as the selected filing system
logon <UserID> <Passwd>
Logs on to the boot server
mount NCDHome /export/home/<UserID>
NFS-mounts the hardwired user's home directory with label NCDHome
resourcefs
Selects the NC's resource filing system (used to access significant applications in ROM)
obey ncfresco:!Run
Start the NC's browser
As users' existing home directories are used for NC-based material, these directories remain controlled by whatever measures (eg quotad) which are already in place.
The best way to install applications on an NC server is from a RISC OS box running an NFS client in order to preserve filetype information (see Appendix B); if this is not feasible, and if the applications are supplied as Spark archives (Spark is an archiving method unique to Acorn systems, and is similar to arc; Spark archives can usually be recognised either by having a filename terminating in arc or having a filetype of ddc), they can be dearchived and the filetypes associated with their contents preserved using the nspark utility supplied with this distribution as part of the Unix server utilities pack:
# nspark -uvT <archive name>
Applications fall into two distinct categories from the point of view of configuration; those which need to be able to act upon user-supplied data files specific to them (eg wordprocessors and games which have saved-game files) and those which do not (eg terminal emulators).
Acorn suggests that, in the case of pre-existing NFS-exported user home directories, NC-specific material is retained within an "nchome" subdirectory in each user's home directory.
An example user's nchome directory (the eguser hierarchy) is incorporated within the supplied structure; it must contain:
Other HTML pages may be stored in the same directory as Home,faf and linked to it using relative anchors within the HTML of the home page; these other pages can have the conventional .html filetype.
By convention, the Files directory should contain subdirectories with names identical to the characters following the ! at the start of the name of the application which uses files of the type contained within the subdirectory; for example files created in the !Publisher application would be contained within the Files/Publisher directory and so on.
If a user is to be able to create new files when opening a given application, that application's subdirectory within Files should contain a file named __,<RISC OS hex filetype> (eg __,feb for Publisher files) which is When a user enters a filename in the "Create new file" dialogue, this __ file is copied to a new file with the filename specified by the user, with the filetype appended as a three-hexit field following a separating comma.
As the user has already been authenticated at the point where these files become accessible, the files should be owned by the user who owns the appropriate user home directory. Similarly, public read bits on these files do not need to be set.
Thc Choices directory contains per-user configurable application details; in this base pack, it is only used by the browser (to store cookies, hotlists, details of plugins and authenticated sites) and the ROM-based wordprocessor.
The !run,feb file is an obeyfile which is executed immediately following successful user authentication by the challenge-response method; this obeyfile can be used to alter environment variables for per-user customisation, and it can also be used to initialise private applications (more of which below...)
Applications may be placed within the NC boot hierarchy in such a manner that all NCs auto-recognise them at boot time and will subsequently recognise the filetypes of user-created files connected with them, or they may be located within any user's home directories such that only that user may use those applications, or they may be located within any individual NC's directory (within the ncconfig/pernc hierarchy) such that only a given NC may use those applications.
The first of these three classes of applications are referred to as "public applications", whereas the latter two types are "private applications".
It should be noted that, with very few exceptions, an NC application comprises a top-level directory which starts with a ! ; the remainder of the name of this directory is the application's name. Inside this directory you will normally find a !Boot,feb file and a !Run,feb file, among others. Many flavours of Unix treat a string beginning with the ! character as being an event handle; for it to be recognised as a component within a filename, the ! may need to be prepended with a \ .
The work required to add a public application is as follows:
Adding private applications involves jumping through most of the hoops required in adding public applications...
Launching applications from HTML is done in two ways; those applications which need to be able to act upon user-supplied data files must have access to a selector containing the user's files such that a file may be chosen or created to be acted upon. This is done by invoking a call to the NCFiler module within the HTML anchor; eg:
<h3><img align=absbottom src="file:/Images:icons/orangeball.gif" width=14
height=14><a href="NCFiler_Filer:?context=FirstPage&directory=NFS::NCDHome.$.Files.Publisher">
Impression Publisher </a></h3>
The NCFiler_Filer:?context=FirstPage&directory=NFS::NCDHome.$.Files.Publisher rune invokes the NCFiler module such that it displays a directory listing of the NFS::NCDHome.$.Files.Publisher directory (which is the NC OS equivalent of the ~<user>/nchome/Files/Publisher directory under Unix) as the next rendered page when the link is followed. When a file on this page is clicked on, its filetype, if recognised by the NC (ie if belonging to the ROM-based wordprocessor or an application which has been recognised or executed), will cause it to be loaded into the appropriate application. If necessary, the NC will load the appropriate recognised application first.
For those applications which do not need to act upon any user-supplied files, launching is achieved by making a call to the saferun module; eg:
<h3><img align=absbottom src="file:/Images:icons/orangeball.gif" width=14
height=14><a href="saferun:106appboot:!ANTTerm.!Run">VT220 Terminal
Emulator</a></h3>
Here the saferun:106appboot:!ANTTerm.!Run rune invokes the saferun module, which first checks to see whether executable code is authorised to be run from the directory referred to by the 106appboot: path environment variable (this is why it is necessary to call saferun_register when adding applications to user home directories or NC custom configuration directories); if it is, the !ANTTerm.!Run (!ANTTerm/!Run,feb when seen from Unix) file is executed to start the terminal emulator.
A number of configuration options can be permanently stored in the 1K of NVRAM inside each NC, in the manner of an EEPROM. This includes sufficient information to enable an NC to boot from a server on its local network without recourse to bootp (ie the NC enters directly into the NFS phase), and also useful local information about screen resolutions and colour depths (although this can be circumvented; this is to be documented in a later issue of these docs) and territory / localisation.
To configure an NC for static IP addressing, power it up with both ALT keys on its keyboard held down. The simple query-response system allows the NC to have the details of its own IP address, the IP addresses of its boot server, DNS and gateway / router, its netmask and the exported mount point of its boot hierarchy on the boot server configured. It should be noted that, as routing is not explicitly set up, the boot server MUST be on the NC's side of the local gateway, and in order to obtain the NC's resolved name (which is needed prior to routing being set up) the local DNS must be on the NC's side of the gateway also.
If static addressing is configured, the NC's concept of its DNS-resolved name defaults to "ARM_NoName".
This application is supplied in the ROM of every NC OS 1.06 system, and is launched from an HTML page with the rune
<h3><a href="NCConfig_Configure:?context=FirstPage"> <img align=absmiddle
border=0 src="icontype:nc_?vers"> Administration </a></h3>
This rune is supplied as part of the home page for the eguser hierarchy in the baseline distribution accompanying this document; once an appropriate territory and monitor has been configured for a given NC, it does not need to be run again and its launching rune can be removed fom user home pages.
It should be noted that attempting to configure the printer using this application will reset the printing method to using the NC's parallel port until the next time the NC is rebooted.
Introductory:
Washburn & Evans, "TCP/IP, Running a Successful Network", Addison-Wesley
Hegering & Läpple, "Ethernet - Building a Communications Infrastructure", Addison-Wesley
Intermediate/Advanced:
Stevens, W.Richard, "TCP/IP Illustrated Volume 3", Addison-Wesley
106appboot$dir
Set to "NFS::NFSBoot.$.!NFSBoot.^.apps.106.boot". This is the directory in which NC OS 1.06 applications which are to be recognised (ie have their !Boot files executed at NC boot time), are kept.
106appboot$path
Set to "NFS::NFSBoot.$.!NFSBoot.^.apps.106.boot.". Note the extra full-stop at the end means that this variable can be more easily substituted in pathnames; thus an application residing in the directory in which NC OS 1.06 applications which are to be recognised at NC boot time can be executed by calling a href="saferun:106appboot:!<appname>.!Run"
106runapps$dir
Set to "NFS::NFSBoot.$.!NFSBoot.^.apps.106.run". This is the directory in which NC OS 1.06 applications which are to be executed (ie have their !Run files executed at NC boot time), are kept.
106runapps$path
Set to "NFS::NFSBoot.$.!NFSBoot.^.apps.106.run.". Note the extra full-stop at the end means that this variable can be more easily substituted in pathnames (see 106appboot$path above).
Alias$. : Cat
*cat is NC OS' Supervisor (non-windowmanager) environment command for producing a catalogue of files in the currently selected directory. The above command merely aliases it to
" *. "
: LoadFontCache
Alias$@LoadType_FF7 : Print %0
Alias$@LoadType_FF9 : SLoad %0
Alias$@LoadType_FFA : RMLoad %*0
Alias$@LoadType_FFB : Basic -load |"%0|" %*1
Alias$@PrintType_AE6 : Run Resources:$.Apps.!NCWriter.!Run -p
Alias$@PrintType_CFF : Error You cannot print a dictionary file|M||
Alias$@PrintType_D00 : Error You cannot print a stationery pad|M||
Alias$@PrintType_D01 : Run Resources:$.Apps.!NCWriter.!Run -p
Alias$@RunType_AE6 : Run Resources:$.Apps.!NCWriter.!Run %*0
Alias$@RunType_BD6(Macro) : /<SoundPlay$Dir> %*0
Alias$@RunType_D00 : Run Resources:$.Apps.!NCWriter.!Run %*0
Alias$@RunType_D01 : Run Resources:$.Apps.!NCWriter.!Run %*0
Alias$@RunType_D3C(Macro) : /<SoundPlay$Dir> %*0
Alias$@RunType_f94 : registry_scload %*0
Alias$@RunType_F96(Macro) : /<SoundPlay$Dir> %*0
Alias$@RunType_FB1(Macro) : /<SoundPlay$Dir> %*0
Alias$@RunType_FC2(Macro) : /<SoundPlay$Dir> %*0
Alias$@RunType_FCF : LoadFontCache
Alias$@RunType_FEA : Desktop -file %*0
Alias$@RunType_FEB : Obey %0
Alias$@RunType_FED : WimpPalette %0
Alias$@RunType_FF7 : Print %0
Alias$@RunType_FF9 : ScreenLoad %0
Alias$@RunType_FFA : RMRun %*0
Alias$@RunType_FFB : Basic -quit |"%0|" %*1
Alias$@RunType_FFE : Exec %0
Alias$@RunType_FFF : Type %0
Alias$Debug : If Debug Then Echo -->
Alias$Filer_Boot : IfThere %0.!Boot Then Run %0.!Boot
Alias$NCFrescoRun : Desktop_NCFresco 2> null: -t wwwroot:logon
Alias$Netinfo : If Netinfo Then Echo :
Alias$SoundPlayStop(Macro) : /<SoundPlay$Dir> -stop
Alias$URLOpenCLI_NCConfig_Configure : NCConfig_Configure %*0
Alias$URLOpenCLI_NCFiler_Filer : NCFiler_Filer %*0
Alias$URLOpenCLI_SafeRun : SafeRun_StartTask %*0
Alias$URLOpen_exec : System:Utils.exec %*0
Alias$URLOpen_FILE : /NCFresco:!Run -URL %*0
Alias$URLOpen_FTP : /NCFresco:!Run -URL %*0
Alias$URLOpen_GOPHER : /NCFresco:!Run -URL %*0
Alias$URLOpen_HTTP : /NCFresco:!Run -URL %*0
Alias$URLOpen_logon : bin:logonpw %*0
Alias$URLOpen_SoundPlayStop : SoundPlayStop
base$version : 0.11
bin$dir : NFS::NFSBoot.$.!NFSBoot.106.bin
bin$path : NFS::NFSBoot.$.!NFSBoot.106.bin.
Boot$Dir : NFS::NFSBoot.$.!NFSBoot.106
Boot$Path : NFS::NFSBoot.$.!NFSBoot.106.
CLI$Protect
Debug(Number) : 0
Desktop$File : boot:deskboot
DeviceFS$FastParallel$Options :
DeviceFS$Parallel$Options :
DeviceFS$serial1$Options :
DeviceFS$serial2$Options :
FastParallel$Path(Macro) : devices#<FileSwitch$SpecialField>:$.FastParallel.
File$Path :
File$Type_695 : GIF
File$Type_AE6 : MSWord
File$Type_AFF : DrawFile
File$Type_B28 : URL
File$Type_B60 : PNG
File$Type_B61 : XBitMap
File$Type_B62 : Gopher
File$Type_BBC : BBC ROM
File$Type_BD6 : AudioWrk
File$Type_C85 : JPEG
File$Type_CFF : EasiDict
File$Type_D00 : EasiPad
File$Type_D01 : EasiDoc
File$Type_D3C : ArmSamp
File$Type_F96 : GenSound
File$Type_FAE : Resource
File$Type_FAF : HTML
File$Type_FB1 : WaveForm
File$Type_FC2 : AIFF
File$Type_FCC : Device
File$Type_FCF : Cache
File$Type_FEA : Desktop
File$Type_FEB : Obey
File$Type_FEC : Template
File$Type_FED : Palette
File$Type_FF2 : Config
File$Type_FF4 : Printout
File$Type_FF5 : PoScript
File$Type_FF6 : Font
File$Type_FF7 : BBC font
File$Type_FF8 : Absolute
File$Type_FF9 : Sprite
File$Type_FFA : Module
File$Type_FFB : BASIC
File$Type_FFC : Utility
File$Type_FFD : Data
File$Type_FFE : Command
File$Type_FFF : Text
FileSwitch$CurrentFilingSystem : NFS
FileSwitch$NFS$CSD : :ncdhome.$
FileSwitch$SpecialField :
FileSwitch$TemporaryFilingSystem : NFS
Font$Path(Macro) : root:apps.shared.boot.!fonts.,<Font$Prefix>.,Resources:$.Fonts.
Font$Prefix :
HTTP$SSLVersion : 2
Images$Path : Root:images.
Inet$BootFile : /ref/home/nc/distrib/beta/base/boot/
Inet$BootServer : 136.170.129.211
Inet$EnCount(Number) : 1
Inet$Error :
Inet$EtherIPMask : 255.255.248.0
Inet$EtherType : en0
Inet$Gateway : 136.170.129.77
Inet$HostName : dwalker1
Inet$LocalAddr : 1781aa88
inet$localdomain : acorn.co.uk
Inet$MimeMappings(Macro) : <NCFresco$Dir>.MimeMap
Inet$MountPath : /ref/home/nc/distrib/licensed/base/boot/
Inet$Resolvers : 136.170.131.2
inet$timeserver : 136.170.135.27
inetdbase$path : root:etc.
login$status : login
ncconfig$dir : NFS::NFSBoot.$.!NFSBoot.^.ncconfig.106
ncconfig$path : NFS::NFSBoot.$.!NFSBoot.^.ncconfig.106.
NCFresco$Config : User:Choices.NCFresco.Config
NCFresco$Cookies : User:Choices.NCFresco.Cookies
NCFresco$Dir : Resources:$.Resources.NCFresco
NCFresco$Errors : 2> null:
NCFresco$Help : NCHelp:NCFresco.index/html
ncfresco$home : user:Home/html
NCFresco$Hotlist : User:Choices.NCFresco.Hotlist
NCFresco$Path : @.,Resources:$.Resources.NCFresco.
NCFresco$Plugins : User:Choices.NCFresco.Plugins
NCFresco$ScrapTemp(Number) : -1
NCFresco$TBOptions : -t
NCFresco$Temp : 99
NCFresco$Users : User:Choices.NCFresco.Users
NCFresco$UseTB(Number) : 1
ncfresco$welcome : wwwroot:logon
NCHelp$Path : Resources:$.!Boot.HTML.Help.
NCWriter$SavePath : User:Files.Word.
Netinfo(Number) : 0
Obey$Dir : NFS::NFSBoot.$.!NFSBoot.106.bin
OS$Version : 106
Parallel$Path(Macro) : devices#<FileSwitch$SpecialField>:$.Parallel.
PDumperLJ$Extra : ||[&l1H||[&l26A
Printer$ : postscript
Printer$Path : NFS#Printer::valhalla.lime.nobody
Printers$Dir : Resources:$.Resources.STBPrint
Printers$Path : ncconfig:Printers.,Resources:$.Resources.STBPrint.,Resources:$.Resources.NCConfig.Printers.
PrinterType$0 : null:
PrinterType$1 : NFS#Printer::valhalla.lime.nobody
printertype$4 : NFS#Printer::valhalla.lime.nobody
ReplaySupport$SoundDir : Resources:$.Resources.Sound16
RISC_OSLibrary$Path : Resources:$.Resources.RISC_OSLib.
root$dir : NFS::NFSBoot.$.!NFSBoot.^
root$path : NFS::NFSBoot.$.!NFSBoot.^.
Run$Path : ,%.
serial1$Path(Macro) : devices#<FileSwitch$SpecialField>:$.serial1.
serial2$Path(Macro) : devices#<FileSwitch$SpecialField>:$.serial2.
Server$Name : jadis
sharedappboot$dir : NFS::NFSBoot.$.!NFSBoot.^.apps.shared.boot
sharedappboot$path : NFS::NFSBoot.$.!NFSBoot.^.apps.shared.boot.
sharedapprun$dir : NFS::NFSBoot.$.!NFSBoot.^.apps.shared.run
sharedapprun$path : NFS::NFSBoot.$.!NFSBoot.^.apps.shared.run.
SharedCLibrary$Path : Resources:$.Resources.CLib.
SoundPlay$Dir : Resources:$.Apps.!soundplay
Sys$Date : Thu,26 Feb
Sys$DateFormat : %24:%mi:%se %dy-%m3-%ce%yr
Sys$RCLimit : 256
Sys$ReturnCode : 0
Sys$Time : 13:42:42
Sys$Year : 1998
System$Dir : NFS::NFSBoot.$.!NFSBoot.106.System
System$Path : NFS::NFSBoot.$.!NFSBoot.106.System.
Territories$Path : Resources:$.Resources.NCConfig.Territory.
TerritoryManager$Path : Resources:$.Resources.TerrMgr.
Textease$SavePath : User:Files.Textease.
TV$Type : VGA
UK$Path : Resources:$.Resources.UK.
USA$Path : Resources:$.Resources.USA.
User$Path : NFS::NCDHome.$.
Wimp$Font : \FHomerton.Medium\ELatin1
Wimp$FontSize : 224
Wimp$Scrap(Macro) : <Wimp$ScrapDir>.ScrapFile
Wimp$ScrapDir(Macro) : Cache:$.ScrapDir
Wimp$State : commands
WindowManager$Path : Resources:$.Resources.Wimp.
Wipe$Options : C ~F ~R V
WWW$Path : Resources:$.Apps.
WWWRoot$Path : ncconfig:login.passwd.
Filles exported to NC OS have a representation when viewed from Unix which includes NC OS filetype information. NC OS inherits the RISC OS model of storing file type information; files are not conventionally stored in a <name>.<type> form, instead the filetype information is encoded as a separate three hex-digit field in the disc map.
On discs mapped in ways other than the RISC OS sense, filetypes are prefixed with a comma and appended to filenames; hence the NC OS file !Run of type Obey becomes !Run,feb under Unix. The exception to this rule is the text filetype; although filename,fff is valid, the absence of a filetype and comma (ie filename) will cause the file to be treated as plain ASCII also.
Filetype Description Hex Filetype Owner Text alias Comments
Text FileType FFF, Acorn ; ASCII text file
Command FileType FFE, Acorn ; Command (Exec) file
Data FileType FFD, Acorn
Utility FileType FFC, Acorn ; Transient program
BASIC FileType FFB, Acorn ; Tokenised BASIC program
Module FileType FFA, Acorn ; Relocatable module
Sprite FileType FF9, Acorn ; Sprite or saved screen
Application FileType FF8, Acorn, "Absolute" ; Absolute app. loaded at &8000
BBCFont FileType FF7, Acorn "BBC Font" ; BBC font file sequence of VDU
Font FileType FF6, Acorn, ; Fancy font (4bpp bitmap only)
PostScript FileType FF5, Acorn, "PoScript" ; A PostScript program
DMData FileType FF4, Acorn, "DM data" ; Dot Matrix data file
LaserJet FileType FF3, Acorn ; HP LaserJet data file
TaggedImageFileFormat FileType FF0, Acorn, "TIFF" ;
Template FileType FEC, Acorn ; Used by Arthur 1.20
Obey FileType FEB, Acorn ; Sequence of OS_CLIs
Desktop FileType FEA, Acorn ;
UNIXExecutable FileType FE6, Acorn, "UNIX Ex"
MSDOS FileType FE4, Acorn ; For DOSFS
Atari FileType FE3, Acorn ; MultiFS
Amiga FileType FE2, Acorn ; MultiFS
Make FileType FE1, Acorn
VTScript FileType FDF, Acorn
VTSetup FileType FDE, Acorn
MasterUtl FileType FDD, Acorn ; Master utilities,
SoftLink FileType FDC, Acorn
MSDOSbat FileType FDA, Acorn
MSDOSexe FileType FD9, Acorn
MSDOScom FileType FD8, Acorn
TaskObey FileType FD7, Acorn ; Obey file in a task window
TaskExec FileType FD6, Acorn ; Exec file in a task window
Pict FileType FD5, Acorn ; MSDOS Pict
MIDI FileType FD4, Acorn ; Int. MIDI assn. MIDIFiles standard
DebImage FileType FD3, Acorn ; DDE Debugable image
PCEmConf FileType FD0, Acorn ; PC emulator configuration
Squash FileType FCA, Acorn ; Single compressed file
SunRaster FileType FC9, Acorn, "SunRastr" ; A Sun (computer) Raster image
MSDOSDisc FileType FC8, Acorn ; MS-DOS MultiFS disc images
AppleMacintoshType1 FileType FC7, Acorn, "MacType1" ; Mac Format Type 1 font
PrinterDefinition FileType FC6, Acorn, "PrintDfn" ; Printer defn file
PatchDefinition FileType FC3, Acorn, "Patch" ; !Patch patch defn file
AudioInterchangeFileFormat FileType FC2, Acorn, "AIFF"
PocketBookCards FileType FBE, Acorn, "PBCards"
PocketBookWrite FileType FBD, Acorn, "PBWrite"
PocketBookAbacus FileType FBC, Acorn, "PBAbacus"
PocketBookLotusWK1 FileType FBB, Acorn, "LotusWK1"
PSPrinterDescription FileType FBA, Acorn, "PPD"
Schedule FileType FB8, Acorn, "Schedule"
Plotter FileType FB7, Acorn, "Plotter"
Agenda FileType FB6, Acorn, "Agenda"
AVI FileType FB2, Acorn, "AVI"
WaveForm FileType FB1, Acorn, "WaveForm"
Allocate FileType FB0, Acorn, "Allocate"
HTML FileType FAF, Acorn, "HTML"
TabSeparatedVariables FileType F0D, Acorn, "TSV"
CommaSeparatedVariables FileType DFE, Acorn, "CSV"
DataExchangeFormat FileType DEA, Acorn, "DXF"
TeX FileType CE5, Unknown
DVI FileType CE4, Unknown
HPGLPlot FileType CAE, Acorn
JPEG FileType C85
RichText FileType C32
AdvanceWordProcessor FileType C28, Acorn, "AWord"
AdvanceDataBase FileType C27, Acorn, "ADBase"
AdvanceSpreadSheet FileType C26, Acorn, "ASheet"
AdvanceGraph FileType C25, Acorn, "AGraph"
MPEGMovie FileType BF8 "MPEG"
FLIPlay FileType B9F "FLI"
Draw FileType AFF, Acorn, "DrawFile"
Alarms FileType AE9, Acorn
AcornReplayMovie FileType AE7, Acorn, "ARMovie"
PortableDocumentFormat FileType ADF, Acorn, "PDF"