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.
Created attachment 12752 [details] Screenshot of warning message
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?
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.
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; }
Cheers!