Bug 469274

Summary: Logout scripts should be executed before Plasma and KWin terminate
Product: [Plasma] plasmashell Reporter: Sadi <sadiyumusak>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: kde, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.27.2   
Target Milestone: 1.0   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sadi 2023-05-02 15:45:05 UTC
SUMMARY
***
I have a logout script to check if there are any files that I forgot in several temporary folders before logging out.
This logout script was skipped when I choose to restart automatically during Discover offline updates, which has been fixed recently. However, maybe in connection with this fix, my logout script is executed now after (I think) plasmashell is terminated, so if there are some files that I forgot in those temporary folders, Dolphin opens such a folder to take some action but without any window decoration, menu, or even shortcut keys working, which makes it difficult to quit at the end.
***


STEPS TO REPRODUCE
1. Use a logout script that will open, say, "/tmp" with Dolphin 
2. Close any Dolphin window, and log out

OBSERVED RESULT
The system terminates plasmashell first (I think), and then exectues the logout script, opening a Dolphin window displaying the contents of "/tmp" folder, but without titlebar, menu, shortcut keys etc.

EXPECTED RESULT
The logout script should be executed before plasmashell is terminated.

SOFTWARE/OS VERSIONS
Operating System: SparkyLinux 7 (Debian Testing/Bookworm)
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 David Edmundson 2025-06-01 14:03:41 UTC
With the systemd boot this is doable using standard systemd hooks. 

systemctl --used edit plasma-worksace 
ExecStopPost=....

The logout scripts are just legacy leftover.