Dolphin saves history in ~/.config/session/dolphin_*

Dolphin saves info about opened files in a directory ~/.config/session/ in files with names dolphin_somehexvalue. How can I disable this?

This is a session issue - you can disable it in settings - on login, just start with an empty session so that Dolphin will always open fresh and if it crashes or gets closed, you just lose your session (i.e. it won’t restore any previous tabs or locations).

Is it safe to mount ~/.config/session/ as tmpfs via /etc/fstab?

i think that would defeat the purpose…

changing your plasma session setting to start with an empty session would be easier.

for the time during a session (before you restart) you can set dolphin to start with a fixed folder so that when you close dolphin it forgets all the tabs you had open… if that’s what you want.

Is there some kind of reasoning behind this?

If you want extreme privacy, you should be looking at using only live sessions.

If you brutally mount your /session/ folder as tmpfs, then you’re basically breaking KDE’s session management.

Do you think it’s a good idea for security? the problem is that it simply conflicts on a fundamental level how Plasma handles saving and restoring your desktop state.

The sensible solution is to adjust your ‘session’ settings in KDE Plasma.

You’re risking:

  • Loss of session - any crash or error risks you losing any ability to restore data.
  • Security - there’s really no security benefit because your session data is cleared if you log out anyway.

You can simply tell KDE Plasma to always start with a fresh, empty session.