Xubuntu reopens last session applications even though it shouldn't

Solution 1:

Clear your sessions cache: Settings Manager, Sessions and Startup, Sessions Tab, Clear Saved Sessions.

Log out and log back in.

Reference: Xfce Docs » Core » Session Manager » Preferences


Another possibility is to delete the contents of ~/.cache/sessions. However, you will need to log out first and then open a console with Ctrl+Alt+F1 and log in from the keyboard. Then delete the contents or move the files elsewhere, and close the console using Ctrl+Alt+F7. Now, on logging in via the GUI, you should have a clean session.

Solution 2:

None of these answers worked for me long term. Even setting "restart style" to "Never" in "Session and Startup" -> "Session" tab didn't work either - the setting would eventually revert to "If running".

What seems to work so far is adding the following line to /etc/rc.local

rm -rf /home/*/.cache/sessions/*

before "exit 0", obviously.