Comment 0 for bug 948321

Revision history for this message
Colomban Wendling (banw) wrote : -e (execute) option mishanldes spaces

The -e option of Konsole has a very strange behavior if one of the first argument has a space in it. Actually, everything after the space is simply ignored:

$ konsole -e "/bin/sh somescript"
executes "/bin/sh"

$ konsole -e "/bin/some program with spaces"
tries to execute "/bin/some"

$ konsole -e "/bin/some\ program\ with\ spaces"
tries to execute "/bin/some program with spaces"

This behavior doesn't follow XTerm (and other) behavior and seems simply wrong. I would've expected either
1) execute as a shell-formed command, so splitting at spaces and passing extra arguments to the command, or
2) execute the argument, e.g. with the spaces

This makes it hard to use konsole as a random terminal emulator from a script or application, e.g. when mapped to x-terminal-emulator. For example, #282972 made the Geany editor use "x-terminal-emulator" as its terminal emulator, but broke Geany under KDE because it tries to run "'x-terminal-emulator' '-e' '/bin/sh somescript'", and then Konsole simply runs "/bin/sh".

Ubuntu version: 11.10
Konsole version: 4:4.7.1-0ubuntu2