You are not logged in.
To keep this short and simple it looks like Linux in general seems to have this behaviour where shutting down from the desktop environment just kills the application instead of gracefully shutting it down.
This issue has been raised in 2015 and 2 bug reports have been followed through in which its declared as solved but that doesn't seem to be the case yet...?
https://forum.xfce.org/viewtopic.php?id=9541
Currently due to XFCE not gracefully shutting down Firefox every time I logout, reboot or shutdown Firefox thinks that application has crashed or forcefully exited and restores all the sessions back which is annoying and can be altered but doesn't seem to be the ideal solution.
I found this script on stackexchange where it seems to work properly but only issue is to make it run during the above 3 options.
https://unix.stackexchange.com/a/154169
When I use Session and Startup and configure them to be run on logout and etc. they just don't execute making me to believe there is some sort of race condition going behind the scene? by the time wmctrl is being called all the applications have been killed...? Hence it looks like as if nothing has changed.
I am not blaming XFCE entirely on this as other desktop environments have similar queries like this but the two bug posts have been marked as solved but doesn't really seem to be the case for me...
It will be grateful if someone could look into this matter.
Offline
Hello and welcome.
I notice this as well. If you "export XFSM_VERBOSE=1" in your system-wide environment (for me in Arch its a file in /etc/profile.d), you will get .xfce4-session.verbose-log and .xfce4-session.verbose-log.last (which will contain the logout log entries) files. You can review these to see exactly what is happening.
For me, I get:
TRACE[ice-layer.c:98] ice_error_handler(): ICE connection fd = 30, ICE I/O error on connection
TRACE[xfsm-client.c:290] xfsm_client_set_state(): !!!!!FIREFOX!!!!! client state was XFSM_CLIENT_SAVEDONE and now is XFSM_CLIENT_DISCONNECTED
TRACE[main.c:214] name_lost(): name_lost
TRACE[main.c:228] name_lost(): Disconnected from D-Bus
...(I've replaced the client hash with "!!!!!FIREFOX!!!! to see it easier).
Something is going on there that doesn't seem to happen with the other Xfce programs I am running. Might be worth a bug report.
Are there any other programs outside of Firefox that you are seeing this happening?
With respect to the wmctrl script, when I manually:
wmctrl -ic $FIREFOX_WINDOW_ID
...it shuts down properly. But in the shutdown process, it doesn't work either.
Last edited by ToZ (2024-08-22 14:57:40)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
what exactly are you doing? ... what steps do you take? ... to do a shutdown or reboot. i personally use shell commands [sudo] reboot or [sudo] halt -p.
i rarely shutdown. i reboot when i want to do an upgrade (Xubuntu uses the Ubuntu repository for most upgrades). i reboot once before the actual upgrade the once to allow and "after boot" upgrade actions and one more reboot (2 or 3 total) to bring up my big environment (9 logged in users). after the actual Ubuntu upgrade it takes about 12 more minutes. i do this about every week, and start the script (mostly bash, some Python3) manually. i usually leave it running dclock over most of the display
Offline
[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 529.46 KiB (Peak: 530.74 KiB) ]