Bug 1255570 - Current selected program not displaying properly in top bar
Current selected program not displaying properly in top bar
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gnome-shell (Show other bugs)
7.1
All Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Florian Müllner
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-20 21:03 EDT by jonathan.ringeis
Modified: 2017-08-02 02:57 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot of the issue - notice our software's name and the name displayed in the top bar. (203.29 KB, image/jpeg)
2015-08-20 21:03 EDT, jonathan.ringeis
no flags Details

  None (edit)
Description jonathan.ringeis 2015-08-20 21:03:41 EDT
Created attachment 1065422 [details]
Screenshot of the issue - notice our software's name and the name displayed in the top bar.

Description of problem:
The currently selected program should display in the top bar with the proper icon and name of said item.  When/after launching our management software the proper icon is displayed but the name of our software does not display correctly.


Version-Release number of selected component (if applicable): RHEL 7.1 GA


Actual results: 


Expected results:


Additional info:
Comment 2 Matthias Clasen 2015-08-21 10:41:48 EDT
Can you attach the desktop file for this application, please ? That would help us identify where the information comes from.
Comment 3 jonathan.ringeis 2015-08-21 14:17:11 EDT
You can download the enterprise version of our software here (http://www.emulex.com/downloads/emulex/drivers/linux/rhel-7-centos-7/management-and-utilities/). But I guess my issue is trying to understand how the top bar obtains the information.
Comment 4 Florian Müllner 2015-09-04 10:29:00 EDT
(In reply to jonathan.ringeis from comment #3)
> You can download the enterprise version of our software here.
> But I guess my issue is trying to understand how
> the top bar obtains the information.

When everything works as expected: the localized "Name" field of the application's .desktop file.

I didn't find a .desktop file in any of the contained RPMs, which means we do not consider it an application[0] - there is a fallback in place which allows it to work in some places (like the fallback "application" name here, though it usually doesn't match the expected one), but programs like this will always be broken in some ways (for instance multiple main windows will not be grouped correctly, user's cannot pin the app to the dash etc.).

RHEL 7.2 will change the fallback "application" name to use the window title, which may be what you want - however if you want your software to not rely on a particular fallback behavior and properly integrate with the system, you should consider installing a .desktop file.

[0] https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
Comment 6 jonathan.ringeis 2015-09-04 18:51:28 EDT
I added an application file like you suggested.  This didn't work for me.  I was still seeing the wrong name on the 'top bar".  

Regardless of whether I can get the .desktop file to work, this solution will not work for us.  We can't have our users clicking on an icon or selecting it from a menu.  Many of our customers run our application through scripts.  Is there another way to affect the top bar's currently selected tab?  Perhaps a config file?
Comment 7 Florian Müllner 2015-09-18 08:26:48 EDT
(In reply to jonathan.ringeis from comment #6)
> I added an application file like you suggested.  This didn't work for me.  I
> was still seeing the wrong name on the 'top bar".

Does the filename of the .desktop file match the windows' WM_CLASS? If the WM_CLASS is for instance "foo", "Foo-app", then any of the following .desktop filenames should produce a match:
"foo.desktop"
"Foo-app.desktop"
"foo-app.desktop"

It is also possible to set the StartupWMClass field in the .desktop file instead, however this has a drawback:

> We can't have our users clicking on an icon or selecting it from a menu.  
> Many of our customers run our application through scripts.

This is only an issue for the StartupWMClass method. The normal WM_CLASS -> .desktop file mapping works regardless of how the application was started.


>  Is there another way to affect the top bar's currently selected
> tab?  Perhaps a config file?

No. You can consider the .desktop file an application-specific config file of course, but if that doesn't exist, there's only a global fallback - the window's WM_CLASS (upstream and prior RHEL-7.2) or the window's title (RHEL-7.2).

Note You need to log in before you can comment on or make changes to this bug.