Doesn't unquote double-quotes from desktop files

Bug #1228387 reported by Loïc Minier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Application Launcher
Fix Released
Undecided
Ted Gould
upstart-app-launch (Ubuntu)
Fix Released
High
Ted Gould

Bug Description

Hi,

Testing the fix for bug #1228125, I can confirm that trying to play "a b/c d.mp3" a single argument now gets passed to qmlscene instead of multiple ones, but it's still double-quoted:
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene^@/usr/share/music-app/music-app.qml^@--file="/home/phablet/Music/01-guillemin_napoleon2-500k.mp3"^@--desktop_file_hint=/usr/share/applications/music-app.desktop^@

so music-app tries to open a file starting and ending with double-quotes...

Cheers,

Related branches

Loïc Minier (lool)
Changed in upstart-app-launch (Ubuntu):
importance: Undecided → High
assignee: nobody → Ted Gould (ted)
Changed in upstart-app-launch:
assignee: nobody → Ted Gould (ted)
Revision history for this message
Loïc Minier (lool) wrote :

Changing /usr/share/upstart/sessions/application-legacy.override to run things within sh -c fixes it:
script
        if [ -z $APP_EXEC_POLICY ]; then
                exec sh -c "$APP_EXEC --desktop_file_hint=/usr/share/application
s/$APP_ID.desktop"
        else
                exec sh -c "aa-exec -p '$APP_EXEC_POLICY' -- $APP_EXEC"
        fi
end script

And I can launch music-app and it plays files again, and I also tried with a file with spaces and single quotes:
phablet 4795 3.7 3.6 348472 70508 ? Tl 21:13 0:05 \_ /usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene /usr/share/music-app/music-app.qml --file=/home/phablet/Music/29.07.2013 - 19:00 - L'Esprit de Mai.mp3 --desktop_file_hint=/usr/share/applications/music-app.desktop
and it worked fine.

Or more abruptly with eval:
script
        if [ -z $APP_EXEC_POLICY ]; then
                eval exec $APP_EXEC --desktop_file_hint=/usr/share/applications/
$APP_ID.desktop
        else
                eval exec aa-exec -p '$APP_EXEC_POLICY' -- $APP_EXEC
        fi
end script

but I'm not happy with either of these as e.g. APP_EXEC_POLICY would require quoting before it gets unquoted by eval or sh -c...

Ted Gould (ted)
Changed in upstart-app-launch:
status: New → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:upstart-app-launch at revision 63, scheduled for release in upstart-app-launch, milestone Unknown

Changed in upstart-app-launch:
status: In Progress → Fix Committed
Loïc Minier (lool)
Changed in upstart-app-launch:
status: Fix Committed → Fix Released
Changed in upstart-app-launch (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart-app-launch - 0.1+13.10.20130924.1-0ubuntu1

---------------
upstart-app-launch (0.1+13.10.20130924.1-0ubuntu1) saucy; urgency=low

  [ Ted Gould ]
  * Evil hack to allow "secondary activations" through killing the first
    instance.
  * Handle URLs with complex spacing by using C parsing. (LP: #1228387)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 63
 -- Ubuntu daily release <email address hidden> Tue, 24 Sep 2013 06:04:42 +0000

Changed in upstart-app-launch (Ubuntu):
status: In Progress → Fix Released
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.