With either sudo fallback or consolekit, my session isn't saved if i shutdown or reboot, the .cache/session/ xfce4-session-$(hostname):0 file is not updated. It's saved properly if i logout. AutoSave and SaveOnExit xfconf properties are both true. I've looked at the code and it's as if xfsm_manager_store_session() wasnt called. I'll try with XFSM_VERBOSE set in the env to see if i can find the issue.
Created attachment 4411 verbose logout
Created attachment 4412 verbose reboot And here are the logs with XFSM_VERBOSE=1. It's as if the SAVE YOURSELF step was skipped...
After leengthy debugging, it seems to me that the codepath taken in xfsm-manager.c is : xfsm_manager_dbus_logout xfsm_manager_save_yourself_dbus xfsm_manager_dbus_shutdown_idled xfsm_manager_save_yourself_global problem is, xfsm_manager_dbus_logout gets passed false for allow_save, regardless of the SaveOnExit/AutoSave properties. and in xfsm_manager_save_yourself_global(), since shutdown_save gets false, the session is not saved when shutdown is true... Now, to find what calls xfsm_manager_dbus_logout (via dbus i suppose)..
So, in the case of xfce4-session-logout, allow_save defaults to FALSE, and is changed if -f is passed.. And in the case of the actions plugin, allow_save comes from the 'unattended' value which defaults to FALSE and can be changed by the 'action_confirmation' dialog. I'm not sure the unattended variable has the same semantic as allow_save. So, from my understanding, the SaveOnExit xfconf property was used in the old xfsm-logout-dialog.c in 4.8, which isnt used anymore (i think) in 4.10. And as it is now, if you dont use a confirmation dialog when shutting down (and that might even change nothing), the session will never be saved.
More tests.. after using the confirmation dialog in the actions plugin, the session is _not_ saved when shutting down/rebooting. Interestingly, xfce4-session-logout -f -r does set allow_save to try, and that effectively saves the session. So, from here, i'd say we have two bugs : - one in xfce4-session-logout, where the logic of -f is reversed, and it doesnt honour SaveOnExit (the intent of -f was probably to override it) - one in the actions plugin, where the second parameter of the dbus call should honour SaveOnExit instead of coming from a random value defaulting to false ? I can fix those bugs, i just want to get confirmation i'm in the right direction. Or the plan was to deprecate/unuse SaveOnExit ?
Finally, wild guess but i'd say http://git.xfce.org/xfce/xfce4-session/commit/?id=4002e8d4ef3905e878e44633c076f8e7d42fd91b might be the commit that broke the logout. SaveOnExit/AutoSave looks more unused after that commit... in the new code, i wonder how is xfsm-logout-dialog.c called ? It only seems called in xfsm-manager.c:1102.
And finally, another way to get the session properly saved on reboot/powerdown : xfce4-session-logout without parameters brings the logout dialog from xfsm-logout-dialog.c, click on poweroff/reboot => sets shutdown_save to 1 based on SaveOnExit xfconf property, and then saves the session before exiting.
Created attachment 4555 Fix --fast option in xfce4-session-logout
Created attachment 4556 Fix unattended in xfce4-panel
Created attachment 4557 Read SaveOnExit in xfsm_manager_save_yourself_global Read the actual value from xfconf if allow_shutdown_save is TRUE.
*** Bug 9181 has been marked as a duplicate of this bug. ***
What is the status of this bug? Bug #8678 is the same issue. In your last patch for xfsm-manager.c, why do you read the value from xfconf? Shouldn't xfsm_manager_save_yourself_global always respect the passed parameter and the actions plugin read / pass the correct value from xfconf?
Status is still in flux, two fixes were commited to git : http://git.xfce.org/xfce/xfce4-session/commit/?id=499a719019e03da90b6901bb0f8a89d06ae167ee http://git.xfce.org/xfce/xfce4-panel/commit/?id=17643fd28f499691ae97503eb58755b4b9fabb53 I dont really remember if more is needed, nor what should take precedence on what..
The last remaining bit seems to be bug #7930, the panel plugin does not respect the settings.