Masterclass If you have an Amiga with Workbench 3.1 (or Workbench 2), you may have noticed that three seemingly useless drawers always seem to appear in the Ram Disk. You can check for them now: double click on the Ram Disk and select the "Show... All Files" option from the Window Workbench menu. These drawers are set up by the Amiga's Workbench as it loads, and I have often been asked what purpose they serve. Sometimes I'm asked why can't the drawers simply be deleted to gain more free memory. Hopefully, after this Masterclass you'll see that the drawers in Ram disk are actually extremely useful and well worth keeping. The first of these drawers is the T (for temporary) directory, and in here some programs occasionally store information that they need to keep track of. For example, if you use Directory Opus to call image viewing programs it will often generate some data and store it in the T directory. The mail program Spot will keep text files in T whilst they are edited. AmigaDOS script files often open files in T whilst they work. There is nothing to be gained by trying to delete this data or re-directing it to disk: it's stored in Ram simply to speed operations up. It could be stored on disk instead, but on a single-floppy system this could bring about a lot of tedious disk swapping, and even on a hard drive system it would waste time. Another reason why T is located in Ram is because the information stored there isn't vital to national security by any means, and if the information is lost when the computer is switched off then no-one will cry too much. Clipboards The second drawer is the Clipboards directory. Whenever you use Copy or Cut from a program, it should theoretically store whatever has been copied or cut in a special device called the Clipboard. For example, text editors should store the text cut or copied in the Clipboard. Again, it's a matter of speed and the non-vital nature of the data which makes the Ram disk the perfect location, but with Clipboards comes the option to share the data between different programs, as data stored there should be kept in a standard format. Unfortunately, not all programs use the Clipboard in the proper way (or at all), but those that do can be particularly useful. Often I find it a great time saver to snip text from an AmigaDOS Shell window and paste it into the text editor Cygnus Ed. With a public domain utility such as PowerSnap it is even possible to paste into file requestors, which is incredibly useful if you have a very long path to try and retype several times. If you keep watch in Clipboards, you won't often see any data actually appearing in the Clipboards directory itself, but if you do you will know what it's for and that deleting it probably isn't a good idea. Environmental Archives Probably the most interesting secret Ram drawer in the ENV directory. When the Amiga boots from floppy or hard disk into the Workbench, it has quite a lot of setting up to do: which is one reason it seems to take so long. At one point in the booting procedure, the ENV drawer is created in the Ram Disk. Into this drawer is copied the entire contents of the ENVARC directory, which has been stored on the bootdisk in the path SYS:Prefs/Env-Archive. ENVARC stores vital information which the Amiga Workbench, and any other programs you may have installed, need to know when started. The Amiga will want to know which screen mode to use, the overscan preference settings, the chosen font, which printer, which colours to use... all this information needs to be stored somewhere permanently or it would need to be re-set each time the Amiga was switched on. Other programs will also need to store their various settings, and ENVARC provides a neat and sensible way to keep track of all these settings. Each program creates its own drawer inside ENVARC, and keeps all its own private data in there, where it knows it can count on it being stored. The program IPrefs in the startup-sequence looks at the ENV settings to make sure the Workbench is set up properly when the Amiga boots. For speed, the Workbench and other programs normally obtain their settings directly from the ENV directory. When you use a Preferences tool (such as Screenmode) you'll see two options: SAVE and USE. If you select USE, the changes in the settings are copied solely to the ENV drawer. This means the new settings will be available to any programs (or the Workbench) from time time onwards. However, switch the computer off and on again, and the changes will be lost: this is because the changes were only stored in memory. On the other hand, if you use the SAVE option, the settings are altered in ENV as before, but also in the ENVARC directory on the disk. So next time the computer is switched on, the settings are copied from ENVARC to ENV as usual and the new settings will be in operating. This means that the USE option is very handy for testing out new preferences, because you can always be sure that to get back to normal all you need to do is reset the computer. Only the SAVE option will make the changes permanent. If you look in your ENV drawer, you may find drawers which have names similar to your software. For example, I have a Mosaic directory in ENV, which contains my preferences for the Mosaic World Wide Web program. I also have drawers for AdPro, CED and quite a few other programs: all were added automatically at the time the software was installed. It can be informative to look in this files, and sometimes if you have deleted a program because you don't use it anymore, you can reclaim some space by removing the entry from the ENVARC directory. Remember that deleting the files in ENV only won't actually do much, as next time the computer is reset the files will be copied back into memory. Only delete file you are absolutely sure you don't need any more. If you are experimenting with AmiTCP and internet software, you will soon collect a vast repetoire of files in your ENV drawer, and it pays to try and keep track of them all. In ENV, look out for files such as "Kickstart" and "Workbench". They are created at boot time and contain the release versions of the Amiga operating system in case any programs needs to know what type of machine they are running on. Don't bother deleting them: they only take up a few bytes anyway. Icons Other interesting information is kept in the ENV drawer. Have you ever wondered where the default settings for the Workbench icons are set? The images for all the trashcan, drawers, disks and tools? When a drawer is created from the Workbench, the icon used is copied from the image contained in ENV:Sys/def_drawer.info. By saving your own image in this directory with this name, you can alter what happens when you create a new drawer. The same is true for projects and other files: you can add your own icons by altering these default images. Try saving the ENV rather than the ENVARC version and then examining the Ram disk drawers to see how the finished drawers will appear. Each disk can also have a unique icon associated with it. If you look at a directory listing of a hard drive partition, you might see an icon named disk.info, and this is the graphic displayed for the disk. Using IconEdit you can save your own image (which is how I get the comic characters to appear on my Workbench). Like any other icon, you can edit them and re-save them. This will mean that any subsequent drawers created with have the new graphic to go with them. The "SAVE AS DEFAULT" option in the Icon Editor program saves the new images to ENV and ENV as you would expect. When saving icons you MUST remember to set their type correctly. You must ensure a disk icon is set to a disk icon, and not a drawer, tool or project. The only really tricky icon to change is the Ram Disk icon. As you might expect, it isn't possible to create a .info file for the Ram disk as it would vanish as soon as the Amiga was switched off. There isn't a special setting for the Ram Disk in the ENV drawer, and instead you will need to resort to a little jiggery pokery. The simplest way to make sure your Ram Disk has a shiny new icon is to add a line like this: copy > nil: sys:s/plop.info to ram:disk.info to your user-startup script file. Thus, when the Amiga boots up, it will execute the user-startup file as per usual and copy the new icon (plop.info) over the Ram Disk's default. Save you own icon called plop.info in the location of your choice, and then add a similar line to your start-up sequence. This messing around with the default icon settings and adding lines to the start-up sequence is exactly how Magic Workbench system manages to replace all the boring default icons with the very pretty shaded versions it uses. Nice Workbench? If you have created a really cool Workbench environment, please let us see. We'll publish the smartest looking screen displays here, so others can see what a clever dick you are and can also try and improve their own surroundings. Let's banish old blue and grey displays for ever! Send an IFF snapshot of your Workbench on disk to the magazine, or by e-mail to cuamiga@cix.compulink.co.uk, or 2:443/13.4. Let's see what you can come up with! captions drawers1.iff Here are the three "hidden" drawers which always appear in the Ram disk. Notice how I have designed new Icons for them by loading in ENV:sys/def_drawer.info and shrinking them slightly. As you can see, a little more work is required. prefs.iff Each of the preferences tools (here with their MagicWB icons) can either Save or Use the settings made to them. saveuse.iff If you select USE from a preferences requestor like this, the settings are written to ENV, in ram. However, select SAVE and the settings are also stored in ENVARC, which is on disk and therefore "permanent". types.iff Remember that each icon MUST have it's type set correctly. All drawers must be drawers, all disks set to disks and so on, or odd things can happen.