Think how nice it would be to be start up the Desktop and have all your chosen applications already installed, your most used directories displayed, and the various memory allocations set exactly as you want them. Well, this article will explain how to do just that.
Starting up the Desktop to our own recipe is a two stage process because the memory configuration must be performed before the Desktop is started, and the installation of applications and the opening of directory viewers afterwards.
We will start by tackling the memory configuration problem, and for this we will use the Soft Configuration Utility featured elsewhere in this issue. The first stage is to create an Obey file (using !Edit) along the lines of that shown in listing 1. The first line of this is a QUIT command to ensure that the CONFIG utility will work properly. This is followed by a number of CONFIG commands to set up particular memory allocations. The two commands in listing 1 set the Font cache to 80K, and the RAM disc to 128K. For more details refer to the article itself, but note that changing the screen size will have no effect because the Task Manager automatically shrinks it as much as possible when in the Desktop.
The next line in the Obey file starts the Desktop itself, and we will come back to this in a moment. Any subsequent lines will only be executed on leaving the Desktop, and in our example serve only to return to Basic, but they could perform any function, such as using CONFIG to reset the memory allocations.
Quit
Config 4 80
Config 5 128
Desktop -FILE DeskStart
Basic
Starting up individual applications and opening directory viewers is performed by using a second file, which we shall refer to as the Desktop start-up file. This should be a text file, and can again be created using !Edit. An example of such a file is given in listing 2. It is the name of the Desktop start-up file which is specified in the *Desktop command in the Obey file (see listing 1), and both files must be in the same directory.
ADFS::Winnie.$.!System
ADFS::Winnie.$.!Fonts
ADFS::Winnie.$.!Edit
ADFS::Winnie.$.WP.LetterHead
ADFS::Winnie.$.!Dustbin
ADFS::Winnie.$.!FormEd
Filer_OpenDir ADFS::Winnie.$
Filer_OpenDir ADFS::Winnie.$.WP
Filer_OpenDir ADFS::Winnie.$.Library
Listing 2 can be thought of in two parts. The first section (the first four lines) lists the applications which are to be started automatically. The full pathname for each of the applications is used, as explained below. Additionally, you will see that the command to start !Edit is followed by a filename. This will cause not only !Edit to start up, but also to open the named file as well. You will notice from listing 2 that the first application run is !System. This is necessary in order to set up the pathname of a directory which contains various relocatable modules used by some of the applications. To be on the safe side always make !System the first application run.
Another point to note is that when the !Font application is run, a list of the available fonts is displayed. As this generates screen output, the Window Manager subsequently waits for a key, or mouse button, press before continuing. This can prove annoying when the application is run as part of an automatic startup sequence, and it can be avoided by removing the Echo and Fontcat commands from the !Font.!Run file. Again, this can be done using !Edit.
The second part of the Desktop start-up file is the set of commands to open directory viewers. These all take the form:
*Filer_OpenDir <pathname>
where pathname is the full pathname of the directory to be opened. Listing 2 gives examples of this.
Having set up both files, your customised Desktop can be started by typing *<filename>, where filename is the name of the Obey file. When several applications are being installed, the start up process can take several tens of seconds during which time you will see just the Desktop background and the pointer.
It is also possible to double-click on the Obey file from within the Desktop to restart it. There is, however, a problem with this latter method in that if CONFIG is used to enable the RAM filing system when it was previously disabled, or vice versa, then the Desktop will not recognise this and will not add or remove the RAMFS icon from the iconbar.
By naming the Obey file !Boot, and setting a Run boot option using *OPT4 2, the Desktop can be made to start complete with all your personal touches each time the machine is auto-booted with Shift Break.
When using this technique it is important to be clear about filenames. The above examples assume that the Obey file and the Desktop start-up file are in the current directory, and that the CONFIG utility is in either the current directory or the library. All other filenames (application names, data files and directories) are specified using their full pathnames. The easiest way to find out the pathname of a file or directory is to open the directory viewer containing the object in question and then appending the object's name to the title of the viewer with an interspersing dot. For example, the pathname of a file called '!Edit' in the viewer 'ADFS::Winnie.$' is 'ADFS::Winnie.$.!Edit'.