but the session is still getting restored at next log-in.
I know it is possible to just save the session again after closing the windows but I would like to delete the config files using a small script (or keyboard shortcut) instead. XFCE had a “forget session” button that I wish was in Plasma as well.
I am using Wayland and Plasma 6.4.1.
Thank you, but not what I was looking for this time, but I forgot that I could just save the session and do: find -type f -printf '%T@ %p\n' | sort -n | tail -10 to see the last 10 changes, and in that output I could see the file ~/.config/ksmserverrc and ~/.local/state/plasmasessionrestorestaterc being changed, so I guess they are the files I have been looking for.
No, i did try that. I had to delete ~/.local/state/plasmasessionrestorestaterc I think the session folder you mentioned only stores part of the information to restore a saved session. I think it has mostly Kwin stuff. not which apps that are open. I also had to delet part of ~/.config/ksmserverrc but not all, because this is the file that stores the setting that says that you want to manually save a session. So if you delete the whole file you are back to the setting that restores all apps that where open when you log out, and I dont want that, I want to restore only the apps that where open when I manually saved. We should really get a “forget session” button next to the “save session” button.
yes , at first I was trying some commands from internet but they where for Plasma 4 , they did not work so I guess things have changed a bit. Maybe Wayland does things a little different as well.