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 4174 times)

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
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 Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | Topping D50s DAC | Edifier R2000DB Bookshelf Speakers

imugli

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1601
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: 2239
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
MC31, 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: 13487
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: 7367
  • The color of Spring...
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 Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | Topping D50s DAC | Edifier R2000DB Bookshelf Speakers

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
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: 7367
  • The color of Spring...
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 Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2023 Update (23H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | Topping D50s DAC | Edifier R2000DB Bookshelf Speakers

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
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