Bug 182466 - Unchecking 'confirm logout' then logging out shuts down the system
Summary: Unchecking 'confirm logout' then logging out shuts down the system
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
: 183058 183268 184562 186140 190418 196863 200101 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-30 18:22 UTC by James Spencer
Modified: 2010-02-28 16:32 UTC (History)
17 users (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 James Spencer 2009-01-30 18:22:55 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Using Debian Unstable with KDE 4.2.0 cherry picked from experimental (A Lenny related logjam) if I uncheck 'confirm logout' then proceed to logout from the default menu the system proceeds to shutdown. If I check 'confirm logout', then logout, it will drop me back to KDM (Which is the intended behaviour I'd assume.)

The combination of options for the bug are:
General:
[ ] Confirm logout
[X] Offer Shutdown Options

Default Shutdown Option:
[X] End Current Session
[ ] Turn Off Computer
[ ] Restart Computer

On Login:
[X] Restore Previous Session**
[ ] Start With Manually Saved Session
[X] Start With Empty Session**

** Either setting will trigger the logout bug.
Comment 1 Thilo-Alexander Ginkel 2009-01-31 10:57:21 UTC
I can confirm this issue with 4.2.0 packages installed from the Kubuntu repository. Unfortunately, ksmserver does not seem to crash, so I cannot provide a backtrace to help figuring out what is wrong...
Comment 2 Enzo Matrix 2009-02-01 05:00:45 UTC
Confirmed here as well. Running KDE 4.2 on Slackware 12.2. The system shuts down if 'Confirm logout' is disabled.
Comment 3 Dario Andres 2009-02-05 12:47:18 UTC
*** Bug 183268 has been marked as a duplicate of this bug. ***
Comment 4 Rafal Kupiec 2009-02-06 13:44:12 UTC
Confirmed here as well - KDE 4.2 compiled from scratch on Gentoo Linux...
Comment 5 Ismael Barros 2009-02-19 12:17:14 UTC
Confirmed in Archlinux, KDEmod 4.2.0.

I have to "qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 0" in order to log out without shutting down the machine.
Comment 6 Vasyl Demin 2009-02-23 12:34:56 UTC
Confirmed in Archlinux, KDE 4.2.0
Comment 7 Vasileios P. Lourdas 2009-02-23 19:30:46 UTC
Confirmed in Gentoo, KDE 4.2.0.
Comment 8 pipapo 2009-03-01 16:04:20 UTC
Confirmed in Debian testing/unstable
Comment 9 A. Mosteo 2009-03-06 14:00:47 UTC
*** Bug 186140 has been marked as a duplicate of this bug. ***
Comment 10 giovanni 2009-03-25 18:17:05 UTC
This bug is still there in 4.2.1 (gentoo)
Comment 11 Nicolas Bigaouette 2009-04-07 00:27:49 UTC
Still on KDEmod 4.2.2 on ArchLinux
Comment 12 martynorespublika 2009-04-29 00:20:52 UTC
(In reply to comment #11)
> Still on KDEmod 4.2.2 on ArchLinux

Still on Kubuntu 9.04 (KDE 4.2.2)
Comment 13 Dario Andres 2009-05-29 16:42:36 UTC
Looking at bug 183058, it seems this works properly when logouting with the Lock&Logout plasmoid or with the "end session" command on KRunner. So the bug only happens when clicking the Leave option on the Kickoff menu. 
Can you check that too ?
Thanks
Comment 14 Oswald Buddenhagen 2009-05-29 17:13:17 UTC
unless i screwed up this time, ksmserver's d-bus interface's logout() function is broken - it doesn't respect the shutdown type (i.e., it never shuts down). consequently all the "plasma-based" bugs relating to shutdown would be in fact ksmserver's bug.

i might try to fix that this weekend. let's see.
Comment 15 Bruno Menegola 2009-05-30 00:21:28 UTC
I'm not a kde developer but I took a look at the kickoff and ksmserver codes and it seems to me that its really a ksmserver bug (not a kickoff bug, as I reported in bug 183058). The lock/logout plasmoid seems not to use the ksmserver interface to end session (maybe this is something to add to the TODO list?), but the kickoff does. A workaround could be like this (not tested, I can't compile this right now):

--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/itemhandlers.cpp.bkp        2009-05-29 18:51:06.000000000 -0300
+++ trunk/KDE/kdebase/workspace/plasma/applets/kickoff/core/itemhandlers.cpp    2009-05-29 18:51:21.000000000 -0300
@@ -153,7 +153,7 @@
     if (m_logoutAction == "logout") {
         type = KWorkSpace::ShutdownTypeNone;
     } else if (m_logoutAction == "logoutonly") {
-        type = KWorkSpace::ShutdownTypeLogout;
+        type = KWorkSpace::ShutdownTypeDefault;
     } else if (m_logoutAction == "lock") {
         kDebug() << "Locking screen";
     } else if (m_logoutAction == "switch") {

But this only would use the same end session method that the lock/logout does. Probably it's not the right way to solve the problem.
Comment 16 Oswald Buddenhagen 2009-05-31 19:40:12 UTC
SVN commit 976028 by ossi:

try to fix up the shutdown stuff

first of all, deprecate the braindead ShutdownTypeLogout again and alias
it to ShutdownTypeNone internally, as the latter means "logout only"
(that enum refers to the machine's state, not the session's).

unify the semantics of ksmserver's d-bus interface to interpret a
shutdown request with a pre-selected shutdown type as needing only a
confirmation, not a full choice. this is a behavior break from the
original implementation, but that actually happened in 4.2 already - i'm
just fixing it.

all "generic" logout actions (alt-ctrl-del, lock_logout applet, plasma
desktop menu) now always pop up the full shutdown dialog, irrespective
of the "confirm shutdown" option.
"specialized" logout actions (like in kickoff's "leave" menu) continue
to respect the "confirm shutdown" option. if the confirmation is
enabled, the reduced shutdown dialog will appear as before (only some
implementation details changed).

BUG: 152110
BUG: 177139
BUG: 182466

 M  +1 -1      krunner/krunnerapp.cpp  
 M  +9 -2      ksmserver/shutdown.cpp  
 M  +64 -69    ksmserver/shutdowndlg.cpp  
 M  +3 -2      ksmserver/shutdowndlg.h  
 M  +4 -6      ksmserver/tests/test.cpp  
 M  +4 -2      libs/kworkspace/kworkspace.h  
 M  +1 -3      plasma/applets/kickoff/core/itemhandlers.cpp  
 M  +1 -1      plasma/applets/lock_logout/lockout.cpp  
 M  +1 -1      plasma/containments/desktop/desktop.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=976028
Comment 17 Dario Andres 2009-06-17 14:45:12 UTC
*** Bug 196863 has been marked as a duplicate of this bug. ***
Comment 18 Oswald Buddenhagen 2009-07-14 00:24:33 UTC
*** Bug 200101 has been marked as a duplicate of this bug. ***
Comment 19 Bruno Menegola 2009-08-06 04:39:45 UTC
*** Bug 183058 has been marked as a duplicate of this bug. ***
Comment 20 Alan Braslau 2009-09-02 09:16:18 UTC
Must be related to the present bug:
- since a recent upgrade (using KDE 4.3.0 Debian/unstable)
the ksmserverrc confirmLogout=false option seems to be ignored,
that is logging out (via right click or lock/logout plasma widget)
always brings up the confirm logout dialog pop-up, regardless
of the setting of the confirmLogout option.
Comment 21 Oswald Buddenhagen 2010-02-21 11:53:52 UTC
*** Bug 184562 has been marked as a duplicate of this bug. ***
Comment 22 Oswald Buddenhagen 2010-02-28 16:32:10 UTC
*** Bug 190418 has been marked as a duplicate of this bug. ***