SUMMARY: custom/captive logins in Solaris 2.6 CDE

From: Peter Schauss x 2014 (
Date: Wed Apr 08 1998 - 12:25:20 CDT

I have the basics of a captive login environment under CDE/Solaris 2.6.
Now what I need to do some furthur customization.

We have an application program which uses Motif to display a menu
for the user. Is there any way to have the exit button on this menu
force a logout.


The response from David Thorburn-Gundlach <>
was the most usefull. After a bit of digging around, I found
a command accessible from the shell, dtaction.

I can now run my menu from a shell script at login.

Here is what I have now:


# cfmss specific session initializations
if [ `groups | grep cfmss_sched` ]
. /usr/local/bin/local_profile
. run_mefis_menu&

Note: local_profile defines PATH and other necessary environment
variables. Only users in the group cfmss_sched get the menu.


# Run mefis_menu and kill the session when done
/usr/dt/bin/dtaction ExitSession

/etc/dt/config/sys.dtwmrc contains a modified root menu containing
only the logout command.

/etc/dt/app-defaults/C/Dtwm contains the line:

        Dtwm*useFrontPanel: False

Software developers and system administrators can get to a shell
if they have $HOME/.dt/dtwmrc with the default root menu.
In order to insure that we are not all locked out, I need to make
certain that privileged users have a $HOME/.dt/dtwmrc with a complete

Anyone see and loopholes in the above?

Thanks for all of the quick answers to my question.

Peter Schauss
Gull Electronic Systems Division
Parker Hannifin Corporation
Smithtown, NY

Details from responses:

From: "Brooke King (6532)" <>

The exit button will lead to a logout if the shell invoking your
application exits immediately after the application exits.

From: Richard Skelton <>

>From the file /usr/dt/config/C/sys.dtwmrc :-
     "Log out..." f.action ExitSession

From: David Thorburn-Gundlach <>

Peter --

I did a quick dig through /usr/dt/appconfig/types/C (where all of the
front panel images and actions are defined) and found that the exit
button calls the action "ExitSession", which calls "XSession_Exit".
Try binding XSession_Exit (probably a Motif command) or ExitSession (a
dtaction) to your exit button and see what you get.

From: (Marc S. Gibian)

There is probably a simpler way, but you could always have mwm/dtwm menu execute
the dtaction command to execute the action for logout (I'd have to lookup the
specific name for that action if you need it).


From: "Brooke King (6532)" <>

I haven't used Motif in a long time, but I suppose you could
start your app at the end of your .xinitrc, follow it with an
exit, and not start mwm. If you want a captive environment, then
maybe you don't need mwm.

Upon further reflection, I realize this is quite a problem if you
want/need mwm for your application. Maybe you could put a wrapper
script around your app, and have the wrapper send a SIGTERM (with
kill (manual section 1)) to any mwm process with the same user ID
after the app exits and returns to the script. You would start
the wrapper script backgrounded in your .xinitrc before you start

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:36 CDT