> Information
> Wishlist
> What's up?


Ben A L Jemmett ( - October 10th, 1999.

About this document

This document is an attempt to describe the format of the DESKTOP.INF file, which is used by the GEM Desktop to store information about the GEM environment and user settings, Desktop window size and position, application settings and any other options that are kept for future use.  I will try and include as many settings as possible from the original Desktop 3 source and from my newer Desktop sources.   Options not present in the original Desktop are noted as such.

General structure

The DESKTOP.INF file is made up of many lines of information, each beginning with the '#' symbol, and each line describing one part of the Desktop environment.  The second character on each line indicates which setting the line describes.  The rest of the line is ASCII text, containing information specific to the individual setting.

The file can be opened and edited by any editor capable of reading and writing plain ASCII text - if you want to modify the file by hand make sure you turn off any formatting your editor might support (WordStar, for instance, might set the high bit of some characters, which will confuse the Desktop).

GEM and Desktop environment settings

The first line of the DESKTOP.INF file is usually the environment and preferences setting.  This begins with '#E' and is followed by either four or six hexadecimal digits.  These encode the settings in the 'Set preferences...' dialog box, along with the Arrange menu selections.  Each pair of digits represents one byte, with the two or three bytes being set out as follows:

First byte:

Bit Meaning
7 (most significant) 'View as' setting - set if Icons, clear if Text.
6 'Sort by' item - 00 = Name, 01 = Type, 10 = Size, 11 = Date.
4 Confirm Deletions setting - set if Yes, clear if No.
3 Confirm Copies setting - set if Yes, clear if No.
2 Double click speed setting - these three bits must be equal to one of the numbers in the 'Double click speed' line of the 'Set preferences...' dialog.
0 (least significant)

Second byte:

Bit Meaning
4 Confirm Overwrites setting - set if Yes, clear if No.
3 Click to pull down menus setting - set if Yes, clear if No.
2 Date format setting - set for 'MM/DD/YY', clear for 'DD/MM/YY'
1 Time format setting - set for 12 hour, clear for 24 hour.
0 Sounds effects setting - set if On, clear if Off.

Third byte:

(only present in the FreeGEM Desktop 3.15 - using this on previous versions may cause unpredictable results)

Bit Meaning
3 'Detect network drives' setting - set if 'Yes', clear if 'No'.
2 'Detect drives' setting - set if 'Yes', clear if 'No'.
1 'Arrange to...' setting - set if 'window', clear if 'screen'.
0 Save on exit setting - set if 'Yes', clear if 'No'.

System colour setting

The second line of a DESKTOP.INF created with the FreeGEM Desktop 3.15 should contain the user's colour settings.  These are represented by the code '#C' and 28 digits representing the colour scheme.  The digits are grouped into 7 groups of 4, with the digits within each group representing four nibbles:

Nibble Meaning
1 Foreground colour
2 Background colour
3 Unused
4 Shade

Each group of four nibbles represents one item in the Set Colours dialog box, as follows:

Group Represents
1 Window names
2 Scroll bar sliders
3 Desktop surface
4 Buttons and 3D objects
5 Info lines
6 Alert boxes
7 Selected window title

Window definitions:

Window definitions take the form '#W' followed by 7 pairs of digits, a space, a path specification and a commercial at (@) sign.  The path specification may include a file specification if you wish.  It may also be blank, in which case the Desktop displays the Disk Drives: view.  In the FreeGEM 3.15 Desktop from build 19991005 onwards, an exclamation mark (!) may be used to display the Installed Applications window.   The seven pairs of digits represent bytes, and are ordered as follows:

Byte Represents
1 I think this represents the horizontal icon spacing, but it's zero in every case I've seen.
2 Vertical icon spacing - again, I'm not sure, as it's always zero.
3 Window's X position (in characters)
4 Window's Y position (in characters)
5 Window's width (in characters)
6 Window's height (in characters)
7 Desktop's internal window number.  This appears to be ignored when reading the file.

Accessories to load

In GEM/XM (and maybe other multi-application versions of GEM), a list of installed desk accessories and their required memory size is stored next, in the form '#A', two digits representing the size, a space, and the accessory's filename.

Desktop icons

Icons that are displayed in the Disk Drives: window (or on the desktop in GEM/1 and future versions of Desktop) are represented in the form #Lxxyyiitt M label @ specification@, where L is a letter specifing the object type, xx and yy are hexadecimal bytes representing the x and y co-ordinates of the icon on the desktop, ii is a hexadecimal byte representing the icon number for the icon, tt is unused but could be used in future versions, M is the drive letter displayed in the icon, label is the string displayed underneath the icon and specification is the path and file specification for shortcuts only.   L (object type) currently takes the following values:

Value Meaning
M Media - a disk drive the user configured with the Install Disk Drive... option.
m Detected media (Build 19990829 onwards) - a disk drive that was detected when the Desktop started.  These are kept in memory in order to cut down on reloading time between applications.  They may appear in the DESKTOP.INF file, but they should be ignored upon load.
S Shortcut (Build 19990721 onwards) - a folder icon that will jump to the specified path.
s Icon to Installed Applications window (program group) (Build 19991005 onwards) - an icon that will display the Installed Applications window.  In future released this will probably be used to display program groups.  These are functionally identical to Shortcuts, with a drive letter of !, but also display a different window title.
T Trashcan - causes the trashcan to be displayed.  Doesn't appear correctly in Desktops from GEM/2 onward.

Applications (ANODES)

An ANODE is a structure used by the Desktop to represent an application and it's data files, folders and general files on the disk.  They take the form #Liitt application @ documents@, where L is a letter specifing the object type, ii and tt are hexadecimal bytes representing the icon numbers for the application icon and document icon respectively, application is the application's file name icon and documents is a list of document filetypes associated with the application..  L (object type) currently takes the following values:

Value Meaning
D Directory - should only be used by a standard line (see below).
F DOS program, takes no parameters and doesn't need full memory.
f DOS program, takes no parameters, needs full memory.
G GEM or GSX application.
P DOS program, takes parameters and doesn't need full memory.
p DOS program, takes parameters, needs full memory.

Some values are standard to allow the Desktop to display icons for generic files and folders.  These are #FFF28 @ *.*@, #DFF02 @ *.*@, #G08FF *.APP@ @, #P08FF *.EXE@ @, #P08FF *.COM@ @, and #P08FF *.BAT@ @.  These must be present in Desktop builds from 19990830 onwards, otherwise unregistered applications will not display properly.

This page is Šopyright Ben A L Jemmett 1999 - 2000.