10

I have two computers and both have exactly the same behavior. I have the option "load last used session" selected, but every time, Kate starts a new session. What could be causing this?

Here are the permissions of ~/.kde/share/apps

mike@mike-laptop:~/.kde/share/apps$ ls -l
<..>
drwx------ 4 mike mike 4096 2011-08-19 10:58 kate
<..>

mike@mike-laptop:~/.kde/share/apps$ ls -l kate
-rw------- 1 mike mike 2927 2011-08-19 10:58 metainfos
drwx------ 5 mike mike 4096 2011-03-18 09:49 plugins
drwxr-xr-x 2 mike mike 4096 2011-03-18 09:49 sessions

Also starting kate from the command line produces no output at all.

Rinzwind
  • 293,910
  • 41
  • 570
  • 710
Mike
  • 623
  • 1
  • 11
  • 25

1 Answers1

11

Open ~/.kde/share/config/katerc and verify if these are in there:

[General] 
Last Session=mysession.katesession 
Restore Window Configuration=true 
Session Exit=save

There has been a long outstanding bug where sometimes some of the settings are not properly saved.

Rinzwind
  • 293,910
  • 41
  • 570
  • 710
  • This was exactly it. Except that `Session Exit` wasn't there at all and it worked without it too. Now, any idea why this would happen on two separate computers? Would installing kubuntu-desktop on top of ubuntu-desktop have anything to do with it? – Mike Aug 19 '11 at 17:53
  • it should not. kubuntu and ubuntu -should- be seperate systems not touching each other. But I saw the katerc mentioned in a bug as sometimes not saving settings and quickly also found these 3 settings related to sessions. It was more of a guess than anything else ;) Glad it workd out! – Rinzwind Aug 19 '11 at 17:57
  • Well I'm glad it worked. It just seems strange to me that it has this behavior on two separate computers, one of which is a fresh install of 11.04. – Mike Aug 19 '11 at 17:58
  • For some reason the setting `Last Session` got reverted on both computers to being empty a day or two later. I had to set it again. – Mike Oct 18 '11 at 16:04
  • Same here, Last Session gets erased when kate is not running and I open a file with Dolphin. I am afraid this is not considered a bug... See https://bugs.launchpad.net/ubuntu/+source/kdesdk/+bug/774985 – Damien Nov 21 '14 at 13:50
  • 1
    As of KDE 5.21 (Feb 2021), `katerc` is in `~/.config`, and the `Last Session` and `Session Exit` keys no longer exist. The [session restore bug is still there](https://bugs.kde.org/show_bug.cgi?id=433237) – Dan Dascalescu Feb 19 '21 at 10:56
  • @DanDascalescu for me putting the variables into ~/.config/katerc did actually work! – skjerns Jan 29 '23 at 21:19