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

To Create an Action for an Application

  1. Double-click Create Action in the Desktop_Apps application group.

    Figure 11–1 Create Action icon in Application Manager

    Graphic

    This displays the main Create Action window.

    Figure 11–2 Create Action main window

    Graphic

  2. Type the name that will label the action icon into the Action Name text field.

  3. Use the Action Icons controls to specify the icon for the application. Initially, the default icon is shown.

    • To create new icons, choose Edit Icon to run the Icon Editor.

  4. In the Command When Action Icon Is Opened text field, type the command to start the application.

    Use the syntax $n for a file argument; for example:

    	emacs
     	bitmap $1
     	diff $1 $2
     	lp -oraw $1

    If the command line includes a file argument ($n), then the action icon will be a drop zone for files.

    The command lines are not passed to a shell unless you explicitly specify the use of a shell. For example, these lines use shell processing:

    	/bin/sh -c 'ps | lp'
     	/bin/sh -c 'spell $1 | more'
  5. Type the On Item help text for the action icon into the Help Text For Action Icon text field.

    The text will automatically wrap in the text field. However, these line breaks are not preserved online. If you want to specify a hard line break, use \n.

  6. Choose the windowing support required by the action from the Window Type option menu.

    Graphical (X-Window)—the application creates its own window

    Terminal (Auto-Close)—the application will run in a terminal emulator window that closes automatically when the user exits the application

    Terminal (Manual Close)—the application will run in a terminal emulator window that remains open until the user explicitly closes it

    No Output—the application does not produce output to the display

  7. Proceed as follows:

    • If you do not need to create a data type, save the action by choosing Save from the File menu. Then, test the new action by double-clicking its icon in your home directory.