Bug 222014 - KDE session management: Kate sesssions do not load plugins
Summary: KDE session management: Kate sesssions do not load plugins
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: HI normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 200678 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-10 04:13 UTC by Sean Hunt
Modified: 2010-10-30 15:25 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Hunt 2010-01-10 04:13:39 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

If Kate is started by the KDE session management system upon a log-in, it appears completely incapable of loading any plugins. They can be enabled as normal. This is especially irritating as if you have session auto-save turned on, then the plugin settings will be saved if you close, meaning you have to manually open them again.

Kate should load all plugins stored in the session when it is started, irrespective of whether or not the session management system started it.
Comment 1 Dominik Haumann 2010-02-21 00:43:24 UTC
*** Bug 200678 has been marked as a duplicate of this bug. ***
Comment 2 Michael Kreitzer 2010-02-21 02:57:01 UTC
Bug 200678 has been marked as a duplicate of this one, but I don't see the similarity. The issue I'm having and that bug 200678 describes is Kate not appearing to save any plugin information if it's still running when logging out of KDE. When this happens the Kate session will not load with the plugins it had when it was shut down. This is irrespective of how the kate session is started. If I boot into a clean desktop and start Kate manually several hours later, if it was running when kde was shutting down before it will be plugin less when started.

I'm not at all clear on how KDE manages shutting down programs on log out. The standard way of doing things would be a SIGTERM, but however it does it, when it happens Kate is not saving any plugin state for the session. How Kate is started is unimportant, how it is closed is. This bug describes a problem related to Kate being started by the KDE session manager, not the Kate session manager failing to save state on a termination initiated externally.

In fact, I wouldn't even know how to reproduce this bug as in order to trigger kate to not load plugins it should on startup, it would have to successfully save a list to start on shutdown, and it seems we do not even get that far.

Is there some sort of overlap I'm missing here?
Comment 3 Dominik Haumann 2010-02-21 17:32:09 UTC
What you describe: Kate open, logut + login, plugins + configuraiton gone. This is exactly what this report is about.
Comment 4 zicodxx 2010-05-18 11:04:54 UTC
I want to confirm this bug on my side... 
Drives me totally nuts as I constantly need to re-enable the "Terminal"- and "Find in files"-plugins...
Comment 5 Viktor Engelmann 2010-08-16 00:53:59 UTC
the problem is still present in 3.4.3
it drives me nuts, also - if you use kate for programming, then you have to switch back and forth between kate and konsole (to compile manually)

kate was a very versatile all-round tool once, but because of this bug it is no better than notepad anymore...
Comment 6 Marcel Wiesweg 2010-08-20 10:37:26 UTC
It seems - I really can't believe it yet - that this bug is finally fixed here with 4.5.0, opensuse packages. I just did a reboot, and F12 is working! Yes!
Comment 7 Frédéric COIFFIER 2010-08-20 11:10:07 UTC
I confirm the same behaviour on Gentoo with 4.5.0 packages : Terminal and Search extensions have been restored correctly.
Comment 8 Dominik Haumann 2010-10-30 15:24:02 UTC
probably I fixed that by accident with this commit: 
SVN commit 1124512 by dhaumann:
    fix session restore shows wrong view (bug #126732)
    
    The KateViewSpace already sets the active view in ::restoreConfig(),
    and KateApp::newMainWindows was overwriting that.
    

 M  +1 -8      kateapp.cpp  


--- trunk/KDE/kdesdk/kate/app/kateapp.cpp #1124511:1124512
@@ -386,15 +386,8 @@
 {
   KConfig *sconfig = sconfig_ ? sconfig_ : new KConfig(m_sessionManager->defaultSessionFile());
   QString sgroup = !sgroup_.isEmpty() ? sgroup_ : "MainWindow0";
-  KateMainWindow *mainWindow = new KateMainWindow (sconfig, sgroup);
 
-  if ((mainWindows() > 1) && m_mainWindows[m_mainWindows.count()-2]->viewManager()->activeView())
-    mainWindow->viewManager()->activateView ( m_mainWindows[m_mainWindows.count()-2]->viewManager()->activeView()->document() );
-  else if ((mainWindows() > 1) && (m_docManager->documents() > 0))
-    mainWindow->viewManager()->activateView ( (m_docManager->document(m_docManager->documents() - 1)) );
-  else if ((mainWindows() > 1) && (m_docManager->documents() < 1))
-    mainWindow->viewManager()->openUrl ( KUrl() );
-
+  KateMainWindow *mainWindow = new KateMainWindow (sconfig, sgroup);
   mainWindow->show ();
 
   return mainWindow;
Comment 9 Dominik Haumann 2010-10-30 15:25:19 UTC
PS: Here, it works in KDE 4.5. Please try again in KDE 4.6, since there were quite some changes with regard to the session handling.