Red Hat Bugzilla – Bug 1255570
Current selected program not displaying properly in top bar
Last modified: 2017-08-02 02:57:21 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
Can you attach the desktop file for this application, please ? That would help us identify where the information comes from.
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.
(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 - 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.
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?
(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:
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).