maemo.org Bugzilla – Bug 2114
run-standalone.sh expands parameters incorrectly.
Last modified: 2007-11-28 13:10:18 UTC
You need to
before you can comment on or make changes to this bug.
/usr/bin/run-standalone.sh (same script in both SDK and device) expands the
command line parameters without preserving paramater boundaries, which leads to
problems when running programs that have parameters which contain spaces in
Example (runniable on both):
run-standalone.sh dbus-send --print-reply --type=method_call
com.nokia.statusbar.system_note_dialog string:'Hello world' int32:2
dbus-send: Data item "world" is badly formed
A dialog that opens via D-Bus from the statusbar component, containing
"information"-icon and test "Hello World".
dbus-send sees string:Hello and World as two separate parameters due to
incorrect quoting in run-standalone.sh and hence fails to run.
STEPS TO REPRODUCE THE PROBLEM:
Repeat the example above.
The fix is _trivial_:
Instead of launching the program with $* , use "$@" as the last line in
run-standalone.sh (applies to both SDK and N800, probably earlier/later
versions as well).
After this three-character fix, parameter boundaries are preserved through
You might also want to prepend the launch with 'exec ' (since the launch is the
last action for the script and keeping the shell running for the duration of
the launched program gains nothing in this case).
For great victory! Seriously though, no exec? :-).
Fixed in 4.0 release SDK. closing (it still doesn't have the exec though).
Works in 4.0 SDK properly. (does not include the exec still, but one can't have
the pie and eat it).
Closing. Resolution has been verified.