Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
42
cde/programs/dtaction/Imakefile
Normal file
42
cde/programs/dtaction/Imakefile
Normal file
@@ -0,0 +1,42 @@
|
||||
XCOMM $TOG: Imakefile /main/9 1998/04/06 13:11:38 mgreess $
|
||||
|
||||
DEFINES = -DXK_MISCELLANY
|
||||
INCLUDES = -I.
|
||||
|
||||
DEPLIBS = $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
|
||||
LOCAL_LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB)
|
||||
SYS_LIBRARIES = -lm
|
||||
|
||||
|
||||
#ifdef HPArchitecture
|
||||
EXTRA_DEFINES = +e
|
||||
#endif
|
||||
|
||||
#ifdef LinuxArchitecture
|
||||
SYS_LIBRARIES = -lm -lcrypt
|
||||
#endif
|
||||
|
||||
#ifdef SCOArchitecture
|
||||
SYS_LIBRARIES = -lm -lcrypt
|
||||
#endif
|
||||
|
||||
#ifdef RsArchitecture
|
||||
SYS_LIBRARIES = -liconv
|
||||
#endif
|
||||
|
||||
#ifdef USLArchitecture
|
||||
SYS_LIBRARIES = -lm -lgen
|
||||
#endif
|
||||
|
||||
#ifdef UXPArchitecture
|
||||
SYS_LIBRARIES = -lm -lgen
|
||||
#endif
|
||||
|
||||
#if defined(SunArchitecture)
|
||||
SYS_LIBRARIES = -lm -ldl
|
||||
#endif
|
||||
|
||||
SRCS = Main.c
|
||||
OBJS = Main.o
|
||||
|
||||
ComplexProgramTarget(dtaction)
|
||||
1269
cde/programs/dtaction/Main.c
Normal file
1269
cde/programs/dtaction/Main.c
Normal file
File diff suppressed because it is too large
Load Diff
52
cde/programs/dtaction/demo/Makefile.hp
Normal file
52
cde/programs/dtaction/demo/Makefile.hp
Normal file
@@ -0,0 +1,52 @@
|
||||
# $XConsortium: Makefile.hp /main/2 1996/05/13 11:29:32 drk $
|
||||
###########################################################################
|
||||
#
|
||||
# Makefile for dtactiondemo.c
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
|
||||
# Novell, Inc.
|
||||
###########################################################################
|
||||
|
||||
#ifndef CDE_INSTALLATION_TOP
|
||||
CDE_INSTALLATION_TOP = /usr/dt
|
||||
#endif
|
||||
|
||||
PROGRAM = dtactiondemo
|
||||
SOURCES = dtactiondemo.c
|
||||
OBJECTS = dtactiondemo.o
|
||||
|
||||
CFLAGS = +Obb2000 -Aa
|
||||
OPTIMIZEDFLAGS = -O
|
||||
|
||||
DEFINES = -D_HPUX_SOURCE
|
||||
|
||||
DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include
|
||||
XMINCLUDE = -I$(CDE_INSTALLATION_TOP)/include
|
||||
X11INCLUDE = -I/usr/include/X11R5
|
||||
EXTRA_INCLUDES =
|
||||
INCLUDES = $(DTINCLUDE) $(XMINCLUDE) $(X11INCLUDE) $(EXTRA_INCLUDES)
|
||||
|
||||
DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc
|
||||
TTLIB = -L$(CDE_INSTALLATION_TOP)/lib -ltt
|
||||
XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm
|
||||
XTLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXt
|
||||
X11LIB = -L/usr/lib/X11R5 -lX11
|
||||
|
||||
LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTLIB) $(X11LIB)
|
||||
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
cc -c $(CFLAGS) $(DEFINES) $(OPTIMIZEDFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
rm -f $(PROGRAM)
|
||||
rm -f $(OBJECTS)
|
||||
47
cde/programs/dtaction/demo/Makefile.ibm
Normal file
47
cde/programs/dtaction/demo/Makefile.ibm
Normal file
@@ -0,0 +1,47 @@
|
||||
# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:29:49 drk $
|
||||
###########################################################################
|
||||
#
|
||||
# Makefile for dtactiondemo.c
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
|
||||
# Novell, Inc.
|
||||
###########################################################################
|
||||
|
||||
#ifndef CDE_INSTALLATION_TOP
|
||||
CDE_INSTALLATION_TOP = /usr/dt
|
||||
#endif
|
||||
|
||||
PROGRAM = dtactiondemo
|
||||
SOURCES = dtactiondemo.c
|
||||
OBJECTS = dtactiondemo.o
|
||||
|
||||
OPTIMIZEDFLAGS = -O
|
||||
|
||||
DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include
|
||||
X11INCLUDE = -I/usr/include
|
||||
EXTRA_INCLUDES =
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE) $(EXTRA_INCLUDES)
|
||||
|
||||
DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc
|
||||
XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm
|
||||
XTLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXt
|
||||
X11LIB = -L/usr/lib -lX11
|
||||
|
||||
LIBRARIES = $(DTSVCLIB) $(XMLIB) $(XTLIB) $(X11LIB)
|
||||
|
||||
LDFLAGS =
|
||||
|
||||
.c.o:
|
||||
cc -c $(OPTIMIZEDFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
rm -f $(PROGRAM)
|
||||
rm -f $(OBJECTS)
|
||||
49
cde/programs/dtaction/demo/Makefile.sun
Normal file
49
cde/programs/dtaction/demo/Makefile.sun
Normal file
@@ -0,0 +1,49 @@
|
||||
# $XConsortium: Makefile.sun /main/2 1996/05/13 11:30:06 drk $
|
||||
###########################################################################
|
||||
#
|
||||
# Makefile for dtactiondemo.c
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
|
||||
# Novell, Inc.
|
||||
###########################################################################
|
||||
|
||||
#ifndef CDE_INSTALLATION_TOP
|
||||
CDE_INSTALLATION_TOP = /usr/dt
|
||||
#endif
|
||||
|
||||
PROGRAM = dtactiondemo
|
||||
SOURCES = dtactiondemo.c
|
||||
OBJECTS = dtactiondemo.o
|
||||
|
||||
OPTIMIZEDFLAGS = -O
|
||||
|
||||
DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include
|
||||
X11INCLUDE = -I/usr/openwin/include
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc
|
||||
XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm
|
||||
XTLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXt
|
||||
X11LIB = -L/usr/openwin/lib -lX11
|
||||
CPLUSPLUS = -L/lib -lC
|
||||
EXTRA_LIBS = -L/usr/openwin/lib -lgen
|
||||
|
||||
LIBRARIES = $(DTSVCLIB) $(XMLIB) $(XTLIB) \
|
||||
$(X11LIB) $(CPLUSPLUS) $(EXTRA_LIBS)
|
||||
|
||||
LDFLAGS = -R$(CDE_INSTALLATION_TOP)/lib:/usr/openwin/lib
|
||||
|
||||
.c.o:
|
||||
cc -c $(OPTIMIZEDFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
rm -f $(PROGRAM)
|
||||
rm -f $(OBJECTS)
|
||||
51
cde/programs/dtaction/demo/Makefile.usl
Normal file
51
cde/programs/dtaction/demo/Makefile.usl
Normal file
@@ -0,0 +1,51 @@
|
||||
# $XConsortium: Makefile.usl /main/2 1996/05/13 11:30:23 drk $
|
||||
###########################################################################
|
||||
#
|
||||
# Makefile for dtactiondemo.c
|
||||
#
|
||||
# (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
# (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
|
||||
# Novell, Inc.
|
||||
###########################################################################
|
||||
|
||||
#ifndef CDE_INSTALLATION_TOP
|
||||
CDE_INSTALLATION_TOP = /usr/dt
|
||||
#endif
|
||||
|
||||
PROGRAM = dtactiondemo
|
||||
SOURCES = dtactiondemo.c
|
||||
OBJECTS = dtactiondemo.o
|
||||
|
||||
OPTIMIZEDFLAGS = -O
|
||||
|
||||
DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include
|
||||
X11INCLUDE = -I/usr/X/include
|
||||
INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
|
||||
|
||||
DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc
|
||||
XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm
|
||||
XTLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXt
|
||||
X11LIB = -L/usr/X/lib -lX11
|
||||
CPLUSPLUS = -L/usr/add-on/C++/lib -lC
|
||||
EXTRA_LIBS = -L/usr/lib -lw -lgen -lnsl -lresolv -lsocket \
|
||||
-lXIM -L/usr/add-on/C++/lib -lC
|
||||
|
||||
LIBRARIES = $(DTSVCLIB) $(XMLIB) $(XTLIB) \
|
||||
$(X11LIB) $(CPLUSPLUS) $(EXTRA_LIBS)
|
||||
|
||||
#LDFLAGS = -R$(CDE_INSTALLATION_TOP)/lib:/usr/X/lib
|
||||
|
||||
.c.o:
|
||||
cc -c $(OPTIMIZEDFLAGS) $(INCLUDES) $<
|
||||
|
||||
all:: $(PROGRAM)
|
||||
|
||||
$(PROGRAM):: $(OBJECTS)
|
||||
cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
|
||||
|
||||
clean::
|
||||
rm -f $(PROGRAM)
|
||||
rm -f $(OBJECTS)
|
||||
|
||||
234
cde/programs/dtaction/demo/dtactiondemo.c
Normal file
234
cde/programs/dtaction/demo/dtactiondemo.c
Normal file
@@ -0,0 +1,234 @@
|
||||
/* $TOG: dtactiondemo.c /main/4 1998/04/20 12:47:18 mgreess $ */
|
||||
/*****************************************************************************
|
||||
*****************************************************************************
|
||||
**
|
||||
** File: dtactiondemo.c
|
||||
**
|
||||
** Description: This file contains the dtactiondemo program that
|
||||
** demonstrates the use of the Action Library functions.
|
||||
** It executes actions from the action database. It's
|
||||
** usage is as follows:
|
||||
**
|
||||
** Usage: dtactiondemo ACTION [file1 file2 ...]
|
||||
**
|
||||
** where ACTION is the name of an action and file1, ...
|
||||
** are the action's file arguments.
|
||||
**
|
||||
** This program does not support the "host:" semantics.
|
||||
**
|
||||
** Use the datatyping demo to display the supported
|
||||
** actions for a file.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
|
||||
** Novell, Inc.
|
||||
**
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <nl_types.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <Xm/XmP.h>
|
||||
#include <Xm/Text.h>
|
||||
#include <Xm/SelectioB.h>
|
||||
#include <Xm/MessageB.h>
|
||||
#include <Xm/Protocols.h>
|
||||
#include <Xm/MwmUtil.h>
|
||||
|
||||
#include <Dt/EnvControlP.h>
|
||||
#include <Dt/DbUtil.h>
|
||||
#include <Dt/Action.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# define PATH_MAX 511
|
||||
#endif
|
||||
#ifndef HOSTNAME_MAX_LEN
|
||||
# define HOSTNAME_MAX_LEN 127
|
||||
#endif
|
||||
|
||||
|
||||
/* Command line options */
|
||||
XrmOptionDescRec option_list[] =
|
||||
{
|
||||
{ "-timeout", "timeout", XrmoptionSepArg, NULL},
|
||||
{ "-contextHost", "contextHost",XrmoptionSepArg, NULL},
|
||||
{ "-contextDir", "contextDir", XrmoptionSepArg, NULL},
|
||||
{ "-execHost", "execHost", XrmoptionSepArg, NULL},
|
||||
{ "-termParms", "termParms", XrmoptionSepArg, NULL},
|
||||
};
|
||||
|
||||
/* Fallback Resources */
|
||||
static char *fallback_resources[] = {
|
||||
"*timeout: 1",
|
||||
(char *) NULL
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int timer;
|
||||
char * contextHost;
|
||||
char * contextDir;
|
||||
char * execHost;
|
||||
char * termParms;
|
||||
} ApplArgs, *ApplArgsPtr;
|
||||
|
||||
|
||||
|
||||
/* Dtaction resources */
|
||||
XtResource resources[] =
|
||||
{
|
||||
{
|
||||
"timeout", "Timeout", XmRInt, sizeof(int),
|
||||
XtOffsetOf(ApplArgs, timer), XmRImmediate, (XtPointer) 1,
|
||||
},
|
||||
{
|
||||
"contextHost", "ContextHost", XmRString, sizeof(char *),
|
||||
XtOffsetOf(ApplArgs, contextHost), XmRImmediate, (XtPointer) NULL,
|
||||
},
|
||||
{
|
||||
"contextDir", "ContextDir", XmRString, sizeof(char *),
|
||||
XtOffsetOf(ApplArgs, contextDir), XmRImmediate, (XtPointer) NULL,
|
||||
},
|
||||
{
|
||||
"execHost", "ExecHost", XmRString, sizeof(char *),
|
||||
XtOffsetOf(ApplArgs, execHost), XmRImmediate, (XtPointer) NULL,
|
||||
},
|
||||
{
|
||||
"termParms", "TermParms", XmRString, sizeof(char *),
|
||||
XtOffsetOf(ApplArgs, termParms), XmRImmediate, (XtPointer) NULL,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
void CheckForDone(
|
||||
XtPointer clientData,
|
||||
XtIntervalId id) ;
|
||||
|
||||
|
||||
/******** End Forward Function Declarations ********/
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
static Widget toplevel;
|
||||
static ApplArgs appArgs;
|
||||
static DtDirPaths *dirPaths;
|
||||
static XtAppContext appContext;
|
||||
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
CheckForDone(
|
||||
XtPointer clientData,
|
||||
XtIntervalId id)
|
||||
{
|
||||
if ( toplevel->core.num_popups == 0 )
|
||||
exit(0);
|
||||
|
||||
XtAppAddTimeOut(appContext,
|
||||
appArgs.timer * 1000, (XtTimerCallbackProc)CheckForDone, NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
main(
|
||||
int argc,
|
||||
char **argv )
|
||||
{
|
||||
Display *display;
|
||||
Arg args[20];
|
||||
int n=0;
|
||||
char *actionName;
|
||||
int numArgs = 0;
|
||||
char contextHost[HOSTNAME_MAX_LEN+1];
|
||||
char contextDir[PATH_MAX+1];
|
||||
DtActionFileArgp ap = NULL;
|
||||
|
||||
if (argc < 2) exit(0);
|
||||
|
||||
XtSetLanguageProc(NULL, NULL, NULL);
|
||||
|
||||
/* Initialize the toolkit and open the display */
|
||||
(void) signal(SIGCLD, (void (*)())SIG_IGN);
|
||||
toplevel = XtAppInitialize(&appContext , "Dtaction", option_list,
|
||||
sizeof(option_list)/sizeof(XrmOptionDescRec), &argc, argv,
|
||||
fallback_resources, (ArgList) NULL, (Cardinal) NULL);
|
||||
|
||||
XtSetArg(args[n], XmNallowShellResize, True); n++;
|
||||
XtSetArg(args[n], XmNmappedWhenManaged, False); n++;
|
||||
XtSetArg(args[n], XmNheight, 1); n++;
|
||||
XtSetArg(args[n], XmNwidth, 1); n++;
|
||||
XtSetValues(toplevel, args, n);
|
||||
XtRealizeWidget(toplevel);
|
||||
|
||||
display = XtDisplay (toplevel);
|
||||
XtGetApplicationResources(toplevel, &appArgs,
|
||||
resources, XtNumber(resources), NULL, 0);
|
||||
|
||||
if (appArgs.timer < 1)
|
||||
appArgs.timer = 1;
|
||||
|
||||
_DtEnvControl(DT_ENV_SET);
|
||||
|
||||
/* Get Dt initialized */
|
||||
if (DtInitialize (display, toplevel, argv[0], "Dtaction") == False)
|
||||
{
|
||||
/* Fatal Error: could not connect to the messaging system. */
|
||||
/* DtInitialize() has already logged an appropriate error msg */
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
/* Load the filetype/action dbs; DtInvokeAction() requires this */
|
||||
|
||||
DtDbLoad();
|
||||
|
||||
/*
|
||||
* Get the requested action name
|
||||
*/
|
||||
actionName = argv[1];
|
||||
|
||||
if ( argc > 2 )
|
||||
{
|
||||
/*
|
||||
* create an action arg array for the file objects for
|
||||
* this action. This number of objects should be one
|
||||
* less than the argument count. The returned vector will
|
||||
* be terminated by a null pointer.
|
||||
*/
|
||||
numArgs= argc - 2;
|
||||
ap = (DtActionFileArgp) XtCalloc(numArgs,sizeof(DtActionFileArg));
|
||||
}
|
||||
|
||||
for ( n = 0; n < numArgs; n++) {
|
||||
ap[n].type = NULL;
|
||||
ap[n].host = NULL;
|
||||
ap[n].name = argv[n+2];
|
||||
}
|
||||
|
||||
_DtActionInvokeOnFiles(toplevel, actionName, numArgs, ap,
|
||||
appArgs.termParms,appArgs.execHost,appArgs.contextHost,
|
||||
appArgs.contextDir,True);
|
||||
|
||||
/*
|
||||
* Set up a timer for when it is safe to exit.
|
||||
* We must invoke XtMainLoop() at least once, to force any prompt or
|
||||
* error dialogs to get posted.
|
||||
*/
|
||||
XtAppAddTimeOut(appContext,
|
||||
appArgs.timer * 1000, (XtTimerCallbackProc)CheckForDone,
|
||||
NULL);
|
||||
XtAppMainLoop(appContext);
|
||||
|
||||
}
|
||||
|
||||
|
||||
92
cde/programs/dtaction/dtact.msg
Normal file
92
cde/programs/dtaction/dtact.msg
Normal file
@@ -0,0 +1,92 @@
|
||||
$ $XConsortium: dtact.msg /main/3 1995/11/01 10:52:05 rswiston $
|
||||
$ ******************************************************************************
|
||||
$
|
||||
$ ***** NOTE FOR MESSAGE CATALOG TRANSLATORS *****
|
||||
$
|
||||
$ There may be thre types of messages in this file:
|
||||
$
|
||||
$ 1. Messages that appear in dialogs or are displayed to the user.
|
||||
$
|
||||
$ These messages are the default, and they should ALL BE LOCALIZED.
|
||||
$ Note that these messages do NOT have any identification (see the
|
||||
$ comments for type 2 and 3 below).
|
||||
$
|
||||
$ 2. Messages that only appear in the DT error log file ($HOME/.dt/errorlog).
|
||||
$
|
||||
$ The localization of these messages is OPTIONAL. These message are
|
||||
$ identified by the following:
|
||||
$
|
||||
$ MESSAGES xx-yy IN SET ZZ WILL ONLY APPEAR IN THE DT ERRORLOG FILE
|
||||
$
|
||||
$ 3. Messages that should not be localized.
|
||||
$
|
||||
$ These messages are identified by the following:
|
||||
$
|
||||
$ DO NOT TRANSLATE or CHANGE or LOCALIZE MESSAGES xx-yy from set zz
|
||||
$
|
||||
$ ***** END (NOTE FOR MESSAGE CATALOG TRANSLATORS) *****
|
||||
$
|
||||
$ ******************************************************************************
|
||||
|
||||
|
||||
$ ******************************************************************************
|
||||
$
|
||||
$ The following are the messages for the dtaction client. Here are
|
||||
$ instructions for displaying each dialog:
|
||||
$
|
||||
$ 1) To display the dialog prompting for a user password, run dtaction
|
||||
$ with the '-user <name>' option, where <name> is a valid login name
|
||||
$ on your system.
|
||||
$
|
||||
$ 2) To display the invalid password dialog, follow the steps in (1), and
|
||||
$ enter a bogus password; select the 'Ok' button.
|
||||
$
|
||||
$ 3) To display the unknown user dialog, run dtaction with the
|
||||
$ '-user <name>' option, but specify a bogus <name>; i.e. one which
|
||||
$ is not listed in /etc/passwd.
|
||||
$
|
||||
$ ******************************************************************************
|
||||
|
||||
$set 1
|
||||
|
||||
$ This is the format string used when logging a change of user to the
|
||||
$ file /usr/adm/sulog; it is written to the sulog file anytime the '-user'
|
||||
$ option is used. The fields are:
|
||||
$ <appl Name> <month>/<day> <hour>:<min> <success> <tty> <old Name> <new Name>
|
||||
$ The only fields which need to be customized are the date and time fields.
|
||||
1 dtaction %1$.2d/%2$.2d %3$.2d:%4$.2d %5$1.1s %6$s %7$s-%8$s\n
|
||||
|
||||
$ This is the label for the Ok button in the dialogs which collect
|
||||
$ the user's password, the invalid password dialog, and the unknown user
|
||||
$ error dialog.
|
||||
2 OK
|
||||
|
||||
$ This is the label for the error dialog which occurs when the user enters
|
||||
$ and invalid password into the password dialog.
|
||||
3 The password you entered does not match\nthe password for user %s.\n\nPlease reenter the password, or select the\nCancel button to terminate the operation.
|
||||
|
||||
$ This is the title for the password error dialog
|
||||
4 Action Invoker - Password Error
|
||||
|
||||
$ This is the label displayed in the prompt dialog, used to collect the
|
||||
$ user's password.
|
||||
5 Enter password for user %s:
|
||||
|
||||
$ This is the title for the prompt dialog collecting the user's password.
|
||||
6 Action Invoker - Password
|
||||
|
||||
$ This is the label for the Cancel button in the dialog which is used to
|
||||
$ collect the user's password.
|
||||
7 Cancel
|
||||
|
||||
$ This is the message displayed in the 'unknown user' dialog
|
||||
8 The user '%s' is an unknown user name.\n\nThe requested action will not be executed.
|
||||
|
||||
$ This is the title for the 'unknown user' dialog
|
||||
9 Action Invoker - Unknown User
|
||||
|
||||
$ This is for when the user has failed to supply an action name
|
||||
10 No action name specified.\n
|
||||
|
||||
$ This is for when we are unable to open the display
|
||||
11 Can't open display.
|
||||
7
cde/programs/dtaction/dtaction_main.c
Normal file
7
cde/programs/dtaction/dtaction_main.c
Normal file
@@ -0,0 +1,7 @@
|
||||
/* $XConsortium: dtaction_main.c /main/3 1995/11/01 10:52:18 rswiston $ */
|
||||
dtaction(argc,argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
main(argc,argv);
|
||||
}
|
||||
65
cde/programs/dtaction/nlsMsgChk.txt
Normal file
65
cde/programs/dtaction/nlsMsgChk.txt
Normal file
@@ -0,0 +1,65 @@
|
||||
# $XConsortium: nlsMsgChk.txt /main/2 1996/11/11 11:20:54 drk $
|
||||
#############################################################################
|
||||
#
|
||||
# Component: $(TOP)/hp/rivers/dtaction/dtaction
|
||||
#
|
||||
############################################################################
|
||||
|
||||
1. Screendump file name: 1.Z
|
||||
|
||||
_DtMessage catalog set number: 1
|
||||
|
||||
_DtMessage number: 2, 5, 6, 7
|
||||
|
||||
Instructions: The password prompting dialog
|
||||
|
||||
Run dtaction, and specify the '-user' option. For example:
|
||||
|
||||
dtaction -user root
|
||||
|
||||
|
||||
2. Screendump file name: 2.Z
|
||||
|
||||
_DtMessage catalog set number: 1
|
||||
|
||||
_DtMessage number: 2, 3, 4
|
||||
|
||||
Instructions: The invalid password error dialog
|
||||
|
||||
Run dtaction, and specify the '-user' option. For example:
|
||||
|
||||
dtaction -user root
|
||||
|
||||
Enter an invalid password, and select the 'Ok' button.
|
||||
|
||||
|
||||
3. Screendump file name: 3.Z
|
||||
|
||||
_DtMessage catalog set number: 1
|
||||
|
||||
_DtMessage number: 2, 8, 9
|
||||
|
||||
Instructions: The unknown user dialog
|
||||
|
||||
Run dtaction, and specify the '-user' option, but specify
|
||||
a user name which does not exist. For example:
|
||||
|
||||
dtaction -user xxyyzz
|
||||
|
||||
|
||||
4. Screendump file name: 4.Z
|
||||
|
||||
_DtMessage catalog set number: 1
|
||||
|
||||
_DtMessage number: 1
|
||||
|
||||
Instructions: The log message written into the file /usr/adm/sulog
|
||||
|
||||
Run dtaction, and specify the '-user' option. For example:
|
||||
|
||||
dtaction -user root
|
||||
|
||||
Enter the password for the root user, and select 'Ok'.
|
||||
Go to a terminal window, and type 'su'; enter the root
|
||||
password, when prompted. Do a 'tail /usr/adm/sulog', and
|
||||
look for the last entry beginning with 'dtaction'.
|
||||
24
cde/programs/dtaction/nlsREADME.txt
Normal file
24
cde/programs/dtaction/nlsREADME.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
# $XConsortium: nlsREADME.txt /main/2 1996/11/11 11:23:09 drk $
|
||||
#############################################################################
|
||||
#
|
||||
# Component: dtaction
|
||||
#
|
||||
# This client provides a way for non-HP-DT clients to invoke an HP-DT
|
||||
# action; the action may either result in a message being sent to another
|
||||
# HP-DT client, or in an executable program being run. In addition, the
|
||||
# user may also request that the action be run as another user (i.e. root),
|
||||
# in which case a prompt dialog is displayed, and the user will be asked
|
||||
# to enter the password for the requested user, before the action will be
|
||||
# initiated.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
|
||||
_DtMessage catalog source:
|
||||
|
||||
File name: dtact.msg
|
||||
|
||||
Target: /usr/dt/nls/%L/dtact.cat
|
||||
|
||||
#
|
||||
#############################################################################
|
||||
Reference in New Issue
Block a user