Bug 113515 - Field 'Execute' field is considered mandatory in Konsole 3.5.0-beta1 configuration, tab 'Session'
Summary: Field 'Execute' field is considered mandatory in Konsole 3.5.0-beta1 configur...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.6
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-28 16:42 UTC by Ernst de Haan
Modified: 2005-09-29 09:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of warning message (49.00 KB, image/png)
2005-09-28 16:43 UTC, Ernst de Haan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ernst de Haan 2005-09-28 16:42:38 UTC
Version:           1.6 (using KDE 3.4.91 (beta1, >= 20050910), Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.12-gentoo-r9

The 'Execute' field is considered mandatory in Konsole in KDE 3.5.0-beta1, where it is not mandatory in KDE 3.4.x. In 3.4.x the bahaviour seems to be that the default shell is run. See attached screenshot.
Comment 1 Ernst de Haan 2005-09-28 16:43:24 UTC
Created attachment 12752 [details]
Screenshot of warning message
Comment 2 Kurt Hindenburg 2005-09-28 17:34:24 UTC
The warning was done to fix http://bugs.kde.org/show_bug.cgi?id=105754.

Perhaps if the Execute field is empty automatically add /bin/sh?
Comment 3 Ernst de Haan 2005-09-28 17:47:23 UTC
Well, if the Execute field is empty, then no check should have to be done. Because in that case the default command will be executed, which is the shell. And that is -depending on the user's settings- not /bin/sh, but could be /bin/bash or /usr/local/bin/tcsh, for example.

So proposed change in behaviour:
If the Execute field is empty, then do not perform the check that triggered the warning shown in the screenshot.
Comment 4 Kurt Hindenburg 2005-09-28 18:15:24 UTC
SVN commit 464922 by hindenburg:

If Execute field empty, don't display warning about invalid Execute entry.

BUG: 113515


 M  +11 -11    sessioneditor.cpp  


--- branches/KDE/3.5/kdebase/kcontrol/konsole/sessioneditor.cpp #464921:464922
@@ -290,22 +290,22 @@
   // Verify Execute entry is valid; otherwise Konsole will ignore it.
   // This code is take from konsole.cpp; if you change one, change both.
   QString exec = executeLine->text();
-  if ( exec.startsWith( "su -c \'" ) ) {
-     exec = exec.mid( 7, exec.length() - 8 );
-  }
-  exec = KRun::binaryName( exec, false );
-  exec = KShell::tildeExpand( exec );
-  QString pexec = KGlobal::dirs()->findExe( exec );
+  if ( !exec.isEmpty() )  // If Execute field is empty, default shell is used.
+  {
+    if ( exec.startsWith( "su -c \'" ) )
+      exec = exec.mid( 7, exec.length() - 8 );
+    exec = KRun::binaryName( exec, false );
+    exec = KShell::tildeExpand( exec );
+    QString pexec = KGlobal::dirs()->findExe( exec );
 
-  if ( pexec.isEmpty() )
-  {
-    int result = KMessageBox::warningContinueCancel( this,
+    if ( pexec.isEmpty() )
+    {
+      int result = KMessageBox::warningContinueCancel( this,
             i18n( "The Execute entry is not a valid command.\n"
 			"You can still save this session, but it will not show up in Konsole's Session list." ),
 			i18n( "Invalid Execute Entry" ),
 			KStdGuiItem::save() );
-    if ( result != KMessageBox::Continue )
-    {
+      if ( result != KMessageBox::Continue )
         return;
     }
 
Comment 5 Ernst de Haan 2005-09-29 09:02:58 UTC
Cheers!