RISC OS 3.7 User Guide

# 3 Customising the desktop start-up procedure

This chapter explains how to control the processes between switch-on and the time when you can start working. These processes are started and controlled by the !Boot application.

On hard disc machines, the !Boot application is always stored in the root directory. Click on the hard disc icon and you will see it. (On network systems, it is known as !ArmBoot or !ShareBoot.)

Never move or delete !Boot; your computer may not work if you do!

There are two ways of modifying the start-up procedure:

- Saving a Desktop boot file (or modifying an existing one by hand)

- Changing the contents of !Boot by hand.

## Desktop boot files

You can use a Desktop boot file to save your current working environment - the desktop - so that when you next switch on the computer you will see the same desktop again.

A Desktop boot file remembers

- which applications are running on the icon bar

- any changes made to running applications (e.g. default font, window size)

- the Pinboard and backdrop layout

- any network connections

- any system configuration changes (specifically, the current RAM disc size, Font cache and System sprite allocations - see page 63).

For instance you could automatically start up Edit and Alarm, and then log onto your file server, each time you switch on.

The following sections shows you how to make a Desktop boot file, and modify it to include your own commands and scripts.

### Setting up a Desktop boot file

Before you actually save a Desktop boot file, follow these steps:

  1 Make a list of exactly what you want your Desktop boot file to do.

  2 Save any files you are working on.

  3 Delete any existing Desktop boot files (see page 54).

  4 Shutdown and then switch off your computer (see page 67) then switch it back on again.

  5 Set up your desktop as you want it to look when you switch on. This might include

  - starting one or more applications

  - opening one or more directory displays

  - loading a printer driver

  - logging on to a network.

Notes

It is important that you do not do anything that you don't want to have in your Desktop boot file, as otherwise your Desktop boot file stores unwanted instructions. In particular:

- If you want to change the name of your hard disc, do so before saving a Desktop boot file.

- Don't use the Task manager Task display window to change any configuration options before you save your Desktop boot file. If you want to change some of the configuration options it may be better to change them permanently using !Boot before you save your desktop boot file (see Changing the computer's configuration on page 31).

- If there's a floppy disc in the disc drive, dismount it. If you don't, the computer will ask you to insert it every time you switch on.

### Saving a Desktop boot file

Once you have a desktop layout on your screen that you would like to use each time you start your computer, you can save the layout:

  1 Press Menu over the Task manager icon and display the Desktop boot/Save boot file: dialogue box:

  2 Save the file by clicking on OK. Don't change the path name given in the Save box.

Now, each time you switch on or reset your computer, the Desktop boot file is used to start up and display the desktop in exactly the way it looked when you saved the Desktop boot file.

Note for network users: You can drag the Save as icon to your User Root directory on a Level 4 Fileserver (rename the file to `!ArmBoot`) or a writable directory on an Acorn Access network (you can give the file any valid RISC OS filename).

### Things to bear in mind

#### Desktop boot file overriding the CMOS RAM settings

When you run a Desktop boot file, it may be set to override some CMOS RAM settings in the !Boot configuration application. This can cause confusion. If you have saved a Desktop boot file and then change these parameters using !Boot configuration, the changes don't have any effect. This is due to the Desktop boot file overriding !Boot's settings. The following settings are affected:

- Font cache size

- Sprite cache size

- RAM disc size.

If you're not changing these settings, delete them from your Desktop boot file so that changes you make using !Boot configuration are used correctly.

#### Pre RISC OS 3 applications

Applications written before RISC OS 3 was released cannot automatically be saved using the Desktop boot option in this way. However, you can still add lines to your Desktop boot file by hand to start such applications automatically.

For example, the following line runs the application !OldApp.

Run adfs::HardDisc4.$.!OldApp

#### Changing the name of your hard disc

When you create a Desktop boot file, the file includes the name of the hard disc. If you rename your hard disc, the Desktop boot file may cease to work unless you edit or reconstruct it.

#### Moving applications

If you use the Desktop boot file to load applications, you must not move those applications to a different directory unless you also change the Desktop boot file to reflect the changes. If the Desktop boot file cannot find an application or file it simply ignores the instruction and continues.

