Version: (using KDE 4.1.1) OS: Linux Installed from: Ubuntu Packages There is a problem with konsole -e "command1 && command2" type, for example: konsole -e "cd src && make" it doesn't work, but if you run: xterm -e "cd src && make" it works perfectly.
When you pass '-e' to Konsole it treats the command afterwards as a program and tries to run it directly. Xterm must be starting a new shell and running the command in the shell. To do this in Konsole run: konsole -e $SHELL -c "cd src && make"
A useful side-effect of the way Konsole handles '-e' is that if the command does not exist then Konsole displays a helpful warning message in the terminal and starts a shell instead.
it works: many thanks! BTW, what is better? 1- konsole 100% xterm command line compatible 2- don't change it (and put this trick in konsole documentation)
Using konsole -e jed %f from kmail to write/edit e-mail no longer works, regardless of whether you pass the shell environment with -e to it as above or not if you pass the parameter for a file name as Kmail expects. konsole -e $SHELL -c "jed" %f works, but it doesn't load the parameter file name from Kmail, hence you get a blank page from Jed. Set up kmail and check the box for using an external editor. (jed) Start a new message in e-mail and voila! You have Jed open but not the tmp file name used by Kmail. My only workaround thus far that seems to be working is "gnome-terminal -x jed %f which works fine.
*** This bug has been confirmed by popular vote. ***
(In reply to comment #4) > Using konsole -e jed %f from kmail to write/edit e-mail no longer works, > regardless of whether you pass the shell environment with -e to it as above or > not if you pass the parameter for a file name as Kmail expects. The working form is "konsole --nofork -e jed %f". I tested it with konsole-2.7.2 and kmail-4.7.2 . The real problem is currently konsole runs in foreground by default. See bug #262169 for more info.
(In reply to comment #3) > it works: many thanks! > > BTW, what is better? > 1- konsole 100% xterm command line compatible > 2- don't change it (and put this trick in konsole documentation) I don't like the xterm way. I don't think parsing and dividing input into commands is something a emulator is expected to do. That is shell's job. AFAIK, xterm is the only emulator bahaving that way. Putting that into documentation is a good idea.
Git commit e586c7ff11c9e7a6f8dc9614e307d165c5ceb35d by Jekyll Wu. Committed on 23/10/2011 at 08:41. Pushed by jekyllwu into branch 'master'. Add explanation on how the -e option works in konsole. Konsole treats all arguments after the -e option as one commnd and runs it directly, instead of parsing it and dividing it into sub-commands for execution. This is different from xterm. CCBUG:170867 M +19 -0 doc/manual/index.docbook http://commits.kde.org/konsole/e586c7ff11c9e7a6f8dc9614e307d165c5ceb35d