Where are Kate session names kept?

I once created a Kate session name with a typo. Since then I can’t get rid of it.

Kate re-creates a ~/.local/share/kate/sessions/badname.katesession after each reboot and the name re-appears in the Kate session launcher.

I have checked/removed

  • ~/.local/share/kate/sessions/badname.katesession
  • ~/.local/share/kate/stash/badname/
  • ~/.local/share/applications/org.kde.kate.desktop

and of course grep’ed the whole of ~/.config, ~/.kde, and ~/.local.

Any other places to check?

You can rename the session in the Session Manager:
Menu → Sessions → Manage Sessions → Select a session → Click rename.

BTW sessions are stored in $HOME/.local/share/kate/sessions. If you installed via flatpak, then it is probably in $HOME/.var/app/org.kde.kate/config/sessions

BTW sessions are stored in $HOME/.local/share/kate/sessions.

I know, see my post. But even if I eradicate one from there, it comes back…

Do you have to reboot the whole computer, or is it enough to restart Kate only? Before you start Kate are the files itself are coming back? (In this case it is not a Kate-related issue)

Excellent question, and the answer is even more surprising that I thought.

  • I check the Kate session launcher, and see only my three good session names (due to some cleanup after previous reboot).
  • I visit the three active Kate sessions and close them
  • I use ps to check for lingering Kate processes just in case and don’t find any
  • I check the Kate session launcher, and the ghost session is back!
  • I clean that up again in ~/.local/share/kate/
  • I restart the kate sessions, and terminate them again, and the ghost session doesn’t show up.
  • Not in a position right now to reboot or even logout, so will try this later