INTERACT FORUM

Please login or register.

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

Author Topic: Startup, Media Center Class and Unity  (Read 12656 times)

mcollier

  • World Citizen
  • ***
  • Posts: 100
Startup, Media Center Class and Unity
« on: January 13, 2015, 10:03:56 am »

Ubuntu 14.10.1 64bit, Unity Desktop

Just installed this OS a few days ago and wanted to give my report.

First, the installation went perfectly, just as on Wheezy/Jessie

When alt-tabbing between applications, Media Center had a ? mark icon.  I researched this a bit and found that renaming mediacenter20.desktop to media-center-20.desktop resolved this issue.  Evidently, there is some relationship between the output of "xprop WM_CLASS" and the name of the desktop file.

In a related issue, when an application is running, the launcher provides some mechanism to stack the icons on the bar instead of creating a second one.  I thought this might be resolved with the renaming of the desktop file, but it was not.  This issue has been mentioned before.

EDIT:
I was able to resolve this issue by adding "StartupWMClass=Media Center 20" to the desktop file.

On two occasions I have encountered the following situation.  Immediately after launching MediaCenter I click on "Artist" or "Playlist" or what have you in the side bar.  And the gadget immediately below the one I'm clicking on responds instead of the one I'm clicking on.  This seems to resolve itself somehow after maybe clicking elsewhere in the window.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13882
Re: Startup, Media Center Class and Unity
« Reply #1 on: January 13, 2015, 02:25:42 pm »

Ubuntu 14.10.1 64bit, Unity Desktop

Just installed this OS a few days ago and wanted to give my report.

First, the installation went perfectly, just as on Wheezy/Jessie

When alt-tabbing between applications, Media Center had a ? mark icon.  I researched this a bit and found that renaming mediacenter20.desktop to media-center-20.desktop resolved this issue.  Evidently, there is some relationship between the output of "xprop WM_CLASS" and the name of the desktop file.

In a related issue, when an application is running, the launcher provides some mechanism to stack the icons on the bar instead of creating a second one.  I thought this might be resolved with the renaming of the desktop file, but it was not.  This issue has been mentioned before.

EDIT:
I was able to resolve this issue by adding "StartupWMClass=Media Center 20" to the desktop file.

On two occasions I have encountered the following situation.  Immediately after launching MediaCenter I click on "Artist" or "Playlist" or what have you in the side bar.  And the gadget immediately below the one I'm clicking on responds instead of the one I'm clicking on.  This seems to resolve itself somehow after maybe clicking elsewhere in the window.
Media Center 20 is the class name. I don't particularly see why the desktop file should have the same name but with - in place of space.
The StartupWMClass makes sense to me and I have added that to the desktop file. Thanks.
Logged

mcollier

  • World Citizen
  • ***
  • Posts: 100
Re: Startup, Media Center Class and Unity
« Reply #2 on: January 13, 2015, 02:41:53 pm »

Media Center 20 is the class name. I don't particularly see why the desktop file should have the same name but with - in place of space.
The StartupWMClass makes sense to me and I have added that to the desktop file. Thanks.

Here's what I can find by way of recommendations for the naming of the desktop file.  https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13882
Re: Startup, Media Center Class and Unity
« Reply #3 on: January 13, 2015, 05:08:41 pm »

Here's what I can find by way of recommendations for the naming of the desktop file.  https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
Going by that doc it looks like the desktop file should be

media center 20.desktop
Logged

mcollier

  • World Citizen
  • ***
  • Posts: 100
Re: Startup, Media Center Class and Unity
« Reply #4 on: January 13, 2015, 06:00:43 pm »

Going by that doc it looks like the desktop file should be

media center 20.desktop


I just tried renaming to "media center 20.desktop" and although the laucher still worked, it went back to creating a second icon on the favourites/launcher bar when MediaCenter is running.  Also, you'll notice that none of the other *.desktop files in /usr/share/applications/ have spaces in them.  So, replaced the spaces with hyphens again, and I'm back where I want to be.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7824
  • Autumn shade...
Re: Startup, Media Center Class and Unity
« Reply #5 on: January 13, 2015, 06:42:29 pm »

I just tried renaming to "media center 20.desktop" and although the laucher still worked, it went back to creating a second icon on the favourites/launcher bar when MediaCenter is running.  Also, you'll notice that none of the other *.desktop files in /usr/share/applications/ have spaces in them.  So, replaced the spaces with hyphens again, and I'm back where I want to be.

Ah, so this is probably why in Ubuntu/Unity starting MC from the Unity dash causes a second instance to open and not open from the existing icon.

EDIT: Confirmed. Applying the StartupWMClass fix and renaming from mediacenter20.desktop to media-center-20.desktop fixes the second icon issue on Ubuntu/Unity. It's working as it should be now from the launcher! This should fix any GNOME-based icon issues.

Bob, are there mediacenter20 terminal commands for Play/Pause, Stop, Next, Previous? If so it should easily be possible to add shortcuts to the .desktop file for Ubuntu/Unity users! I might even be able to even get MC added to the sound menu like other media players like VLC, allowing the control of playback and volume.

EDIT 2: Okay, I've been successful at adding MC to the sound menu in Ubuntu, however it doesn't work. My guess is MC doesn't use the MPRIS2 spec which is required to remote control media players that way.
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: 13882
Re: Startup, Media Center Class and Unity
« Reply #6 on: March 17, 2016, 06:33:38 pm »

I'm changing the window class in the next build to replace the spaces with underscores.
Now I'd like to figure out what else needs to be done to to the .desktop file, etc to fix the Desktop's mishandling of spaces...
Suggestions?
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13882
Re: Startup, Media Center Class and Unity
« Reply #7 on: March 17, 2016, 07:10:55 pm »

Fixed in the next build I believe...
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7824
  • Autumn shade...
Re: Startup, Media Center Class and Unity
« Reply #8 on: March 17, 2016, 08:34:42 pm »

Can't wait to test!
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
Pages: [1]   Go Up