Kate(Ubuntu 22系统23.08.4版本)会话恢复功能失效求助
Hey there, let's work through why your Kate session restore isn't kicking in on Ubuntu 22 with version 23.08.4. I've dealt with similar quirks before, so here are some practical troubleshooting steps:
Double-check your session restore settings
Fire up Kate, head to Settings > Configure Kate.... Navigate to the Session section (it might be nested under General depending on your UI layout). Make sure these options are ticked:- Restore previous session on startup
- Automatically save session on exit (or the matching option that tracks your open docs)
Sometimes settings can get stuck—try unchecking both, clicking Apply, then rechecking and applying again to reset the state.
Inspect the session storage files
Kate saves session data in~/.local/share/kate/sessions/by default on Ubuntu. Open a terminal and run:ls ~/.local/share/kate/sessions/You should see files ending with
.katesessionif sessions are being saved. If the folder is empty, that means Kate isn't storing your sessions at all—either settings aren't applying, or there's a permission issue. Check folder permissions with:ls -ld ~/.local/share/kate/sessions/Your user needs read/write access here. If not, fix it with:
chmod -R u+rwx ~/.local/share/kate/sessions/Create a manual default session
Open all the documents you want to keep in your session, then go to Session > Save Session As... and name it something like "Default Session". Next, head back to Settings > Configure Kate... > Session and set the Default session to the one you just created. Close Kate completely (check for background processes withps aux | grep kateand kill any lingering ones if needed), then reopen it to see if your saved session loads.Reset Kate's configuration (last resort)
If nothing else works, a corrupted config file might be the culprit. First, close Kate entirely. Then run this in the terminal to back up your old config:mv ~/.config/katerc ~/.config/katerc.bakReopen Kate—it'll generate a fresh default config. Enable the session restore settings again, test if it works. You can copy back your other preferred settings from the
.bakfile later if needed.
备注:内容来源于stack exchange,提问作者alfredopacino