#### NFS Filer - Desktop saving

If you have applications in the root directory of an NFS mount which you want to store in a Desktop boot file, edit the saved desktop boot file to remove the Filer_Boots of those applications, or move them after the line where the mount is mounted. This ensures that the NFS mount is present when these applications are Filer_Booted.

### Deleting a Desktop boot file

If you've created a Desktop boot file that you no longer want, go to the directory

ADFS::HardDisc4.$.!Boot.Choices.Boot.Tasks

and delete the !Boot file that is in that directory.

### Inside the Desktop boot file

It is fairly easy to inspect and edit your Desktop boot file.

The Desktop boot file is stored in the following file:

ADFS::HardDisc4.$.!Boot.Choices.Boot.Tasks.!Boot

Remember: To view the contents of an application directory such as !Boot, hold down the Shift key when you double-click on the application.

To view the Desktop boot file, start !Edit and then drag the Desktop boot icon onto the Edit application icon on the icon bar.

This section looks at the typical lines found in a Desktop boot file. You don't need to know these details to use a Desktop boot file, but an understanding may be useful if you decide to edit your Desktop boot file. To look at a Desktop boot file, drag the boot file icon from the Save boot file box to the Edit icon.

The following example uses typical entries and values; however these may be different (or not present at all) on your computer. Note that entries usually appear on one line in the Desktop boot file.

Line in Desktop boot file and action to be taken:

- WimpSlot -next 640K: Allocates memory to the next application, usually 640KB.
- ChangeDynamicArea -FontSize 32K

  ChangeDynamicArea -SpriteSize 0K

  ChangeDynamicArea -RamFsSize 0K

  (Note: 3 separate lines.)

  Reserves memory for Fonts, Sprite cache and RAM disc. Task manager changes are saved here and override !Boot configuration window settings.
- ColourTransLoadings &2 &4 &1: Gives colour balance used by the desktop. Don't change this.
- net:logon :Business Mart: Logs user Mart onto file server 'Business', and prompts for password.
- Filer_OpenDir adfs::HardDisc4.$ 2 712 712 188 -sn -si: Displays root directory of HardDisc4. Four numbers define size and position in OS units. Following parameters define display format: -li large icons -si small icons -fi full info -sn sort by name -st sort by type -ss sort by size -sd sort by date
- Filer_Boot adfs::HardDisc4.$.Apps.!SciCalc: Runs an application's boot file, storing its location and sprite in memory. Adding Filer_Boot lines for files in frequently-used directories speeds up opening these directories the first time, but makes starting up or resetting the computer take longer.
- RMEnsure VProtect 0 RMLoad System:Modules.VProtect: Runs the virus protection module VProtect. Helps protect your system against viruses. See your Welcome Guide for more information.
- Pinboard Backdrop -T ADFS::HardDisc4 .$.!Boot.Resources.Configure. Textures.T6: Starts Pinboard and displays chosen desktop backdrop.

  Note: If loading one of your own sprites as a backdrop, specify None in !Boot's Screen window (see page 40).

- Run adfs::HardDisc4.$.Apps.!SciCalc: Starts SciCalc. You can run any application in this way.
- Set Edit$Options F13 B1 W8 H12 NTrinity.Medium: Sets up configuration options for Edit (options are saved automatically in a Desktop boot file). See Configuring applications on page 427.

  You can store configuration options without loading applications.

#### Commenting out lines in a Desktop boot file

If you don't want the computer to run an application on start-up, you can comment out the relevant line in the Desktop boot file by typing a | character at the beginning. This is simpler than saving a whole new Desktop boot file; you can uncomment the line later if you want to start using the application again.

| Run adfs::HardDisc4.$.Apps.!SciCalc

## Saving all of !Boot

!Boot is one of the most important applications on your computer. Without it your computer won't work correctly. Save a copy of !Boot before you start changing any configuration parameters within it (follow the directions given in Backing up hard discs on page 81, but only copy !Boot itself).

