INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Add Media Center to the sound menu in Ubuntu when installing  (Read 4483 times)

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Add Media Center to the sound menu in Ubuntu when installing
« 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.

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.

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. :)
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

imugli

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1598
Re: Add Media Center to the sound menu in Ubuntu when installing
« Reply #1 on: January 22, 2016, 02:49:06 pm »

+1

astromo

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2251
Re: Add Media Center to the sound menu in Ubuntu when installing
« Reply #2 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?
Logged
MC33, Win10 x64, HD-Plex H5 Gen2 Case, HD-Plex 400W Hi-Fi DC-ATX / AC-DC PSU, Gigabyte Z370 ULTRA Gaming 2.0 MoBo, Intel Core i7 8700 CPU, 4x8GB GSkill DDR4 RAM, Schiit Modi Multibit DAC, Freya Pre, Nelson Pass Aleph J DIY Clone, Ascension Timberwolf 8893BSRTL Speakers, BJC 5T00UP cables, DVB-T Tuner HDHR5-4DT

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Add Media Center to the sound menu in Ubuntu when installing
« Reply #3 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.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: Add Media Center to the sound menu in Ubuntu when installing
« Reply #4 on: January 25, 2016, 05:49:59 pm »

Have you had any luck getting it working with spaces in the .desktop file?
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Add Media Center to the sound menu in Ubuntu when installing
« Reply #5 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.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7804
  • Autumn shade...
Re: Add Media Center to the sound menu in Ubuntu when installing
« Reply #6 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! :)
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: Add Media Center to the sound menu in Ubuntu when installing
« Reply #7 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!
Logged
Pages: [1]   Go Up