-e (execute) option mishandles spaces

Bug #948321 reported by Colomban Wendling
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
konsole (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

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, LP:#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

Colomban Wendling (banw)
description: updated
Revision history for this message
Philip Muškovac (yofel) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the
KDE program itself, and not with our KDE packages. While we appreciate
your issue, it would be better if it was tracked at
https://bugs.kde.org, so that the KDE developers can deal with this
speedily and have direct communication with you as the reporter for more
effective debugging.

Thanks!

Changed in konsole (Ubuntu):
status: New → Invalid
Revision history for this message
Chow Loong Jin (hyperair) wrote :

Please do not mark upstream bugs as invalid. Our downstream packages are an amalgamation of both the upstream product as well as our downstream packaging. If a bug exists in the upstream portion of our packages and is not fixed in a downstream patch, then the bug is present and valid in the downstream package.

Changed in konsole (Ubuntu):
status: Invalid → New
Revision history for this message
Chow Loong Jin (hyperair) wrote :

Rather than closing the bug as invalid, it should be forwarded upstream and marked as Triaged.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in konsole (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel Faust (hessijames) wrote :
summary: - -e (execute) option mishanldes spaces
+ -e (execute) option mishandles spaces
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.