maemo.org Bugzilla – Bug 2114
run-standalone.sh expands parameters incorrectly.
Last modified: 2007-11-28 13:10:18 UTC
You need to log in 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 the. Example (runniable on both): run-standalone.sh dbus-send --print-reply --type=method_call --dest=com.nokia.statusbar /com/nokia/statusbar com.nokia.statusbar.system_note_dialog string:'Hello world' int32:2 dbus-send: Data item "world" is badly formed EXPECTED OUTCOME: A dialog that opens via D-Bus from the statusbar component, containing "information"-icon and test "Hello World". ACTUAL OUTCOME: 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. OTHER COMMENTS: 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 run-standalone.sh.
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).
https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-initscripts/run-standalone.sh
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.