1836413 Members
2295 Online
110100 Solutions
New Discussion

CDE Logout/Exit

 
Keith Meloy_1
Occasional Advisor

CDE Logout/Exit

I am trying to find a way to stop users from logging out (either from the "Exit" button on the toolbar or the "Log out..." option on the Workspace menu) when they have not closed down certain applications. I thought the best way would be to trap the CDE logout action and do some checking, but I cannot find out how to do it from the manuals.
Can anyone help (or suggest an elternative)?

Cheers

Keith
5 REPLIES 5
Sachin Patel
Honored Contributor

Re: CDE Logout/Exit

Hi Keith,
As I know when you logout using exit button on CDE it will gracefull close all applications

Sachin
Is photography a hobby or another way to spend $
Kelli Ward
Trusted Contributor

Re: CDE Logout/Exit

Hi,
Sachin should be right.
CDE should close user applications on exit.
Worst case scenario would be they might lose any unsaved data, but maybe losing some unsaved data will teach 'em to save and quit properly instead of taking the quick way out.

You could have the system log out automatically when they close the particular application and remove the exit button from the desktop, but you may likely be asking for more headaches than it's worth, depending on what applications are being run.
Good luck to you,
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
Alex Glennie
Honored Contributor

Re: CDE Logout/Exit

That's fairly simple : cde makes use of 2 features or scripts : sessionetc or sessionexit.

They need to be created manually and need to have execute permissions : they reside in $HOME/.dt/sessions

the script is executed just prior to CDE logout (in the case of sessionexit) and just after CDE login (in the case of sessionetc) .....

so why not write a small script to check for the application name/pid and kill it via sessionexit if the user does not or something v.similar ?

more info in the CDE Advanced users guide.
张渊斌_1
Senior Member

Re: CDE Logout/Exit

what is the different of exit and logout
Steve Steel
Honored Contributor

Re: CDE Logout/Exit

Hi

Look at

http://www.docs.hp.com/hpux/onlinedocs/B1171-90162/B1171-90162.html

To Execute Additional Commands at Logout

A companion file to sessionetc is sessionexit. Use sessionexit to perform some operation at session exit that is not handled by Session Manager.

Create the file HomeDirectory/.dt/sessions/sessionexit.

Like sessionetc, this file is usually a script with execute permission.


This would be the easiest way to not allow complete logout while there are active processes,or to kill the procersses, but since the shutdown should be clean anyway . why bother.


You could also give a return to $HOME session when users start


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)