Auto-shutdown aplications in kde

Hi.

You can set the applications you want to launch in plasma5 in Startup and shutdown-autostart but there is some similar “autoclose”?
I would like to run some scripts when closing KDE.

best regards

System Settings - Startup and Shutdown - Autostart - Add Logout Script

I have a couple of scripts in “$HOME/.config/plasma-workspace/shutdown”.

I have just seen that this is the same as arvidjaar](https://forums.opensuse.org/member.php/69818-arvidjaar) said. I created a script in ~/scripts and linked it in System Settings - Startup and Shutdown - Autostart - Add Logout Script and I have seen that the link is located in $HOME/.config/plasma-workspace/shutdown

Yes, I thought so. But I find it easier to use that directory. I actually keep scripts elsewhere, and link them there.

You can also use “$HOME/.config/plasma-workspace/env” for scripts to be run before the desktop is fully started. I use it to start “ssh-agent” if it isn’t already running. The script name ends in “.sh”, and is sourced by desktop startup. Any environment variables that sets will be shared across desktop applications.