INTERACT FORUM

More => Old Versions => JRiver Media Center 21 for Linux => Topic started by: Awesome Donkey on January 22, 2016, 09:18:02 am

Title: Add Media Center to the sound menu in Ubuntu when installing
Post by: Awesome Donkey on January 22, 2016, 09:18:02 am
NOTE: This will require renaming MC's .desktop file from media center 21.desktop to mediacenter21.desktop - the information about this can be found here (http://www.liberiangeek.net/2012/04/remove-add-media-players-to-ubuntu-sound-menu-in-ubuntu-12-04-precise-pangolin/).

If Media Center can run these commands when installing, it can be integrated into Ubuntu's sound menu for native control, which is outlined in this topic (http://yabb.jriver.com/interact/index.php?topic=102327.0).

This command *should* add Media Center to interested-media-players;

Code: [Select]
gsettings set com.canonical.indicator.sound interested-media-players "['mediacenter21']"
This command *should* add Media Center to preferred-media-players;

Code: [Select]
gsettings set com.canonical.indicator.sound preferred-media-players "['mediacenter21']"
And finally this command will remove Media Center from the sound menu;

Code: [Select]
gsettings set com.canonical.indicator.sound blacklisted-media-players "['mediacenter21']"
Thoughts? Getting this working by default would be pretty nifty and would be one step closer to a more native support feel. :)
Title: Re: Add Media Center to the sound menu in Ubuntu when installing
Post by: imugli on January 22, 2016, 02:49:06 pm
+1
Title: Re: Add Media Center to the sound menu in Ubuntu when installing
Post by: astromo on January 23, 2016, 05:13:30 am
Sensible suggestion. Is this philosophy applicable to the MC Linux default OS?

Or, is there a process whereby on install the OS is interrogated so that a conditional sub-process can be run?
Title: Re: Add Media Center to the sound menu in Ubuntu when installing
Post by: bob on January 25, 2016, 05:18:43 pm
Sensible suggestion. Is this philosophy applicable to the MC Linux default OS?

Or, is there a process whereby on install the OS is interrogated so that a conditional sub-process can be run?
For now I just silently run those commands (if gsettings exist) on post-install
I didn't see an agnostic way of doing the equivalent.
Title: Re: Add Media Center to the sound menu in Ubuntu when installing
Post by: Awesome Donkey on January 25, 2016, 05:49:59 pm
Have you had any luck getting it working with spaces in the .desktop file?
Title: Re: Add Media Center to the sound menu in Ubuntu when installing
Post by: bob on January 25, 2016, 06:02:54 pm
Have you had any luck getting it working with spaces in the .desktop file?
I didn't try, I just used your commands verbatim, I thought it was referring to the executable.
Title: Re: Add Media Center to the sound menu in Ubuntu when installing
Post by: Awesome Donkey on January 25, 2016, 07:00:42 pm
Unfortunately it won't work with the spaces in the name of the .desktop file which is what it tries to use. I'll do some research tomorrow to see if there's a way around it.

EDIT: Okay, I have it. It looks like you can install a second .desktop file without spaces, then use the following in that .desktop file to keep it hidden from the menus (so there's only one MC entry in the menus);

Code: [Select]
NoDisplay=true
That should do it! :)
Title: Re: Add Media Center to the sound menu in Ubuntu when installing
Post by: bob on January 25, 2016, 07:09:45 pm
Unfortunately it won't work with the spaces in the name of the .desktop file which is what it tries to use. I'll do some research tomorrow to see if there's a way around it.

EDIT: Okay, I have it. It looks like you can install a second .desktop file without spaces, then use the following in that .desktop file to keep it hidden from the menus (so there's only one MC entry in the menus);

Code: [Select]
NoDisplay=true
That should do it! :)
Ok, I'll give this a try in the next build.
Thanks for tracking it down!