The approach to icon definition depends on correct installation of your pixmap, object scripts, and rule files. Use the deskconfobj object installation tool in your installation script to ensure that your icon files are installed properly. Your installation script tells deskconfobj what to install, and deskconfobj determines where.
In this release, pixmaps and object scripts are copied into a directory named label.obj, where label is the label that appears beneath your icon. This directory is created in the /usr/lib/X11/XDesktop3/applications directory. Application rules are currently installed in the /usr/lib/X11/XDesktop3/C.xdt/apprules directory or in the /usr/lib/X11/XDesktop3/lang.xdt/apprules directory, depending on whether you install localized versions of your rules. These directories may change in future releases, but if you use deskconfobj to install your icon object, your installation script will still work.
Because ordinary users usually do not have permission to copy files into the required directories, deskconfobj can only be used if the installing administrator is logged in as root. If you want your application to be installable by users in their directories, see ``Making applications user-installable''.
In your installation script:
Alternatively, you can prepend this path to each deskconfobj command.
deskconfobj -aobj -name label -src source_directoryUse the -aobj (add object) option to install a new object on the Desktop. For label, substitute the text that will be displayed beneath your icon. You may use the name of your application for the label, or any other string that is allowed in a UNIX directory name. For source_directory, substitute the path to the directory from which icon pixmaps and object scripts are to be copied. All files in the source directory will be copied into the /usr/lib/X11/XDesktop3/applications/label.obj directory.
deskconfobj -arule -name rule_name -src fileUse the -arule (add rule) option to add a rules file associated with your object. For rule_name, substitute a name that is unlikely to be duplicated by other programs (typically your application's class name). For file, substitute the pathname of the file that contains the rules to be copied. Most applications should put all of their application rules in a single source file (or in a series of localized source files with the same name).
Skip this step if you prepended this path to the commands instead of adding it to the search path in step 1.