Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xdt3(X) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Xsco(X)

mwm(X)

deskshell(X)

deskcommands(X)


 xdt3(X)                       06 January 1993                        xdt3(X)


 Name

    xdt3 - the graphical user interface for the Desktop

 Command syntax

    xdt3 [Xtoptions]

 Description

    xdt3 is the X client that determines the behavior and appearance of the
    Desktop. xdt3, also referred to as the Desktop, provides a graphical user
    interface for executing utilities and applications, moving through direc-
    tories, and manipulating files.

    Icons are used to represent utilities, applications, files, and direc-
    tories on the Desktop.  The Desktop can be used to attach icons to files
    and to define the behavior generated by manipulating those icons with the
    mouse.  For example, you can open windows for files and directories or
    run programs and utilities by doubling-clicking on their corresponding
    icons.

    Desktop-specific features such as icons, menus, and mouse actions are
    primarily defined in Desktop objects and rules within rule files. The
    Desktop resource file also affects elements of the behavior and appear-
    ance of the Desktop.  This manual page includes sections on objects,
    rules, rule files, and important Desktop resources.

 Command options

     xdt3 supports all of the the standard Xtoptions(X) except the -iconic
    option.

 Desktop options

    You can invoke a menu option either with the mouse or with the provided
    keyboard sequences displayed on the menus. If the menus are to be invoked
    with the keyboard, the main Desktop window must first be made ``active'';
    this is done by pressing the <Shift><Alt><F2> keys simultaneously.

    Once the main Desktop is made active, many menu options can be invoked
    through a keyboard key combination at any time within the Desktop.  For
    example, press <Ctrl>C to select the Clean up option from the View menu.

    Most menus and menu options also have an underlined letter, called a
    mnemonic, that you can also use to open menus and select options from
    open menus.  For example, press <Alt>F to open the File menu or press
    <Alt>O to select the Open option from the already open File menu.

    The following is a summary of all of the Desktop menus and their menu
    items.

    File menu

    The File menu provides options that manipulate Desktops, directories, and
    files.

    Open              opens the selected icon, or if no icons are selected,
                      opens the file or directory you enter at a prompt

    New Desktop...    creates a new Desktop

    Save Desktop      saves the current Desktop with its current organization

    Save Desktop As...
                      saves the current Desktop under a different name

    New Directory...  creates a new directory

    New File...       creates a new file

    Copy to...        copies selected icons to another directory or desktop

    Move to...        moves selected icons to another directory or desktop

    Rename...         renames selected icons

    Duplicate...      copies a selected icon within the same directory

    Discard           places selected icons in the Trash Directory

    Properties...     displays the properties of selected icons, including
                      file information, access times, and permissions

    Find...           searches the filesystem under the current directory for
                      a file or directory

    Exit              exits from the Desktop


    Edit menu

    The Edit menu provides options that manipulate icons on the Desktop.

    Put Away          returns selected icons from the Desktop to their
                      default directory windows. Icons that are locked on the
                      Desktop cannot be put away and remain in place.

    Select All        selects all icons on the Desktop

    Deselect All      de-selects all currently selected icons


    View menu

    The View menu provides options that rearrange icons on the Desktop.

    Clean up          arranges icons in a grid pattern

    Reorganize        lines up all icons on the Desktop in neat rows across
                      the width of the screen


    Help menu

    The Help menu provides information on getting and using help on the Desk-
    top.

    On Object         gives you help on an object selected from the Desktop

    On Window         displays a menu of help topics

    On Keys           is a list of the accelerator keys

    Index             gives you the scohelp table of contents

    On Help           tells you how to get specific help

    On Version        tells you the version of the Desktop


 Default Desktop icons

    When the Desktop is started up for the first time, a set of icons is on
    it by default.  Icons appear by default on the Desktop if their full
    pathnames are included in the initial Desktop rule file, located by
    default in  the following pathname:

       $HOME/Initial.dt

    where $HOME represents your home directory.  Desktop rule files are dis-
    cussed in the Rule file section later in this manual page.

    You can make icons appear by default on the Desktop by dragging them onto
    the Desktop from a directory window.  Icons can be removed from the Desk-
    top by using the Put Away option from the Edit menu.

    Alternatively, you can make icons appear by default on the Desktop by
    adding their full pathnames to the initial Desktop rule file; you can
    also make icons not to appear by default by removing their pathanmes from
    this file.

    _________________________________________________________________________
       NOTE  The latter method is not recommended and should only be done
       if the first method is not practical.  For more information on add-
       ing and removing icons from Desktop rule files, see the Graphical
       Environment Administrator's Guide.
    _________________________________________________________________________

    The following is a brief description of the icons that appear on the
    Desktop by default:

    Home directory icon
              This icon represents your home directory, specified in the
              $HOME environment variable.  Each icon appearing in this direc-
              tory has a corresponding file or directory in your home direc-
              tory.
              The full pathname of this directory is the same as the value
              held in the $HOME environment variable.

    Accessories directory icon
              This icon represents the Desktop's accessories directory.  This
              directory contains icons that represent some of the accessory
              programs to the Desktop.  By default, this directory contains
              the following:

              +  the Calculator icon
                 Double-click on this icon to display a scientific calculator
                 program.

              +  the Clock icon
                 Double-click on this icon to display a clock program.

              +  the DOS icon
                 Double-click on this icon to open a DOS window.  If DOS is
                 not installed on the system, double-clicking on this icon
                 produces a window that tells you it is not installed.

              +  the Edit icon
                 Double-click or drag and drop a file on this icon to invoke
                 your default text editor. This icon appears on the main
                 Desktop by default.

              +  the Find icon
                 Double-click on this icon to find a file for which you know
                 the name.

              +  the Help icon
                 This icon appears on the main Desktop by default.  Double-
                 click on this icon to get on-line help about the Desktop and
                 Desktop tools.

              +  the Load icon
                 Double-click on this icon to get a graphical representation
                 of the usage on your system.

              +  the Mail icon
                 Double-click or drag and drop a file on this icon to invoke
                 your default mailer.  This icon appears on the main Desktop
                 by default.

              +  the Paint icon
                 Double-click or drag and drop a picture file on this icon to
                 invoke the pixmap editor.  This icon appears on the main
                 Desktop by default.

              +  the Print icon
                 Double-click or drag and drop a file on this icon to print a
                 file.  This icon appears on the main Desktop by default.

              +  the UNIX icon
                 Double-click on this to open a  UNIX window.  This icon
                 appears on the main Desktop by default.

              The full pathname for the accessories directory is:

                 /usr/lib/X11/XDesktop3/<lang>.xdt/toolsheds/Accessories

              _________________________________________________________________________
                 NOTE  <lang> refers to the value set in the LANG environ-
                 ment variable or the first value specified in the file
                 /etc/default/lang.
              _________________________________________________________________________


    Controls directory icon
              This icon represents the Desktop's controls directory.  This
              directory contains icons that represent some of the programs
              that control the behavior and appearance of the Desktop and
              Desktop tools such as the mouse.  By default, this directory
              contains the following:

              +  the Color icon
                 Double-click on this icon to change the color schemes for
                 all Desktop windows.

              +  the Lock icon
                 Double-click on this icon to lock your terminal keyboard.

              +  the Mouse icon
                 Double-click on this icon to change mouse characteristics.

              +  the Session icon
                 Double-click on this icon to change how you start and exit
                 the Desktop or to customize the default Desktop.

              +  the Administration icon
                 Double-click on this icon to run the sysadmsh utility.

              +  the Preferences icon
                 Double-click on this icon to change the appearance of your
                 Desktop.

              The full pathname for the controls directory is:

                 /usr/lib/X11/XDesktop3/<lang>.xdt/toolsheds/Controls

              _________________________________________________________________________
                 NOTE  <lang> refers to the value set in the LANG environ-
                 ment variable or the first value specified in the file
                 /etc/default/lang.
              _________________________________________________________________________


    Applications icon
              This icon represents the Desktop's applications directory.
              This directory contains icons that represent some of the appli-
              cation programs that are available on the Desktop. By default,
              this directory contains the following:

              +  the Portfolio icon
                 Double-click on this icon to invoke a menu-driven Desktop
                 program.

              +  the Word icon
                 Double-click on this icon to invoke the Microsoft-Word text
                 editor.

              _________________________________________________________________________
                 NOTE  These applications are not installed on the Desktop
                 by default.  Unless these applications are installed, the
                 icons will not execute anything.
              _________________________________________________________________________


              The full pathname for the applications directory is:

                 /usr/lib/X11/XDesktop3/applications


    Trash icon
              This icon represents the trash directory.  To remove a file or
              directory, drag the file or directory icon to the Trash icon
              and drop it.  Files and directories can be recovered from the
              trash directory until the directory has been emptied.

              The full pathname for the Trash icon is:

                 $HOME/trash

              where $HOME represents your home directory.

    Edit icon This icon represents the Edit accessory.  Double-click or drag
              and drop a file on this icon to invoke your default text edi-
              tor.

              The full pathname for the Edit icon is:

                 /usr/lib/X11/XDesktop3/<lang>.xdt/toolsheds/Accessories/Editor.obj


    Mail icon This icon represents the Mail accessory.  Double-click or drag
              and drop a file on this icon to invoke your default mailer.

              The full pathname for the Mail icon is:

                 /usr/lib/X11/XDesktop3/<lang>.xdt/toolsheds/Accessories/Mail.obj


    UNIX icon This icon represents the UNIX window accessory.  Double-click
              on this icon to open a  UNIX window.  The UNIX window emulates
              the SCO ANSI console, producing a window 80 columns wide and 25
              lines long.

              The full pathname for the UNIX icon is:

                 /usr/lib/X11/XDesktop3/<lang>.xdt/toolsheds/Accessories/Unix.obj


    Print icon
              This icon represents the Print accessory.  Double-click or drag
              and drop a file on this icon to print a file.

              The full pathname for the Print icon is:

                 /usr/lib/X11/XDesktop3/<lang>.xdt/toolsheds/Accessories/Print.obj


    Help icon This icon represents the Help accessory.  Double-click on this
              icon to get help on the Desktop, Controls, Accessories, or com-
              mands.

              The full pathname for the Help icon is:

                 /usr/lib/X11/XDesktop3/<lang>.xdt/toolsheds/Accessories/Help.obj

    _________________________________________________________________________
       NOTE  <lang> refers to the value set in the LANG environment vari-
       able or the first value specified in the file /etc/default/lang.
    _________________________________________________________________________

    The Edit, Mail, UNIX, Print, and Help accessories are all implemented
    with objects (and object directories). See the following section for more
    information on objects.


 Objects

    Objects are used for linking mouse actions or ``triggers'' to system or
    Desktop actions and tasks. A single object, represented by a user-
    selected icon, can have different scripts to interact with a binary in
    different ways; objects are consequently useful for implementing applica-
    tions on the Desktop.


    Some advantages of objects are that they are self-contained, well-suited
    for portability, easily exchanged from user to user, simply structured
    and easy to debug.


    An object is a directory that contains several specific files but behaves
    as if it is a single entity with its own icon. These files determine the
    various properties of the object, including the picture used for the
    object icon, and the specific actions that are executed when the object
    is manipulated.


    The main guidelines associated with objects are:

    +  An object directory is created with the desired name of the object,
       followed by the extension ``.obj''.

    +  The icon for the object is placed in the object directory with the
       filename picture.px.  A pixmap, also called a picture file, is used to
       generate the icon.  For more information on creating and using pix-
       maps, see the Graphical Environment Administrator's Guide.

    +  System or Desktop actions can be defined to correspond with each
       required manipulation of the object (clicking, dragging and dropping,
       and so forth), using object scripts.

    +  A sequence of mouse actions and optional keystrokes is referred to as
       a trigger or trigger action.  For example, an s1 trigger is defined by
       default to be a double-click using mouse button 1.  You can define s99
       to be a double-click using mouse button 99, which can be represented
       by pressing mouse button 3, <Ctrl> and <Alt>.  For more information on
       defining your own triggers, see the Graphical Environment
       Administrator's Guide.

    +  An object script, which must end with the extension ``.objscr'', is a
       file that corresponds to and specifies actions for a particular
       trigger action.  For example, s1.objscr is the object script that cor-
       responds to the s1 trigger.

    +  Up to 297 different trigger actions (s1 ... s99, h1 ... h99, and d1
       ... d99) can be defined per object, with each object script optionally
       specifying different activity by the system.

    For example, you could define an object with the title ``Compress'' in a
    directory named Compress.obj.  The icon for the object ``Compress'' is
    then stored in Compress.obj/picture.px.

    In the object script Compress.obj/s1.objscr, you could define any action
    that is to occur when the icon is activated by double clicking the first
    mouse button on it , called an s1 trigger action.

    Similarly, in the object script Compress.obj/d1.objscr, you could define
    any action that is to occur when an icon is dragged and dropped onto it
    with mouse button 1, called a d1 trigger action.

    Finally, in the object script Compress.obj/h3.objscr, you could define
    any action that is to occur when the third mouse is pressed and held down
    on the icon, called a h3 trigger action.

    For more information on objects, see the Graphical Environment
    Administrator's Guide.

    Scope of objects

    When objects are created in this manner, they are visible and available
    for use when you open the directory containing the object directory,
    referred to as the parent directory, is opened.  They are also made visi-
    ble if you have dragged them onto the Desktop.

    If you want a particular object to appear on all users' Desktops, it is
    best to use the common directory called Applications.  All objects that
    are to be universal should be defined in this directory.  In addition,
    you should edit the Desktop rule file, described later in this manual
    page, so that the common directories appear by default on all user Desk-
    tops.

 Rule files

    Rule files are Desktop-specific configuration files.  The rule files can
    exist in various locations on the system. Their location determines the
    impact the rules have on your users.  For example, rules can have
    system-wide, directory-wide, Desktop-wide or single user-wide effects,
    depending on which rule file they are in.

    While any rule can be defined in any rule file, certain rules are better
    suited to particular rule files.  For example, directory behavior should
    be specified in a local rule file; general menus should be defined in the
    system rule file; and a Desktop- specific menu should be specified in the
    Desktop rule file.  Stand-alone applications, however, should be defined
    in an object.

    Rule file types

    The main types of rule files are:

    Local rule files  define the specific behavior for the contents of the
                      directory in which the file is located or the directory
                      itself.  The contents of a local rule file are only
                      read when the directory containing it is opened.

                      For example, an archiving directory can be created
                      which compresses any file dragged into its directory
                      window. This information is specified in a local rule
                      file.

                      The default filename is:

                         <directory name>/.xdtdirinfo

                      or as specified in the Desktop resource file.  For more
                      information on the Desktop resource file, see the Desk-
                      top resources section near the end of this manual page.

    Desktop rule files
                      define the appearance and behavior of the Desktop. Gen-
                      erally, the Desktop rule file specifies which file and
                      directory icons are on the Desktop, and their posi-
                      tions.

                      The contents of the Desktop rule file are only examined
                      when the Desktop is opened.  Changes made graphically
                      to the Desktop's appearance are implemented immedi-
                      ately; changes made to the Desktop by editing the Desk-
                      top rule file do not take effect until the next time
                      the Desktop is opened.

                      The initial Desktop is specified by default in the file
                      Initial.dt in each user's home directory.

                      You can have additional Desktops open at any time.
                      Desktop rule files allow users to have different rules
                      for different Desktops; for example, a user might have
                      both a programming environment and a text editing
                      environment.  A new Desktop is created by defining a
                      new Desktop rule file.  Desktop rule files should have
                      the desired Desktop name, followed by the extension
                      ``.dt''.  For example, the file Find.dt corresponds to
                      the ``Find'' Desktop.

                      The default filename is:

                         $HOME/Initial.dt.

                      where $HOME represents your home directory.  Desktop
                      rule files are discussed in the Rule file section that
                      occurs later in this manual page.

    User rule files   apply only to a specific user on the system.  User rule
                      files allow users to give their Desktops different
                      appearances and behaviors.

                      For example, advanced users can define short cuts for
                      all their frequently used operations, whereas less
                      experienced users may prefer to work on a simpler sys-
                      tem in which they are less likely to make a mistake.

                      The default filename is:

                         $HOME/.xdtuserinfo

                      or as specified in the Desktop resource file.  For more
                      information on the Desktop resource file, see the Desk-
                      top resources section near the end of this manual page.

    System rule files are generic or default rules that apply across the sys-
                      tem to all users.

                      The contents of the user and system rule files are only
                      examined when the Desktop starts up or after the Desk-
                      shell command reset. For more information on Deskshell
                      commands, see the Graphical Environment Administrator's
                      Guide, or the deskshell(X) and the deskcommands(X) man-
                      ual pages.

                      The default filename is:

                         /usr/lib/X11/XDesktop3/<lang>.xdt/xdtsysinfo

                      or as specified in the Desktop resource file.  For more
                      information on the Desktop resource file, see the Desk-
                      top resources section near the end of this manual page.

                      _________________________________________________________________________
                         NOTE  <lang> refers to the value set in the LANG
                         environment variable or the first value specified
                         in the file /etc/default/lang.
                      _________________________________________________________________________


    Dynamic rules

    In addition to the rule files already discussed, dynamic rules can be
    used to specify rules. Unlike rule files, dynamic rules need not be
    specified in a particular file with a specific naming convention.
    Instead, dynamic rules have the following unique properties:

    +  Dynamic rules are valid for only part of the session; they are in
       effect from the time they are loaded until they are unloaded.

    +  Dynamic rules can be specified to load or take effect once particular
       Desktop actions occur.

    +  Dynamic rules are loaded through the Deskshell command dynamicrule;
       they need not be stored in files.

    +  Dynamic rules cannot be changed after they are loaded, but they can be
       unloaded by using the Deskshell command removedynamicrule.  For more
       information on Deskshell commands, see the Graphical Environment
       Administrator's Guide, or the deskshell(X) and the deskcommands(X)
       manual pages.

    +  When they are loaded, you can specify when the dynamic rule is read in
       relation to other dynamic rules.


    Precedence of rule files

    Rule files can be located in various locations on the system, and the
    location determines the scope of the rule file.  For example, a rule file
    located in a user's home directory affects only operations done by that
    user, and a local rule file affects only the files in the directory that
    contains it.  The system rule file applies to all operations for all
    users on all files, unless it is superceded by some other rule file.

    When it needs a certain rule, the Desktop searches the various rule files
    in the order shown later in this section; once it finds a certain type of
    rule, it does not look for other instances of that rule.  For example, if
    a local rule file specifies an icon for a particular file, the Desktop
    does not look to see whether a different icon is specified in a Desktop,
    user, or system rule file.  Hence, the local rule file is said to ``take
    precedence'' over all other rule files.

    The main types of rule files are searched in the following order:

    Local rule files  provide rules that apply only to the files in the
                      directory.  These can be found in any directory.

    Desktop rule files
                      provide rules and that apply only to the files on the
                      Desktop.  These can be found in any Desktop.

    Dynamic rules     are only valid if and when they are loaded.  They cease
                      to be valid if and when they are unloaded.

    User rule file    defines rules that only affect the user

    System rule file  contains default rules and specific global rules that
                      apply to all Desktops running on a given machine,
                      unless different rules are explicitly defined for the
                      directory, the Desktop or the user in a rule file or
                      dynamic rule.  There is only one such file, and it
                      should only be changed by the system administrator.

                      System and user rule files are preloaded; therefore,
                      any changes made to these files take effect the next
                      time the Desktop is run.


    Internal rule precedence

    This section provides a list of guidelines for which rules have pre-
    cedence over others within a rule file.

    In general, more specific statements take precedence over general state-
    ments.  The internal precedence can be determined using the following
    guidelines:

    +  Absolute pathnames have a higher precedence than relative patterns.
       For example, /usr/joel/*.c is higher than *.c.

    +  A match is defined to be one of the following two conditions:

       +  pattern and a class match; for example, ``*.c /F''

       +  specification of a required item such as a title, picture, or
          trigger action

    +  If two matches are found within the same file, the first one found
       takes precedence.

    +  If two matches are found in two different files, the match in the file
       with the higher precedence is used.

    _________________________________________________________________________
       NOTE  Dynamic rules have a separate precedence hierarchy that is
       different than the one described here. For more information on the
       precedence of dynamic rules, see the Graphical Environment
       Administrator's Guide.
    _________________________________________________________________________


    Selecting a rule file

    To determine the most suitable rule file in which to insert a rule,
    analyze the desired impact upon users. First, evaluate how widespread a
    particular rule's effect should be. Second, consider the type of rule
    being inserted. Certain rule types are well-suited for particular rule
    file types (desktoplayout rules are suited for the Desktop rule file,
    for example).


    The following is a list of general guidelines to follow when choosing a
    rule file:


    +  In general, any behavior that should be restricted to a particular
       environment should be defined in a local rule file.


    +  Any rule that could be potentially disruptive should be placed in the
       Desktop or a local rule file first, and then tested. This way, the
       rest of the Desktop remains unaffected, even if undesirable behavior
       occurs.


    +  Any actions that are relevant to the general appearance and behavior
       of the Desktop should be placed in the Desktop rule file.  For exam-
       ple, menus specific to a Desktop should be inserted there.


    +  lockedondesktop and desktoplayout rules, for example, are
       inherently Desktop-wide issues and therefore are well suited for the
       Desktop rule file.


    +  Any rules that a user requires all the time, but are not relevant to
       all users, should be placed in the user rule file. Rules placed in
       here will be available to the user at any time, in any directory or
       any Desktop (unless they are over-written by a higher precedence rule
       in a local or Desktop rule file).


    +  Rules placed in the system rule file affect all users on the system.
       In general, do not edit the system rule file unless the actions
       defined are essential to all users and cannot be handled through any
       other Desktop means.


    +  Because user rule files exist to allow users to customize their Desk-
       tops, the system rule file should limit itself to rules governing sys-
       tem operation, user interaction, and default values.


    +  Dynamic rules should be used for rules that are needed for only part
       of a session or that are required while running a particular program.


    +  Dynamic rules are used in special circumstances and should not be
       chosen for rules that are frequently used within a session.


 Rules

    Rules, found within rule files and dynamic rules, can be used to config-
    ure icon pictures, icon titles, Desktop layout, actions of the mouse,
    menus, actions associated with different directories on the Desktop, and
    many other variable aspects of the Desktop. Rules are also used to
    specify the behavior of all icons, menus, and directories.

    Elements of a rule file

    The rules are divided into clauses that can be in nine main categories,
    defined as:  iconrules, directoryrules, desktoprules,
    lockedondesktop, desktoplayout, initialactions, finalactions, menu,
    and helptext.  There are also sub-rules or sub-clauses to each of these
    types:

    iconrules        These rules define the appearance and behavior of
                      icons. They describe what the icon for each file looks
                      like (which picture file contains the artwork and what
                      the icon title is) and what occurs when an icon is
                      invoked by a mouse action.

    directoryrules   These rules, usually found within local rule files,
                      describe what happens when icons are picked up and
                      dropped onto the background of an associated directory
                      window.

    desktoprules     These rules, usually found within Desktop rule files,
                      describe what happens when icons are picked up and
                      dropped onto the background of the Desktop window.

    lockedondesktop These rules list the icons that are locked onto the
                      Desktop and cannot be removed with the ``put back''
                      menu option.

    desktoplayout    These rules list which icons are initially on the Desk-
                      top and their positions.

    initialactions   These rules specify the actions taken when the rule
                      file is first opened.  System and user rule files are
                      opened when the Desktop process is first started.
                      Directory and Desktop rule files are opened when their
                      associated windows are opened.

    finalactions     These rules specify the actions taken when the rule
                      file is closed.  Rules files are closed in a parallel
                      fashion to the way they are opened (see the preceding
                      initialactions entry).

    menu              These rules define the title and items of a menu and
                      what happens when any item on the menu is selected.

    helptext         These rules are ignored by the Desktop but may be read
                      by other applications for informational purposes.


    Effects of different rule types in different rule files

    The following table illustrates the effects of various rule types in the
    different types of rule files.

    _________________________________________________________________________
   |    Rule type    |Local rule| Desktop | User rule |  System  |  Dynamic |
   |                 |  files   |rule files
|
files |rule files| rules | |_________________|__________|_________|___________|__________|__________| |icon_rules |Affect |Affect | Affect all|Affect all| Affect all
|
| |icons in |icons on | of the |icons | icons | | |directory |Desktop | user's | | while | | |containing| | icons | | loaded | | |rule file | | | | | |_________________|__________|_________|_________________________________| |directory_rules |Affect |Ignored | Affect all directories | | |directory | | | | |containing| | | | |the rule | | | | |file | | | |_________________|__________|_________|_________________________________| |desktop_rules |Ignored |Affect the
|
Affect all Desktops | | | |specified| | | | |Desktop | | | | |only | | |_________________|__________|_________|_________________________________| |locked_on_desktop|Ignored |Applies to
|
Applies to initial Desktop | | | |Desktop | | |_________________|__________|_________|_________________________________| |desktop_layout |Ignored |Applies to
|
Applies to Desktops not already| | | |Desktop | holding a desktop_layout clause| |_________________|__________|_________|______________________|__________| |initial_actions |When |When Desk† When the Desktop | When the | | |directory |top is | starts | rule file| | |is opened |opened | | is | | | | | | installed| |_________________|__________|_________|______________________|__________| |final_actions |When |When Desk† When the Desktop | When the | | |directory |top is | exits | rule file| | |is closed |closed | | is removed
|
|_________________|__________|_________|_________________________________| |menu |Available |Available| Available in all directories | | |in the |in Desktop
|
and Desktops | | |directory |it is in | | | |the rule | | | | |file is in| | | |_________________|__________|_________|_________________________________| Rule syntax You must follow syntactical guidelines and use conventional layout when writing rules. The following guidelines apply: + Rule files and object scripts are text files that can be created and edited using any program editor, such as vi or scoedit. + Rules are blocked structures such as the C or Pascal programming lan- guage. + Rule and clause types can appear in any order and in any number. + One rule file need not include all the rules. For example, a user can include only lockedondesktop rules in a user rule file and use a system rule file for all other rules. Structure of rule files A rule file or an object script is made up of a sequence of clauses. Each clause or rule can have one of the two following forms: (keyword = value ; or keyword = { body } where the body is normally a sequence of further clauses or a Deskshell script that specifies a system action to be taken. For more information on Deskshell, see the Graphical Environment Administrator's Guide, or the deskshell(X) and the deskcommands(X) manual pages. Rule files are blocked structures; in general, their layout is not impor- tant. For example, the following two rules are equivalent: icon_rules {* /D{picture=dir.px;}* /F{picture=file.px;}} and: icon_rules { * /D { picture = dir.px ; } * /F { picture = file.px ; } } However, the second format is recommended. It is easier to identify the structure of the rule and to match brackets, making it easier to debug. Using keywords Each rule or clause within a rule is introduced by a keyword. Keywords can be entered in long, descriptive forms or in short, two-letter forms. For example, icon rules are introduced either by the keyword iconrules or the abbreviation ic. The following table lists the valid keywords with their abbreviations and definitions. _________________________________________________________________________ | Rule type | Keyword | Abbr. | Definition | |__________________|_____________________|________|______________________| | Section keywords | icon_rules | ic | describe the appear-| | | | | ance and behavior of| | | | | files that are | | | | | represented by icons| | |_____________________|________|______________________| | | directory_rules | dd | specify what happens| | | | | when one or more | | | | | icons are dropped on| | | | | to the directory | | | | | window | | |_____________________|________|______________________| | | desktop_rules | dr | specify what happens| | | | | when one or more | | | | | icons are dropped on| | | | | to the Desktop | | |_____________________|________|______________________| | | locked_on_desktop | lf | specifies icons that| | | | | are to be locked on | | | | | the Desktop | | |_____________________|________|______________________| |__________________|_____________________|________|______________________| | | desktop_layout | dt | describes the icons | | | | | on the Desktop and | | | | | their positions | | |_____________________|________|______________________| | | initial_actions | ia | specify actions when| | | | | the rule file is | | | | | first opened | | |_____________________|________|______________________| | | final_actions | fa | specify actions when| | | | | the rule file is | | | | | closed | | |_____________________|________|______________________| | | menu | me | defines the items on| | | | | menus and the | | | | | actions to be per- | | | | | formed when a par- | | | | | ticular item is | | | | | selected | |__________________|_____________________|________|______________________| | Common | actions | ac | specify commands run| | subclauses | | | when an icon or | | | | | directory window is | | | | | triggered or a menu | | | | | item is selected | | |_____________________|________|______________________| | | trigger_action | ta | specifies the | | | | | actions to be per- | | | | | formed when a speci-| | | | | fied trigger occurs | | | | | with the mouse | | | | | pointing to the icon| | |_____________________|________|______________________| | | help_text | ht | can be read by other| | | | | applications to pro-| | | | | vide information | | |_____________________|________|______________________| | | background_picture | bp | specifies the | | | | | filename of the pic-| | | | | ture file to be used| | | | | for the directory or| | | | | Desktop window back-| | | | | ground | |__________________|_____________________|________|______________________| | Subclause in | drop_in_action | da | specifies the | | directory rules | | | actions to be per- | | and desktop | | | formed when the | | rules | | | specified dynamic | | | | | trigger occurs on a | | | | | directory window or | | | | | icon | |__________________|_____________________|________|______________________| | Subclauses in | menu_item | mi | specifies an item on| | menu rules | | | a menu and the | | | | | action to be per- | | | | | formed when the item| | | | | is selected | | |_____________________|________|______________________| | | pull_off_menu | pm | specifies a subsidi-| | | | | ary menu that cas- | | | | | cades off the named | | | | | menu, leaving both | | | | | the current menu and| | | | | the pull_off_menu | | | | | visible on the | | | | | screen | | |_____________________|________|______________________| | | dividing_line | dv=n | puts line in menus | | | thick_dividing_line| dv=t | | |__________________|_____________________|________|______________________| | Subclauses in | picture | pi | assigns a picture | | icon rules | | | file to the speci- | | | | | fied file or group | | | | | of files | | |_____________________|________|______________________| | | title | ti | assigns a title to | | | | | be displayed with | | | | | the icon | | |_____________________|________|______________________| | | attribute | at | allows attributes to| | | | | be assigned to a | | | | | file or group of | | | | | files | |__________________|_____________________|________|______________________| | Other subclauses | act_on_all | ig=a | controls action of a| | | | | trigger when more | | | | | than one icon is | | | | | selected | | | once_per_argument | ig=i | | |__________________|_____________________|________|______________________| Using special characters The following table shows special characters that are recognized when included within rules: _________________________________________________________________________ Character Meaning _________________________________________________________________________ = is an assignment operator ! is an assignment separator { (open brace) groups together statements within a rule block } (close brace} % (percent) introduces special phrases and instructions; is used as an escape sequence for shell metachar- acters and special characters listed in this table ; (semicolon) terminates other items; is optional when fol- lowed by a close brace # (pound sign) marks the beginning of comments in the middle of a line %// marks the beginning of a one-line comment %/* a block (long) comment. All characters between comment text lines the two %*/ strings are treated as comments. %*/ (white space) is ignored except in special cases, such as in the literal text supplied as an icon title Rule files can include other named rule files by specifying the following sequence: %+filename+ If the name does not begin with a slash, it is interpreted as relative to a directory, depending on the type of rule file being processed: _________________________________________________________________________ Rule file Directory for relative includes _________________________________________________________________________ local rule files same directory dynamic rules $HOME Desktop rule files $HOME user rule files $HOME system rule files same directory object directory same directory Because spaces are used to separate field in rule files, you should put a string in single quotes if it includes spaces. For example, type echo 'Press return' to display Press return _________________________________________________________________________ NOTE If the single quote is to be used in a string, include two successive single quotes ("). _________________________________________________________________________ Strings should also be enclosed in quotes if you want to include any of the special characters (such as {}=;`). Using variables In rule files or in object scripts, variables can be used to monitor num- bers and text strings. Using variables, the user can keep track of the number of files that need to be processed in a particular directory. Variables also can be used to store the actual filenames yet to be pro- cessed in a directory. Alternatively, variables can be used to search for a particular string in a filename in a given directory or the Desk- top. Variables give additional flexibility when you are writing rules that manipulate components of the Desktop. A variable name can be any sequence of letters, digits, and underscores provided that the first character is not a digit. Variables beginning with two underscores are discouraged because this naming convention is used in the standard rules (however, one leading underscore is permissi- ble). Unlike most programming languages and shell scripts, variables need not be specially defined, and they are assigned values with the equals sign ``=''. For example, count=10 assigns the numeric value 10 to the variable count. For further flexibility, variables can be assigned a list of values. The list is specified by putting all of the list elements in brackets. For example, editors=(vi scoedit ed) assigns the variable editors a list of the names of three editors on the system. The values of variables can be accessed in a rule file or object script by using the ``$'' operator. Specific elements in a variable list can be extracted by putting one or more element numbers in parentheses after the variable name. While $editors has the value: ``vi scoedit ed''; $editors(2) has the value: ``scoedit'' You can find the number of elements in a variable list with the ``$#'' operator. For example, $#editors yields the value 3. The element can come from another variable or construct. For example, $editors($#editors) has the value: ``ed''. Environment variable values can also be included in a rule file by using the operator ``$''. Catenation is also allowed. For example, $HOME/fred $HOME^/abc are both acceptable. Using substitutions Substitutions are used in action clauses. These clauses link mouse mani- pulations of the object or triggers with system or Desktop actions. They allow the action to specify the filename of an icon that is affected when it is dropped or triggered. Substitutions are made by placing a substitution sequence in the rule file at an appropriate point; the sequence consists of a percent sign followed by a letter, and in some cases a digit or an asterisk. The fol- lowing table illustrates the use of substitutions. ________________________________________________________________________________ | | | Example for | | |String
|
Meaning |/usr/bin/myprog.c| Full form | |_____|____________________________|_________________|__________________________| |%Bx |basename of the file |myprog.c |'(basename $static_arg) | |_____|____________________________|_________________|__________________________| |%Cx |class of the file, specified|FXWM (for example)
|
'(fileclass $static_arg) | | |as for icon_rules | | | |_____|____________________________|_________________|__________________________| |%Dx |absolute pathname of the |/usr/bin |'(dirname $static_arg) | | |directory holding the file | | | |_____|____________________________|_________________|__________________________| |%Ex |basename without the suffix |myprog |'(unextended $static_arg) | | |(dot and characters following
|
| | | |the dot) | | | |_____|____________________________|_________________|__________________________| |%Px |absolute pathname of the file
|
/user/bin/myprog.c
|
$static_arg | |_____|____________________________|_________________|__________________________| |%Rx |relative pathname of the |<varies> |`(relativepath $static_arg)
|
| |file. When a title clause is| | | | |being expanded within a | | | | |directory window, this is the
|
| | | |same as B. | | | |_____|_________________________________________________________________________| |%N |number of files dropped (in trigger_action) or number of icons selected | | |(in action clause in menu_rules) | |_____|_________________________________________________________________________| |%T |trigger_id (used only in action lists) | |_____|_________________________________________________________________________| |%X |version number for the Desktop Manager | |_____|_________________________________________________________________________| |%. |a newline | |_____|_________________________________________________________________________| The x in the preceding table represents a single-letter code that identi- fies which part of the filename should be substituted. The substitutions follow, where x represents a single-letter code (0-9 or *) that identi- fies which part of the filename should be substituted according to this scheme: x=0 + in picture and title clauses, the appropriate part of the filename being processed + in an action list within a trigger_action clause, the appropri- ate part of the filename triggered (for static triggers) or the appropriate part of the filename dropped onto (for dynamic triggers, drop_in_action and td clauses) + in an action list within a menu, the appropriate part of the directory (or NULL for the Desktop menu) x=1-9 appropriate part of the filename of the specified file (in an action list within a trigger_action clause for a dynamic trigger or a drop_in_action or td clause) or once for each selected icon (in an action list within a menu) x=* word in which substitution occurs, repeated once for each file dropped (in a trigger_action clause for a dynamic trigger, or a drop_in_action or td clause) or once for each selected icon (in an action list within a menu) The substitution string %x* copies the complete word within which the string occurs once for each file dropped, replacing each * by the number of the file dropped. For example, if there are three files dropped, then: %D*/%B2/%E* is equivalent to: %D1/%B2/%E1 %D2/%B2/%E2 %D3/%B2/%E3 Specifying file and directory pathnames The Desktop uses standard UNIX operating system conventions for referenc- ing the pathname of a file. The values in parentheses are substitutions that can be used to reference the various types of pathnames. Substitu- tions are discussed later in this manual page. A file can be referred to in one of the following ways: absolute pathname (%P0) pathname of the file starting from the root directory ``/'' basename (%B0) name of the file within its directory. This is the part of the absolute pathname following the last slash. dirname (%D0) absolute path of the directory holding the file. It is the part of the absolute pathname that precedes the last slash. relative pathname (%R0) name of the file relative to the user's present working directory. This is true only if the file is in the user's home directory or one of its subdirectories. Otherwise, it is the same as the absolute pathname. The following example shows the pathname reference for the file /people/fred/work/letter: Absolute pathname: /people/fred/work/letter Basename: letter Dirname: /people/fred/work Relative pathname: determined by present working directory: Working directory: Relative pathname: / people/fred/work/letter /people fred/work/letter /people/fred work/letter /people/fred/work letter any other /people/fred/work/letter _________________________________________________________________________ NOTE There is one exception. The dirname of ``/'' is ``/.'' (slash dot), and its basename is ``/'' (slash). _________________________________________________________________________ Substitution options The icon group option determines the way that substitutions occur when several icons are dropped at once. For example, drop the icons /xxxx/myicon and /yyyy/youricon onto /xxxx/zzzz/new_one with the following rule: icon_rules { new_one { trigger_action : d1 { act_on_all; action { b : mv %P* %D0 ; } } } } This executes the action: b : mv /xxxx/myicon /yyyy/youricon /xxxx/zzzz ; Dropping the same icons with the rule altered to the option onceperargument executes the following actions: b : mv /xxxx/myicon /xxxx/zzzz ; b : mv /yyyy/youricon /xxxx/zzzz ; Deskshell command language Rules are defined using commands and scripts. You can specify regular UNIX operating system binaries and shell scripts in your rules. However, it is recommended that you learn how to use the Deskshell commands and scripts. Deskshell is a command language, complete with a flexible range of control structures and a wide range of commands. Because Deskshell is designed specifically for use with the Desktop and because Deskshell commands execute significantly faster than regular UNIX shell commands, Deskshell commands are recommended for coding your script. For more information on writing scripts using Deskshell, see the Graphical Environment Administrator's Guide, or the deskshell(X) and the deskcommands(X) manual pages. For more information on Deskshell syntax and commands, see the deskshell(X) and the deskcommands(X) manual pages. Desktop resources You can customize some characteristics of the Desktop by editing your own personal Desktop resource file; this file contains user preferences for the Desktop client. If the file does not already exist, create it with the full pathname: $HOME/XDesktop3 where $HOME represents your home directory. Alternatively, you can create your own personal X resource file that con- tains user preferences for all clients instead of just the Desktop. If the file does not already exist, create it with the full pathname: $HOME/.Xdefaults-hostname where $HOME represents your home directory and hostname is the name of the machine. Either of the above files may be used to include Desktop resources in, although the .Xdefaults-hostname resource file takes precedence over the XDesktop3 resource file. Once you create one or both of these files, copy relevant resources from the Desktop resource files into one of them and change them to suit your specific needs. The two Desktop resource files are /usr/lib/X11/<lang>/app-defaults/XDesktop3 and /usr/lib/X11/sco/startup/XDesktop3. It is recommended that only resources in the first file be redefined. Resources in the second file exist to unify the Desktop's appearance with the other X clients on a server specific basis and, therefore, should not be changed. _________________________________________________________________________ NOTE <lang> refers to the value set in the $LANG environment vari- able or the first value specified in the file /etc/default/lang. _________________________________________________________________________ The most useful resources are listed here. For guidelines on how to modify resources, refer to the Administrator's Guide. xdt3.isRoot if True, specifies that the initial Desktop occupies the whole root window. The resource is currently set to True. The isRoot window obeys any geometry specified for the first (initial) window. This means the isRoot window can be smaller than the screen. It is strongly recommended that users change this behavior by using the Desktop Preferences utility on the Desktop rather than in a resource file. xdt3.isRoot.focusToggle specifies the key combination that makes the Desktop grab the keyboard focus. The resource is currently set to <Shift><Alt><F2>. If isRoot is set, it is necessary to assign a key to tog- gle keyboard focus in order to be able to use the menu accelerators or answer prompts on the isRoot desktop win- dow. xdt3*pictureDirectory specifies the search path for the icon picture files (will expand to $HOME). The resource is currently set to the xdt* sub-directories of the /usr/include/X11/bitmaps directory. xdt3.systemRuleFile specifies where to find the system rule file. The resource is currently set to /usr/lib/X11/XDesktop3/<lang>.xdt/xdtsysinfo. where <lang> refers to the value set in the $LANG environment variable or the first value specified in the file /etc/default/lang. xdt3.userRuleFile specifies the name of the user rule file. The resource is currently set to .xdtuserinfo xdt3.directoryRuleFile specifies the name of the directory rule files. The resource is currently set to .xdtdirinfo xdt3.windowInfoCacheSize specifies the number of trays (Desktop and/or directories) that are cached. The resource is currently set to 0 (increasing this number may cause a minor overall perfor- mance loss while decreasing the time to reopen direc- tories). xdt3.triggers.thresholdDownTime specifies the distinction between a click and a hold. If the button is held down for longer than the value of this resource, the action is a hold. The resource is currently set to 700 milliseconds. xdt3.triggers.maxUpTime specifies the distinction between a single and a double click. If the button is released for longer than the value in this resource, the action is a single click. The resource is currently set to 500 milliseconds. xdt3.desktop.menubar specifies the name of the menu rule that defines the con- tents of the desktop menu bar (to be used in rule files). The resource is currently set to ``DesktopMenuBar''. xdt3.directory.menubar specifies the name of the menu rule that defines the con- tents of the directory menu bar (to be used in rule files). The resource is currently set to ``DirMenuBar''. xdt3.directory.maxFiles specifies the maximum number of files that can be in a directory. The resource is currently set to 10000. _________________________________________________________________________ NOTE There are numerous resources regarding colors that appear on the Desktop. Colors should always be defined in terms of SCO palette colors, otherwise there is a risk of overflowing the color- map. Furthermore it is better to use the scocolor client to change colors as opposed to re-defining resources. For more information on the scocolor client, see the scocolor(X) manual page. _________________________________________________________________________ Files $HOME/Initial.dt $HOME/.Xdefaults-hostname /etc/default/lang /usr/include/X11/bitmaps /usr/lib/X11/XDesktop3/<lang.xdt/toolsheds/Accessories /usr/lib/X11/XDesktop3/<lang.xdt/toolsheds/Controls /usr/lib/X11/XDesktop3/applications /usr/lib/X11/XDesktop3/<lang>.xdt/xdtsysinfo /usr/lib/X11/<lang>/app-defaults/XDesktop3 /usr/lib/X11/sco/startup/XDesktop3 _________________________________________________________________________ NOTE $HOME represents your home directory and hostname is the name of the machine. <lang> refers to the value set in the $LANG environment variable or the first value specified in the file /etc/default/lang. _________________________________________________________________________ See also Xsco(X), Xtoptions(X), mwm(X), deskshell(X), deskcommands(X)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026