File - Open Script

          The Program Manager is a flexible tool for
          creating reusable Open Scripts.  This increases
          users' productivity and minimizes the amount of
          memorization required.  Open Scripts can be created
          by the local UNIX guru and made available to all
          the users.
          
          Freedom Desktop does not define a proprietary
          scripting language.  It relies on sh, the standard
          UNIX system command interpreter, which is more
          than enough to accommodate most of the scripting
          needs.
          
          By doing this, Freedom Software avoids the
          introduction of a new scripting language that is
          not cheap for users because of the training and
          maintenance costs involved.  Converting an (sh)
          shell script into an Open Script file requires a
          minimum amount of work.  This conversion enhances
          the shell script by adding additional information
          to it.
          
          Such enhancements do not preclude Open Scripts from
          being used in the same way that plain shell
          scripts are.  An Open Script is an (sh) shell
          script enhanced with a header.  This header
          defines:
          
          Icon -- The icon defines the filename and location
          of the icon used by Freedom Desktop
          (Program Manager, File Manager).  The user
          specifies the absolute path to the icon file (i.e.
          /home/john/icons/myicon.xpm).  An  icon   file 
          name   specified   alone   defaults  to  the
          freedom_software/icons directory.
          
          Command -- UNIX command to be executed.  Any valid
          UNIX command or sequence of commands can be
          specified here.  Parameters are specified using
          the normal syntax ($1, $2, $n, $*, etc.).
          
          Working directory -- Directory from where the
          command is to be executed.
          
          Flags -- Execution flags. Number that represents
          the logical 'OR' of one or more of the following:
          
          Flag 1 -- xterm window -- Indicates that the
          output of the command is to be displayed in a
          terminal emulator window (xterm).
          
          The following flags make sense only when the xterm
          window flag    is present:
          
          Flag 8 -- Pause After Done -- Prompts the user
          after the command is done and before closing the
          terminal emulator window.
          
          Flag 64 -- Page Through -- Presents one page of
          output at a time.
          
          Description -- Brief description of the purpose of
          the script, its parameters and any other relevant
          information.
          
          All of these fields are optional.  The following
          would be a typical Open Script:
          
          #! /bin/sh 
          #OpenScript
          #(OS)Starts xterm, a terminal emulator for X. You can drop a
          #(OS)directory on this icon or double-click it.
          OPENFLAGS=0
          OPENICON="xterm.xpm" cd $1;OPENCOMMAND="xterm"; eval $OPENCOMMAND
          #(OS)Do not change anything above this line.
          
          The first and second lines are mandatory.  No
          spaces are allowed after /bin/sh; only one new
          line character (nl) is permitted.  The last line
          should also be included.  This last line marks the
          end of the header.  All the lines in between are
          optional.   Anything can be added after the last
          line of the header.
          
          To convert a shell script into an Open Script
          insert the first, second and last lines of the
          previous example at the beginning of the script
          file.  The result is a trivial Open Script.
          Freedom Desktop associates the default icon (space
          shuttle) to this Open Script.  It is possible to
          change any of characteristics of this new
          Open Script by placing it inside one the program
          manager groups and using the Properties menu
          option under File.  Once the script (sh) has been
          converted, it usually makes sense to modify only
          the icon and the description of the Open Script.
          All the other fields are often left blank.  Notice
          that anything placed after the last line of the
          header will not appear on the Properties dialog.
          The Properties dialog box only displays the header
          information.  This is confusing at first but does
          not represent a problem because only the header
          information is updated once the user pushes the
          save button.  Anything found after the last line
          of the header is always preserved without changes.
          
