! 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-4.10.1-r2 incorrectly closes GUI applications (windows) at logo...
Status:
RESOLVED: WONTFIX
Product:
Xfce4-session
Component:
General

Comments

Description Ikonta 2015-05-20 10:11:03 CEST
I use XFce Desktop Environment on Gentoo GNU/Linux.
Configuration and patches of used build of xfce-base/xfce4-session-4.10.1-r2 package can be seen at
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/xfce-base/xfce4-session/

The issue is that on closing session XFce uses SIGTERM to terminate GUI applications.
That is incorrect.

FireFox browser provides the easiest way to see it (so you need previously to install it, I remember such behaviour since ESR 17, currently I use ESR 31):

First time view normal mode:
1. Start FF;
2. Open some pages (for example https://bugs.gentoo.org/ andhttps://bugzilla.xfce.org/);
3. Normally close window (with two tabs opened) via Ctrl-Q or Alt-F4, or mouse click on pictogram in window header;
4. Start FF again.
5. You'll see the normal start according to browser settings.

After that we can reproduse the issue:
1. Start FF again (if not started);
2. Open some pages (same as listed or others on your taste);
3. Execute XFce menu's logout (or reboot or poweroff) command (save session checkbox should be selected);
4. Re-login.
5. FF together with other X11 applications will be saved into session list and auto-started.
6. But. After FF started, it will show NOT result of ordinar start (seen at 5 step of previous demo), but error tab with broken session list.

The same result you'll get if, after starting FF you'll start terminal, using ps command get the FF pid and send it SIGTERM signal.

xfce-session should first time try to close window normally (similiarly with Ctrl-Q and Alt-F4 actions), and only after a control timeout send the rest of them first SIGTERM and finally SIGKILL signals.
Probably (I'm not familiar with X11 programming) it should be XDestroyWindow function:
http://www.x.org/releases/X11R7.7/doc/man/man3/XDestroyWindow.3.xhtml

Finally, with the example FF browser: if opened many windows and tabs, sometimes normal close doesn't fit in default timeout (and XFce echoes no-responce error window, but some seconds later normal terminate succeed, destroing also error window.
So it will be fine, if user's sessings will allow to configure value of this timeout: how much time application should have for normal termination, before sending SIGTERM signal.
Comment 1 beelze 2015-05-21 09:22:40 CEST
Same for Firefox and some other programs. For instance, Geany do not save anything (opened tabs, recent list) when closing by xfce, so I had to close Geany/FF manually before logout/reboot. 
Here's another associated problem – most GUI programs do not ask anything (e.g. about unsaved documents) when killed by SIGTERM, so may lead to loss of data.
As for my opinion, desired behaviour is attempt to close top-level windows – instead of killing relevant processes.
Comment 2 Ikonta 2015-11-10 15:43:42 CET
Related question about handling of unsaved documents.
Starting with mousepad see bug #12300
Comment 3 Skunnyk editbugs 2020-05-26 00:09:27 CEST
Closing old bugs

Bug #11919

Reported by:
Ikonta
Reported on: 2015-05-20
Last modified on: 2020-05-26

People

Assignee:
Xfce Bug Triage
CC List:
5 users

Version

Version:
Unspecified

Attachments

Additional information