SCOadmin desktop hierarchy contents and format
The SCOadmin desktop is based on a hierarchy of
management objects designed to comply with X.desktop. The
management object hierarchy is shared and used both by
X.desktop and the scoadmin utility. Each
management application on the SCOadmin desktop
has a corresponding object directory in this hierarchy.
When a new management application is to be added to the
SCOadmin desktop, an object directory is added
for it in the hierarchy. These object directories have
names which end with the extension .obj. The
intention is that management objects should be placed into
this hierarchy in a logical grouping. Folders in the
hierarchy represent a grouping of applications.
SCOadmin applications and hierarchies must be
configured and maintained using the
The SCOadmin management object hierarchy is located in:
where revision is substituted with the revision
number of the operating system. At installation time of
the SCOadmin desktop, this directory is exported
At installation, the SCOadmin object hierarchy is
preconfigured into an initial state. This preconfiguration
includes the following standard folders (application
System (including subdirectories for Logs and Security)
Each management application on the SCOadmin
desktop has a corresponding X.desktop object in the
SCOadmin object hierarchy. To add a management
application to the SCOadmin desktop, you must
create a management object to be added to the hierarchy in
the appropriate place. The required contents are as
| | |
activate activate.scoadmin en_US
| | | |
title text picture.px open.px
The activate file
The activate file permits the object to be
invoked from the X.desktop. This is a deskshell script to
be executed by X.desktop when the management object is
activated. A management object is activated when the user
double-clicks on its icon with mouse button 1. Deskshell
is the scripting language used by X.desktop and need not be
executable. The suggested permissions are 0444.
The activate script invokes the corresponding
management application. There are no limitations placed on
the implementation of this deskshell script. Developers
should reference X.desktop documentation for help with
The activate.scoadmin file permits the object to
be invoked from
This file must be a valid executable type (such as a
binary, shell or tcl script). scoadmin simply
invokes the file assuming it is an executable. If
activate.scoadmin is a script, then the
#! mechanism must be used to invoke the
appropriate interpreter. The suggested permissions are
If this file is not found when a user attempts to invoke
the application from scoadmin, a message is
displayed that the application cannot be invoked.
Two environment variables are set by scoadmin in
the environment of activate.scoadmin:
informs the activate.scoadmin executable of the
display environment. The possible values are
MOTIF and CHARM. This can be used to
prevent a graphical-only application from being executed in
the character environment. Example uses of this variable
are found in ``Examples.''
contains the name of the management object selected,
mimicking the variable of the same name set by X.desktop
when a user double-clicks on an object. It includes the
full path name of the .obj directory for the
corresponding management application. It is convenient to
use this variable when referring to files within the
The language directory
Language directories are used within objects to store
language specific data for the purpose of
internationalization. The current directories are:
ja_JP, ja_JP.SJIS, fr_FR,
de_DE, and en_US. The desktop maps the
value of the LANG environment variable to one of
these values. If LANG is not set or if its value
does not map to one of the recognized values, the default
is en_US. This directory should be provided with
every management object.
The following subsections describe the data which may
reside in the language directories.
The picture.px file
A management object should have a specific icon to
represent it on X.desktop. The pixmap for that icon must
be in a file called picture.px. If this file
does not exist or contains a corrupt pixmap, X.desktop
assigns a default icon to the management object. It is
possible to use the pixmap in this file to represent the
management object in its closed or
unused state and use another pixmap,
open.px, to represent it in its open
The open.px file
If this file contains a valid pixmap and if the
activate file uses the begin and
finish keywords, the pixmap in this file is used
by X.desktop to represent the management object in its
open state. Refer to ``Examples'' for uses of
the begin and finish deskshell
keywords. This functionality is optional but is
recommended because it gives the user a clear visual
indication of the state of the management object.
The title file
This file should contain the title of the application in
the corresponding language. The title file can
contain a multi-line title. X.desktop uses the title to
label the icon representing the application, while
scoadmin uses the title in presenting the user
with a list of the available applications. A file named
title should reside in each of the language
directories of a management object.
If the desktop cannot find a language directory matching
the current language setting or an en_US language
directory, it uses the name of the management object
directory as the title of the application. The same
applies if the desktop finds the appropriate language
directory, but does not find a title file in it.
In either of those cases, if the management object
directory was named Printer Manager.obj then it
will use Printer Manager as the title. It is
recommended that management object directories have
meaningful names. In the example given here, a space
character is used in the name of the directory such that
the title appears more legible. Note that this default
behavior by X.desktop can be avoided by including an
en_US language directory in each object.
The text file
A file named text within a language directory is
similar to a message catalogue file. It contains any
localized messages needed by the management object. For
instance, if the activate file is to display a
message to the user, the message should be localized and a
variable used in its place as the message ID. See the
example of a character-only application in ``Examples.''
Note that the text file is used to
internationalize an object only by X.desktop and not by
scoadmin. If an object is expected to be
internationalized when invoked from scoadmin, the
internationalization must be built into the
activate.scoadmin executable. The only
internationalization of an object handled by
scoadmin is the title of the object.
These are examples of activate and
activate.scoadmin files for three types of
A character/MOTIF application
This example application is capable of running in both the character
and MOTIF environments.
(Visual Tcl) applications
are an example of this type of application.
This activate file is very simple and merely executes the
Note the use of the begin and finish deskshell keywords.
Although these keywords are optional in the most generic case, it is
necessary if X.desktop is to use the
open.px file to display a variant pixmap to indicate that the
application is open. In other words, two things are needed in order for
X.desktop to use a specific pixmap icon to indicate that the application
is in use: an open.px file and the use of begin and
finish in the activate file.
The following is a simple executable script:
Note that the first line invokes the shell. This file
could have also been a
executable, including a binary executable.
A character only application
In this example, the application is capable of running in a character
This very simple deskshell script puts up a scoterm,
gives it a title, and runs the application in it:
shell -t ''$myTitle'' mkdev hd; xdtwait
It uses the command xdtwait to ensure that the
scoterm stays up until the application exits.
Note that the title of the scoterm window is
internationalized. A variable, myTitle is used
in place of the title. myTitle is a variable
which must be defined in the text file in each of
the language directories of this management object. For
example, the en_US directory should have a file
named text with the following assignment:
myTitle='Hard Disk Configuration'
Note the use of the SCOADMIN_UIMODE environment
variable. When scoadmin executes this script, it
sets SCOADMIN_UIMODE to either MOTIF or
CHARM according to the display environment. It
is then up to the character-only management object to
ensure that the management application is invoked
correctly. In this example, if the MOTIF environment is
detected, the application is run in a scoterm.
if [ "$SCOADMIN_UIMODE" = CHARM ]
scoterm -title "mkdev hd" -e sh -c "mkdev hd"
A MOTIF only application
This example uses scomail as an application which can only run
in a MOTIF environment.
There are no tricks involved in the deskshell activate script
of a MOTIF only application:
Here the SCOADMIN_UIMODE environment variable is used to
identify the display environment. In a character environment,
the application cannot be invoked and scoadmin is used to
display a message to that effect:
if [ "$SCOADMIN_UIMODE" = CHARM ]
scoadmin -m "This application must be run in a MOTIF environment."
An object need not be limited to the described set of
contents. X.desktop provides many features that can be
utilized. For example, drag-and-drop functionality may be
supported by an object, if appropriate, by including a
drop script. As another example, if X.desktop is
configured to display small icons, s_picture.px
and s_open.px pixmaps may be included with an
object. The X.desktop documentation should be referenced
for detailed descriptions of the available functionality.
X.desktop activation file
SCOadmin desktop activation file
icon ``open'' pixmap
SCO Visual Tcl Programmer's Guide and Reference .
scoadmin is not part of any currently supported
standard; it is an extension of AT&T System V
provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003