space in name field causes failure of media player interface to export

Bug #1031933 reported by Alex Launi on 2012-08-01
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
The Sound Menu
Invalid
High
Alex Launi
WebApps: libunity-webapps
Medium
Alex Launi
libunity
Fix Released
High
Alex Launi
indicator-sound (Ubuntu)
Undecided
Unassigned
libunity (Ubuntu)
High
Alex Launi

Bug Description

Unity.init({ name: "My Webapp", ...});
works and will create a launcher icon/context/etc however if it fails when using the MediaPlayer API. The interface gets created on the context daemon bus, but the needed mpris bus does not get exported. This behaviour is NOT exhibited if that is modified to Unity.init({ name: "MyWebapp", ...});

Related branches

Alex Launi (alexlauni) on 2012-08-01
visibility: private → public
Changed in libunity-webapps:
assignee: nobody → Alex Launi (alexlauni)
importance: Undecided → Medium
Changed in indicator-sound:
importance: Undecided → Medium
status: New → Confirmed
Changed in libunity-webapps:
status: New → Confirmed
Changed in indicator-sound:
assignee: nobody → Conor Curran (cjcurran)
importance: Medium → High
Changed in indicator-sound (Ubuntu):
status: New → Confirmed
Conor Curran (cjcurran) wrote :

Looking over the libunity code at the moment, the entry point is

public MusicPlayer (string desktop)
Which internally this desktop string is used create a new DesktopAppInfo

http://www.valadoc.org/#!api=gio-unix-2.0/GLib.DesktopAppInfo.DesktopAppInfo

Going on the spec passing in names of apps won't work, we need the name of the desktop file.

Changed in indicator-sound:
status: Confirmed → Invalid
Changed in indicator-sound (Ubuntu):
status: Confirmed → Invalid
Changed in libunity-webapps:
assignee: Alex Launi (alexlauni) → Conor Curran (cjcurran)
status: Confirmed → Incomplete
Alex Launi (alexlauni) on 2012-09-20
Changed in libunity-webapps:
assignee: Conor Curran (cjcurran) → Alex Launi (alexlauni)
Alex Launi (alexlauni) wrote :

Conor, the unity music player IS given the desktop file name

unity-webapps-music-player-context.c
87 UnityMusicPlayer *player;
92 player = unity_music_player_new (context->desktop_name);

and then when exporting the bus you do ->
// TODO: I think you will need to ensure the name is only one word and lower case
var mpris_extension = consumer.app_info.get_name().down();
var dbus_name = MPRIS_INTERFACE_PREFIX.concat (mpris_extension);
      bus_name_owner_handle =
            Bus.own_name (BusType.SESSION,
                          dbus_name,
                          BusNameOwnerFlags.NONE,
                          null,
                          () => { Trace.log ("Owning name %s", dbus_name); },
                          on_name_lost);

but never convert spaces to underscores or anything.

Changed in indicator-sound:
status: Invalid → Confirmed
Changed in libunity-webapps:
status: Incomplete → Invalid
Changed in indicator-sound:
assignee: Conor Curran (cjcurran) → Alex Launi (alexlauni)
status: Confirmed → Invalid
Changed in libunity:
status: New → Confirmed
assignee: nobody → Alex Launi (alexlauni)
importance: Undecided → High
milestone: none → 5.14.0
Conor Curran (cjcurran) wrote :

ah sorry, sounds like a fix then !

Changed in libunity:
status: Confirmed → Fix Committed
Changed in libunity:
milestone: 5.14.0 → 6.8.0
Changed in libunity:
status: Fix Committed → Fix Released
Adolfo Jayme (fitojb) on 2014-01-11
no longer affects: libunity (Ubuntu Quantal)
Changed in libunity (Ubuntu):
status: New → Fix Released
assignee: nobody → Alex Launi (alexlauni)
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers