! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-session-plugin always save the session during restart/logout.
Status:
RESOLVED: INVALID
Product:
Xfce4-session
Component:
General

Comments

Description Vladimir Kravets 2011-08-23 07:39:25 CEST
Actual behavior:
xfce4-session-plugin always save the xfce4 session during logout/restart.

Expected behavior:
xfce4-session-plugin should save the xfce4 session according to value of SaveOnExit flag from xfce4 settings registry. (key: xfce4-session/general/SaveOnExit)

Steps to reproduce:
1. Add Session Menu plugin to the xfce panel.
2. Launch some application (e.g. Web Browser)
3. Click on the Session Menu button on the panel and click Log Out.
(Login manager should be appeared)
4. Login to the system
=>
5. Web Browser will be launch.

System Information:
$ cat /etc/issue
Ubuntu 11.04 \n \l

$ uname -a 
Linux sly-sub 3.1.0-0301rc2-generic #201108150905 SMP Mon Aug 15 09:12:41 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

$ apt-cache show xfce4
Package: xfce4
Priority: optional
Section: universe/x11
Installed-Size: 40
Maintainer: Xubuntu Developers <xubuntu-devel@lists.ubuntu.com>
Original-Maintainer: Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>
Architecture: all
Version: 4.8.0~ubuntu1
Depends: xfwm4 (>= 4.8.0), xfconf (>= 4.8.0), xfce4-settings (>= 4.8.0), xfce4-panel (>= 4.8.0), xfdesktop4 (>= 4.8.0), thunar (>= 1.2.0), thunar-volman (>= 0.6.0), xfce4
-utils (>= 4.8.0), gtk2-engines-xfce (>= 2.8.0), xfce4-session (>= 4.8.0), xfce4-appfinder (>= 4.8.0), xfce4-mixer (>= 4.6.1), orage (>= 4.8.0)
Recommends: xorg, desktop-base (>= 5.0.4), tango-icon-theme (>= 0.8.90)
Suggests: xfprint4, xfce4-goodies
Filename: pool/universe/x/xfce4/xfce4_4.8.0~ubuntu1_all.deb
Comment 1 Vladimir Kravets 2011-08-23 07:44:31 CEST
The issue appeared in the xfce4-session/panel-plugin/xfsm-logout-plugin.c:215

logout_plugin->allow_save = TRUE;

In this case we need to take value of this flag from xfce4 settings registry and do not set it always to TRUE 
I will attach the fix later on.

Thank,
Vladimir
Comment 2 Lionel Le Folgoc 2011-08-25 14:53:31 CEST
Created attachment 3831 
Possible patch

Here's a quick patch that seems to fix the issue here. Feel free to improve it (especially, I'm not sure how to handle xfconf_init, if there's a failure to contact the daemon, xfce4-panel would have already noticed that and failed to start, I guess).

Another thing is the xfconf property to use, as currently there are two of them in xfce4-session, and they roughly do the same thing:
- "/general/AutoSave" (you can set it in the settings' dialog)
- "/general/SaveOnExit" (you can set it in the logout dialog)

...
Comment 3 Kevin Fenzi 2011-09-17 20:01:44 CEST
These are probibly dupes of this: 
https://bugzilla.xfce.org/show_bug.cgi?id=7800
https://bugzilla.xfce.org/show_bug.cgi?id=7696
Comment 4 Lionel Le Folgoc 2011-10-15 16:30:37 CEST
*** Bug 7800 has been marked as a duplicate of this bug. ***
Comment 5 Lionel Le Folgoc 2011-10-15 16:31:30 CEST
*** Bug 7696 has been marked as a duplicate of this bug. ***
Comment 6 David Finch 2011-11-27 23:30:42 CET
*** Bug 8198 has been marked as a duplicate of this bug. ***
Comment 7 Lionel Le Folgoc 2012-04-20 14:38:54 CEST
Plugin dropped from xfce4-session 4.9.x.

Bug #7915

Reported by:
Vladimir Kravets
Reported on: 2011-08-23
Last modified on: 2012-04-20
Duplicates (3):
  • 7696 Session menu panel plugin always saves session
  • 7800 The session is automatically saved at logout even it is not asked for.
  • 8198 "Automatically save session on logout" option not respected. Still saves/restores if unchecked.

People

Assignee:
Xfce Bug Triage
CC List:
8 users

Version

Attachments

Possible patch (2.46 KB, patch)
2011-08-25 14:53 CEST , Lionel Le Folgoc
no flags

Additional information