Bug 126557 - konsole ignores "DefaultSession" parameter in konsolerc
Summary: konsole ignores "DefaultSession" parameter in konsolerc
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-01 11:10 UTC by Hai Zaar
Modified: 2006-05-01 20:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Makes konsole to honour 'DefaultSession' parameter in konsolerc (727 bytes, patch)
2006-05-01 11:11 UTC, Hai Zaar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hai Zaar 2006-05-01 11:10:07 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Compiled From Sources
Compiler:          gcc-3.4.3 
OS:                Linux

Specifying 
DefaultSession=<whatever>
in konsolerc does not have any effect - shell,desktop is _always_ used.
konsole is started from command line.

Looking at sources I've found that konsole just do not read this parameter. 

I've made a patch to solve the problem.
Comment 1 Hai Zaar 2006-05-01 11:11:30 UTC
Created attachment 15867 [details]
Makes konsole to honour 'DefaultSession' parameter in konsolerc
Comment 2 Kurt Hindenburg 2006-05-01 20:00:31 UTC
SVN commit 536256 by hindenburg:

Use the "DefaultSession" parameter in konsolerc.
Thanks for the patch!

BUG: 126557


 M  +5 -2      konsole.cpp  


--- branches/KDE/3.5/kdebase/konsole/konsole/konsole.cpp #536255:536256
@@ -2706,8 +2706,11 @@
 
 KSimpleConfig *Konsole::defaultSession()
 {
-  if (!m_defaultSession)
-    setDefaultSession("shell.desktop");
+  if (!m_defaultSession) {
+    KConfig * config = KGlobal::config();
+    config->setDesktopGroup();
+    setDefaultSession(config->readEntry("DefaultSession","shell.desktop"));
+  }
   return m_defaultSession;
 }
 
Comment 3 Kurt Hindenburg 2006-05-01 20:29:27 UTC
SVN commit 536269 by hindenburg:

Use the "DefaultSession" parameter in konsolerc.

CCBUG: 126557


 M  +5 -2      konsole.cpp  


--- trunk/KDE/kdebase/apps/konsole/konsole/konsole.cpp #536268:536269
@@ -2668,8 +2668,11 @@
 
 KSimpleConfig *Konsole::defaultSession()
 {
-  if (!m_defaultSession)
-    setDefaultSession("shell.desktop");
+  if (!m_defaultSession) {
+    KConfig * config = KGlobal::config();
+    config->setDesktopGroup();
+    setDefaultSession(config->readEntry("DefaultSession","shell.desktop"));
+  }
   return m_defaultSession;
 }