INTERACT FORUM

Please login or register.

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

Author Topic: Add StartupNotify = true to .desktop file?  (Read 9436 times)

imugli

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1601
Add StartupNotify = true to .desktop file?
« on: January 21, 2016, 11:36:53 pm »

Just wondering if this can be done by default from JR end so each open window doesn't create a separate icon in Unity Launcher?

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #1 on: January 22, 2016, 08:22:00 am »

Just wondering if this can be done by default from JR end so each open window doesn't create a separate icon in Unity Launcher?

I'm wondering this as well, and also I believe this (or using a .ico icon) is the reason why the icon is missing from the running instance when using Linux Mint.

This isn't an absolute solution however, as 1 out of 10 or so starts results in the separate icon being created in the Unity Launcher. So there may be a bug there, not sure.

Please Bob, add this one to (nearly) end this Unity nightmare once and for all!  ;)
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

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5174
  • "Linux Merit Badge" Recipient
Re: Add StartupNotify = true to .desktop file?
« Reply #2 on: January 22, 2016, 08:30:44 am »

It would also solve similar issues on Gnome cross-platform, which would be nice.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #3 on: January 22, 2016, 09:03:17 am »

Yup, if this can be done (along with renaming media center 21.desktop back to mediacenter21.desktop and getting Media Center to only use running instances) this can open up some new options.

I'll be posting some requests today that go along with these. ;)
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 StartupNotify = true to .desktop file?
« Reply #4 on: January 22, 2016, 02:36:33 pm »

Fantastic!

I'm happy using MC as my default on Ubuntu now - these are just niggly UX things that if fixed can make it great, not good.

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Add StartupNotify = true to .desktop file?
« Reply #5 on: January 22, 2016, 02:50:23 pm »

Yup, if this can be done (along with renaming media center 21.desktop back to mediacenter21.desktop and getting Media Center to only use running instances) this can open up some new options.

I'll be posting some requests today that go along with these. ;)
Playing with this now.
I don't see how  renaming media center 21.desktop back to mediacenter21.desktop fixes anything. In fact I remember the opposite.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #6 on: January 22, 2016, 03:19:35 pm »

Playing with this now.
I don't see how  renaming media center 21.desktop back to mediacenter21.desktop fixes anything. In fact I remember the opposite.

It *should* work fine as long as StartupNotify is added, but like I said every 10 or so launches it'll still happen. Not sure if this is a MC bug or a Unity quirk - this could possibly happen in Debian too, but that'll need to be further tested. As-is right now, it'll create a duplicate icon in the Unity launcher every 3 or 4 launches. Whereas using StartupNotify seems to help greatly.

Hmmm, of course this would also require detecting and removing the old media center 20.desktop file to prevent duplicates. On the bright side, it should allow MC to be added to Ubuntu's sound menu pretty easily.
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 StartupNotify = true to .desktop file?
« Reply #7 on: January 22, 2016, 04:14:30 pm »

It *should* work fine as long as StartupNotify is added, but like I said every 10 or so launches it'll still happen. Not sure if this is a MC bug or a Unity quirk - this could possibly happen in Debian too, but that'll need to be further tested. As-is right now, it'll create a duplicate icon in the Unity launcher every 3 or 4 launches. Whereas using StartupNotify seems to help greatly.

Hmmm, of course this would also require detecting and removing the old media center 20.desktop file to prevent duplicates. On the bright side, it should allow MC to be added to Ubuntu's sound menu pretty easily.
Uninstalling (purge?) MC20 should remove that file.
The MC21 desktop file will also get removed and the new one added when MC is updated.

I seem to recall that MC's X window class name "Media Center 21" is supposed to match the desktop filename to prevent multiple icons in the launcher.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #8 on: January 22, 2016, 04:26:52 pm »

Hmmm, then it's probably best to leave the .desktop file naming as-is then. I'll see if I can figure out how to get the sound menu working with the spaces in the name.
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 StartupNotify = true to .desktop file?
« Reply #9 on: January 22, 2016, 05:15:52 pm »

