Version: 1.5 (using KDE 3.4.0, Debian Package 4:3.4.0-0ubuntu3 (3.1)) Compiler: gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2) OS: Linux (i686) release 2.6.11-1-686 How to re-produce: 1) Create new session and save it 2) Open 'Session' menu -> problem: the created session is not found in the menu Restarting konsole doesn't solve the problem. However, new desktop-file can be found in $KDEDIR/share/apps/konsole.
There was following line in session's desktop-file: Exec=somehost.foo If you replace it with following line, the session will appear in menu: Exec=ssh somehost.foo So, it seems that if the command is invalid, konsole excludes the session from the menu. That's ok, but a message box 'sorry, your command is invalid etc' would make the user happier.
> 1) Create new session and save it You mean in the session editor?
Right. Settings -> Configure Konsole -> Sessions
Yes, the invalid session still shows up in the Configure->session list, but doesn't show up in the Session Menu List. I had thought at one time I had a popup; but it appears it just prints a warning: konsole: WARNING: Unable to use /home/kvh/.kdehome-cvs/share/apps/konsole/Linux Console4.desktop
SVN commit 417792 by hindenburg: Display a warning message if user enters an invalid Execute command in the Session editor. BUG: 105754 M +26 -0 sessioneditor.cpp --- trunk/KDE/kdebase/kcontrol/konsole/sessioneditor.cpp #417791:417792 @@ -31,6 +31,8 @@ #include <kurlrequester.h> #include <klineedit.h> #include <kiconloader.h> +#include <krun.h> +#include <kshell.h> // SessionListBoxText is a list box text item with session filename class SessionListBoxText : public QListBoxText @@ -285,6 +287,30 @@ void SessionEditor::saveCurrent() { + // 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 ( 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 ) + { + return; + } + + } + QString fullpath; if (sessionList->currentText() == nameLine->text()) { fullpath = ( ((SessionListBoxText *)sessionList->item( sessionList->currentItem() ))->filename() ).section('/',-1);