Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Example of Creating a COMMAND Action

The following steps create a personal action that starts a fax application on remote system AppServerA. The command for starting the fax application is:

/usr/fax/bin/faxcompose [filename]
  1. Create the file HomeDirectory/.dt/types/Fax.dt.

  2. Put the following action definition into the file:

    	ACTION FaxComposer
     	{
     		TYPE					COMMAND
     		ICON					fax
     		WINDOW_TYPE			NO_STDIO
     		EXEC_STRING			/usr/fax/bin/faxcompose -c %Arg_1%
     		EXEC_HOST     	 	AppServerA
     		DESCRIPTION    	Runs the fax composer
    	}

    The WINDOW_TYPE and EXEC_STRING fields describe the behavior of the action.

    WINDOW_TYPE—the NO_STDIO keyword specifies that the action does not have to run in a terminal emulator window.

    See Specifying the Window Support for the Action.

    EXEC_STRING—the syntax %Arg_1% accepts a dropped file. If the action icon is double-clicked, the action opens an empty fax composer window.

    See Building the Execution String for a COMMAND Action.

  3. Save the file.

  4. Use Icon Editor to create the following icon image files in the HomeDirectory/.dt/icons directory:

    • fax.m.pm, size 32 by 32 pixels

    • fax.t.pm, size 16 by 16 pixels

  5. Double-click Reload Actions in the Desktop_Tools application group.

  6. Create an executable file named FaxComposer in a directory to which you have write permission (for example, your home directory).