That's where I was at yesterday as well.

imugli

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1601
Re: Add StartupNotify = true to .desktop file?
« Reply #10 on: January 22, 2016, 05:28:23 pm »

Can you try using "'media center 21'" (with the " on the outside)?

I'm not on my linux box right now, so can't...

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Add StartupNotify = true to .desktop file?
« Reply #11 on: January 22, 2016, 05:29:58 pm »

Hmmm, then it's probably best to leave the .desktop file naming as-is then. I'll see if I can figure out how to get the sound menu working with the spaces in the name.
Try this build and see what you get.
I think I've got it incorporating all of your suggestions:
http://files.jriver.com/mediacenter/channels/v21/latest/MediaCenter-21.0.39-amd64.deb
or
http://files.jriver.com/mediacenter/channels/v21/latest/MediaCenter-21.0.39.deb   (i386)
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #12 on: January 22, 2016, 06:03:59 pm »

So far, so good.

The new PNG icon looks great in the ALT+TAB task switcher too now.
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

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #13 on: January 22, 2016, 06:41:02 pm »

Okay, some testing results thus far;

- The icon on the running instance in Linux Mint works now.
- I can set MC as the default application for audio and video on Debian and Linux Mint.
- However, on Mint MC sets itself as the default application for text files. I'm not sure what's causing this one as I don't see any text files listed in the MIME list, nor does it appear as a choice for text files on Debian and Ubuntu.
- I don't see MC listed as a default application option for music and video in my Ubuntu VM, even after running sudo update-desktop-database and rebooting. Hmmm, maybe I have a broken install, not sure. However it is working in my main Ubuntu install.
- After installing the .deb on Ubuntu Synaptic shows lame as auto removable. Is it not needed anymore? Anyways, I removed it and reinstalled it to get rid of the warning in Synaptic.

EDIT: Fixed the Ubuntu VM install, had to uninstall MC and reinstall it. Works good there now and it shows up as a default application choice.
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 StartupNotify = true to .desktop file?
« Reply #14 on: January 22, 2016, 07:15:42 pm »

All working well on this end to - Ubuntu 15.10 64bit. Icons look great. Thanks Bob.

Now just for "Open in existing instance if one exists"

:-D

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #15 on: January 22, 2016, 07:17:01 pm »

Now just for "Open in existing instance if one exists"

:-D

Yes, this! And getting commands like /play and /pause working so we can add desktop actions (which will work in Debian too!). :D I'll be posting a new topic on this tonight or tomorrow.
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 StartupNotify = true to .desktop file?
« Reply #16 on: January 25, 2016, 11:11:20 am »

Okay, some testing results thus far;

- The icon on the running instance in Linux Mint works now.
- I can set MC as the default application for audio and video on Debian and Linux Mint.
- However, on Mint MC sets itself as the default application for text files. I'm not sure what's causing this one as I don't see any text files listed in the MIME list, nor does it appear as a choice for text files on Debian and Ubuntu.
- I don't see MC listed as a default application option for music and video in my Ubuntu VM, even after running sudo update-desktop-database and rebooting. Hmmm, maybe I have a broken install, not sure. However it is working in my main Ubuntu install.
- After installing the .deb on Ubuntu Synaptic shows lame as auto removable. Is it not needed anymore? Anyways, I removed it and reinstalled it to get rid of the warning in Synaptic.

EDIT: Fixed the Ubuntu VM install, had to uninstall MC and reinstall it. Works good there now and it shows up as a default application choice.
I used your mimelist directly (the first one and I added the .mjr).
Lame is downloaded as needed so it doesn't need to be supplied by the OS.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7367
  • The color of Spring...
Re: Add StartupNotify = true to .desktop file?
« Reply #17 on: January 25, 2016, 11:25:27 am »

In the case of the mimelist setting MC as a default for text files, it looks like it's a Mint bug.
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
Pages: [1]   Go Up