Bug 90729 - When logging out kdesktop should warn user if they opt to turn off or restart computer if other users are running processes
Summary: When logging out kdesktop should warn user if they opt to turn off or restart...
Status: RESOLVED FIXED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-04 00:22 UTC by Nicholas Allen
Modified: 2009-01-23 02:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Allen 2004-10-04 00:22:31 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    RedHat RPMs
OS:                Linux

When I log out from kdesktop a window is displayed which allows me to:

End Current Session
Turn Off Computer
Restart Computer
or Cancel

The problem is that Linux (Unix) is a multi user operating system. If I turn off the computer or reboot the computer then any other users that may be logged in remotely will have all their processes terminated. 

Often I go to turn off the computer and then hear a scream from my girlfriend as she looses her game of klines in mid flow (she uses a Windows desktop but logs in remotely using NX to my Linux laptop to run this single game - she's addicted!). 

What would be really nice would be if when I went to shutdown or reboot my computer kdesktop would do a scan of processes running by other users and would display a warning message such as "User XXXX is running applications on your computer. If you shut down or restart the computer their programs will be terminated and they may loose data. Are you sure you wish to shutdown/reboot?" A more information button could give a list of processes currently running and give more of an explanation about the multi user nature of Unix (can be hard for users coming from Windows to understand!).

This would be of much use to me and I'm sure very useful in a corporate environment too. Currently I run ps command before logging out now just to check but this gets tiresome and is not very user friendly.
Comment 1 Alan Prescott 2004-10-07 13:32:43 UTC
It's not just apps belonging to other users - I use VMWare to run Windoze sessions and my favourite mistake is closing down KDE while a VMWare session is running. I'd like some way of interfering with the logout/reboot/shutdown process so that running apps like this can be checked for and a message reported allowing the logout etc. to be cancelled.
(Executing scripts in ~/.kde/shutdown and cancelling if any one of returns != 0 for instance)
- Alan
Comment 2 Lubos Lunak 2004-10-07 13:39:24 UTC
#1: Session management allows applications to cancel logout - so that's VMWare problem.
Comment 3 Oswald Buddenhagen 2004-10-11 10:02:34 UTC
for kdm-managed x sessions this already works.
recognizing tty-based logins based on parsing utmp is on the todo list. check if the nx-session is shown in the output of the 'who' command - if not, i can´t help you.
Comment 4 Oswald Buddenhagen 2005-03-21 14:00:56 UTC
uh, right, this is fixed in kde 3.4.
Comment 5 esigra 2009-01-23 02:14:26 UTC
This is a confirmation that the bug still exists or reappeared in KDE 3.5.10.
1. Start the computer.
2. Log in as user in KDM.
3. Switch to virtual terminal 1.
4. Log in as root.
5. Switch back to virtual terminal 7.
6. Start Konsole.
7. Execute "who". This shows both root and user.
8. Press Ctrl+Alt+Delete.
9. Press enter. This shuts off the computer without even a warning.

Expected behaviour:
A user is not allowed to end another user's session (especially not root's). (Someone might prefer to just have a warning as an option, but forbidding would suffice for me.)

Even better would be if a user is can not shut down or reboot even if all other remaining sessions are his own. He would have to exit each of them (except the last one, from which me may shut down). That can prevent data loss but is not as important as protecting other user's (or root's) sessions.