dtaction(user cmd)

NAME
dtaction — invoke a XCDE action with specified arguments

SYNOPSIS

dtaction [-contextDir context_dir] [-execHost host_name] [-termOpts terminal_arguments] [-user user_name] [action_name] [action_arg] [...]

DESCRIPTION

The dtaction utility allows applications or shell scripts, which are otherwise not connected into the XCDE development environment, to invoke action requests.

The action called action_name is invoked with the action_arg provided on the command line. A single action_name is required; the user may provide any number of action_args. Interpretation of the action_name and action_args depends on the definition of the action in the action database (see dtactionfile(4)). The action may be defined in one of the system action database files, or in one of the user's private action database files.

The action_args are absolute or relative pathnames of files. The utility passes this list of files on to the specified action.

Error dialogs are posted when the following conditions are detected:

•   could not initialize desktop environment

•   invalid user or password

•   unable to change ID to the desired user

•   no action name specified

OPTIONS

The following options are available:

-contextDir context_dir
    If the definition of action_name does not define a current working directory (see CWD in dtactionfile(4)) for command actions, the user can use this option to specify a default directory context.

-execHost host_name
    The user can use this option to specify an alternative execution host, host_name, for a command action. If the action is not a command action, the dtaction utility ignores this option. The action is attempted on host_name instead of the hosts specified in the action's EXEC_HOST (see dtactionfile(4)) specification. An error dialog is posted if it is not possible to invoke the specified action on any eligible host.

-termOpts terminal_arguments
    This option allows the user to specify arguments intended for the terminal emulator that is provided for command actions that are not of type NO_STDIO. If there are white-space characters in the terminal_arguments string, that string must be quoted to protect it from the shell. These arguments are passed unchanged to the terminal emulator. The user must ensure that they are reasonable; in particular, terminal_arguments does not allow the argument that specifies the command to be run in a terminal emulator window (that is, -e for dtterm(1)).

-user user_name
    The -user option allows a user to specify a user name. If dtaction is not currently running as that user, a prompt dialog collects the indicated user password, or the root user password. Once a valid password is entered, the dtaction utility changes so that it is running as the requested user and then initiates the requested action.

OPERANDS

The following operands are supported:

action_name
    The name of the action to be invoked.

action_arg
    The absolute or relative file names of files.

STDIN

Not used.

INPUT FILES

The input files named as action_arg arguments are absolute or relative names of files.

The action database files found on DTDATABASESEARCHPATH conform to the format specified in dtactionfile(4).

ENVIRONMENT VARIABLES

The following environment variable affects the execution of dtaction:

DTDATABASESEARCHPATH
    A comma-separated list of directories (with optional host: prefix) that tells the action service where to find the action databases.

RESOURCES

None.

ASYNCHRONOUS EVENTS

The dtaction utility takes the standard action for all signals.

STDOUT

Not used.

STDERR

The dtaction utility writes diagnostic error messages to standard error, which is redirected to $HOME/.dt/errorlog.

OUTPUT FILES

None.

EXTENDED DESCRIPTION

None.

EXIT STATUS

The following exit values are returned:

0   Successful completion.

>0  An invocation error was detected.

CONSEQUENCES OF ERRORS

Default.

APPLICATION USAGE

None.

EXAMPLES

None.

SEE ALSO

dtactionfile(4), dtterm(1), dtaction(1).