DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Integrating applications into the Desktop

Starting your application with the activate trigger

Your activate object script should start your application when a user double-clicks on your icon with mouse button 1. This script must be named activate.

For example, an activate script to start a graphical clock could be as simple as:

  1 begin
  2 /usr/bin/X11/xclock
  3 finish
If you use a relative pathname in your object scripts, you must be certain that users have the correct path set in their environment. A safer approach is to use an absolute path as shown in the previous example.

To start a character-based application with its icon, the activate script must open a DOS or UNIX (scoterm) window in which to run the application. The following Deskshell object script starts a UNIX editor, vi, in a scoterm window.

  1 begin
  2 shell -t 'Editor' vi
  3 finish
The begin and finish statements cause the displayed icon to change from closed to activated, if you created the appropriate pixmap files.

The shell statement is a Desktop resource that defines the terminal emulation; it is set to scoterm by default. The -t option passes the title to the scoterm window. You can also localize this title and other messages based on the $LANG environment variable.

For more about the UNIX window, see scoterm(XC). For more about the DOS window, see NeTraverse Merge User's Guide.


Next topic: Starting your application with the drop trigger
Previous topic: -1

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003