dtaction Command

Purpose

Invokes a CDE action with specified arguments.

Syntax

dtaction [-contextDir context_dir]\

[-execHost host_name] [-termOpts terminal_arguments]

[-user user_name] action_name

[action_arg] ...

Description

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

The action called action_name is called with the action_arg provided on the command line.

A single action_name is required; the user can 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.

The action might 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 path names of files. The dtaction command passes this list of files on to the specified action.

Error dialogs are posted when the following conditions are detected:
  • Desktop environment could not be initialized
  • Invalid user or password
  • Unable to change ID to the requested user
  • No action name specified

Flags

Item Description
contextDir context_dir Specifies a default directory context if the definition of action_name does not define a current working directory for command actions.
execHost host_name Specifies an alternative execution host, host_name, for a command action. If the action is not a command action, the dtaction command ignores this option. The action is attempted on host_name instead of the hosts specified in the action's EXEC_HOST specification. An error is posted if it is not possible to invoke the specified action on any eligible host.
termOpts terminal_arguments Specifies 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, so the user must ensure that the strings 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, using dtterm1 with the -e flag).
user user_name Specifies a user name. If dtaction is not currently running as that user, a prompt dialog collects the specified user password or the root user password. After a valid password is entered, the dtaction command changes so that it is running as the requested user and then starts the requested action.

Parameters

Item Description
action_name Specifies the name of the action to be invoked.
action_arg Specifies the absolute or relative file names of files.

Environment Variables

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

Exit Status

The following exit values are returned:

Item Description
0 Successful completion.
>0 An error occurred.

Security

The dtaction command is an application enabled by PAM with service name dtaction.

If the user name specified by user user_name option is different from the login user name,

The dtaction command authenticates the user before invoking the specified action. It is capable of performing PAM authentication as well as traditional authentication.

To use PAM for authentication system-wide, establish root user permissions and modify the value of the auth_type attribute in the usw stanza of the /etc/security/login.cfg file toPAM_AUTH.

The authentication mechanisms used when PAM is enabled depend on the configuration for the login service in /etc/pam.conf.

The dtaction command requires an /etc/pam.conf entry for the auth module type.

The following configuration is recommended in /etc/pam.conf for the dtaction service:
  dtaction        auth               required       /usr/lib/security/pam_aix

Examples

  1. To invoke an action, enter:
    dtaction Xterm
    This launches X Windows terminal emulator (Xterm).
  2. To invoke an action on a remote host, enter:
    dtaction -execHost hostname Xterm
    This executes Xterm on the specified remote host.
  3. To invoke an action as a different user, enter:
    dtaction -user username Xterm
    This executes Xterm as the specified user.

Location

/usr/dt/bin/dtaction

Standard Error

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

Files

Item Description
/etc/pam.conf Determines PAM authentication mechanisms.
/etc/security/login.cfg Determines PAM authentication system-wide.