Bug 126557

Summary: konsole ignores "DefaultSession" parameter in konsolerc
Product: [Applications] konsole Reporter: Hai Zaar <haizaar>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Makes konsole to honour 'DefaultSession' parameter in konsolerc

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;
 }