You could also make a copy of !Boot on the hard disc so that you can quickly copy back a working !Boot if you have problems. When you copy !Boot, give it a different name (for example, BootCopy) that does not begin with an exclamation mark. This ensures that the computer does not think it is an application. You can also restore the !Boot file to its factory default values using the !ResetBoot application in the Diversions directory (but this will not restore a completely deleted !Boot file).

## Inside the ! Boot application

This section is not essential reading. If you don't feel you need to know about the !Boot application, you can skip this section.

!Boot is a collection of files and applications that are used to control the desktop. You won't need to know about all of them, just the few essential ones. The most important is the Desktop boot file, described earlier.

The !Boot application contains the essential resource applications that most applications use; !System, !Scrap and !Fonts. It also contains the configuration application ! Configure (this is what you actually see if you double-click on !Boot).

### The PreDesktop file

The PreDesktop file is used to configure the computer for particular purposes. You won't normally need to change any of the parameters in this file. However, if you do need to change the way your computer works, put any changes in this file. Examples of how to use this file are given in the file itself.

The PreDesktop file has the following pathname:

`ADFS::HardDisc4.$.!Boot.Choices.Boot.PreDesktop`

You can edit the PreDesktop file by loading it into Edit (Shift double-click).

#### Aliases

This section is used for setting system aliases. This part of the file is only of use if you use the command line interface.

#### Paths

This section of the file is used for defining standard paths and directories. It is only of use if you are programming.

#### Options

A section for placing other options that may need to be set up.

#### ResApps

This section registers applications with ResourceFS for display in Resources:$.Apps (the Apps directory on the icon bar). The line in the file registers all the applications currently in the Apps directory on the hard disc. You can also add your own choices of application here using the AddApp command:

AddApp ADFS::HardDisc4.$.Utilities.!ChangeFSI

#### Misc

A section for placing additional instructions such as

- modules and sprite files to be loaded

- obey files to be run

- application directories whose !Run files are to be run.

### Resource applications

Inside !Boot, there are three resource applications; these resources are used by the computer and by other applications to store essential information. However, you won't often use them directly in your everyday computing tasks.

#### !System

! System is used to store new system modules (to replace or supplement existing parts of the operating system).

You may need to add modules by hand because they are not supplied as part of a !System. The !System application can be found in `!Boot.Resources`. Copy the modules to the `Modules` directory within !System.

When you buy more applications for your computer you may find that additional modules are supplied in the form of a !System application. The !System supplied with the application must be merged with the !System in the computer using the !Boot configuration application. See page 31 for more details.

#### !Scrap

! Scrap is used to store temporary files. Applications often use temporary files during copying, printing and saving; these files are erased when they are no longer needed.

#### !Fonts

!Fonts is used to store the fonts needed by the desktop and applications. If you have many fonts, !Boot may create additional !Fonts applications in which to store them.

When you buy additional fonts, or applications that contain new fonts, you will find that the fonts are normally supplied in a !Fonts application. This !Fonts must be merged with the !Fonts in the computer. Use the !Boot configuration option to do this; see page 46 for more details.

Similarly, you may need to add fonts by hand because they are not supplied as part of a !Fonts. The !Fonts application is in `!Boot.Resources`. Copy the new font directory into !Fonts.

### Other files in the !Boot application

#### Resources directory

This contains the resource applications !System, !Scrap and !Fonts and the configuration resource !Configure and its associated Configure directory. If you want to make sure that no one changes the computer's configuration, it is possible to remove the !Configure application from this directory. If you do this, double-clicking on !Boot give a message that you cannot configure the computer.

#### Utils directory

This contains utilities used by the !Boot application.

#### Library directory

This contains utilities used by the !Boot application that can also be used by other applications.

#### Choices.Boot directory

This contains:

- The PreDesktop file already described.

- The Desktop file (used as a supplemental file for commands not put in the PreDesktop file).

- The PreDesk directory which contains desktop configuration information. This is executed before the Desktop starts.

- The Tasks directory which contains the Desktop boot file (called !Boot). It also contains other files to be executed after the Desktop starts.

####