Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 616196

Summary: www-client/firefox-bin - add StartupWMClass to enhance compatibility with docks
Product: Gentoo Linux Reporter: Luca Santarelli <luca.santarelli>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/12713
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for www-client/firefox
Patch for www-client/firefox-bin
patch seamonkey,thunderbird,firefox
patch seamonkey,thunderbird,firefox
Added my own signed-off-by

Description Luca Santarelli 2017-04-21 11:50:05 UTC
I am not an expert on this, so please bear with me.

ISSUE:
I installed Plank from the Sabayon overlay in my Xfce4 desktop and I noticed that firefox(-bin, as this is an underpowered machine) will not show the "keep on dock" option.

RESOLUTION:
Google led me to this post [1] where the and the fix is to add "StartupWMClass=Firefox" to the firefox-bin.desktop file.
Indeed, as soon as the file was edited, Plank detected the change and now treats firefox(-bin) as every other app I have.

RESEARCH:
The firefox-bin.desktop file doesn't come from upstrea, as it resides in /usr/portage/www-client/firefox-bin/files/ so it's internal to Gentoo.

'grep'-ing for StartupWMClass in my /usr/share/applications folder I see that only LibreOffice(-bin) has it in its .desktop files, and indeed they (already) work as intended.

Further Google-ing on the StartupWMClass usage led me to this [2] AskUbuntu answer which points to this [3] FreeDesktop specification.

These three factors make me think that the request is sound and safe.

[1] https://answers.launchpad.net/plank/+question/263909
[2] https://askubuntu.com/questions/367396/what-represent-the-startupwmclass-field-of-a-desktop-file
[3] https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
Comment 1 Jory A. Pratt gentoo-dev 2019-03-31 20:06:25 UTC
Please feel free to reopen and update any bug report that can be duplicated with current esr builds, 60.x. If you feel your feature needs to be re looked at in any of these bugs reopen and update, please attach patches when appropriate. Thank you Mozilla Team
Comment 2 Luca Santarelli 2019-04-02 13:12:46 UTC
Created attachment 571570 [details, diff]
Patch for www-client/firefox
Comment 3 Luca Santarelli 2019-04-02 13:13:20 UTC
Created attachment 571572 [details, diff]
Patch for www-client/firefox-bin
Comment 4 Luca Santarelli 2019-04-02 13:14:17 UTC
Please, reopen and apply provided patches to our tree.
Issue is still present with ESR as it's not a Mozilla/Upstream bug, but a Gentoo one, as throughly explained in the first comment.
Comment 5 Jory A. Pratt gentoo-dev 2019-04-02 14:09:45 UTC
Please create a git patch with log message and a sign-off line and I will push to the tree for you. The patch should fix thunderbird* and seamonkey* as well.
Comment 6 Jory A. Pratt gentoo-dev 2019-04-02 16:35:46 UTC
Created attachment 571586 [details, diff]
patch seamonkey,thunderbird,firefox

If you are happy with the change add you a signed-off line and re-add the patch to bug. I will commit it once you have.
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-02 16:41:53 UTC
Created attachment 571588 [details, diff]
patch seamonkey,thunderbird,firefox

Perhaps change the subject line to something not that long :)
Comment 8 Luca Santarelli 2019-04-03 09:39:38 UTC
(In reply to Jory A. Pratt from comment #6)
> Created attachment 571586 [details, diff] [details, diff]
> patch seamonkey,thunderbird,firefox
> 
> If you are happy with the change add you a signed-off line and re-add the
> patch to bug. I will commit it once you have.

Thank you very much. This is my first time doing it, I just added a text line to the commit, below your own signed-off-by line. Is this good enough?
Comment 9 Luca Santarelli 2019-04-03 09:40:03 UTC
Created attachment 571688 [details, diff]
Added my own signed-off-by
Comment 10 Larry the Git Cow gentoo-dev 2019-07-25 16:10:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ff64a8a88c45333f6a8a56479b90661ee62838e

commit 8ff64a8a88c45333f6a8a56479b90661ee62838e
Author:     Jory Pratt <anarchy@gentoo.org>
AuthorDate: 2019-04-02 16:30:46 +0000
Commit:     Jory Pratt <anarchy@gentoo.org>
CommitDate: 2019-07-25 16:10:00 +0000

    Provide better dock support bug #571572
    
    Closes: https://bugs.gentoo.org/616196
    
    Signed-off-by: Jory Pratt <anarchy@gentoo.org>
    Signed-off-by: Luca Santarelli <luca.santarelli@gmail.com>

 mail-client/thunderbird-bin/files/icon/thunderbird-bin.desktop   | 1 +
 mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop | 1 +
 mail-client/thunderbird/files/icon/thunderbird.desktop           | 1 +
 www-client/firefox-bin/files/firefox-bin.desktop                 | 1 +
 www-client/firefox/files/icon/firefox.desktop                    | 1 +
 www-client/seamonkey-bin/files/icon/seamonkey-bin.desktop        | 1 +
 www-client/seamonkey/files/seamonkey.desktop                     | 1 +
 7 files changed, 7 insertions(+)
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-15 11:39:44 UTC
This is causing a QA violation:

/usr/share/applications/firefox-bin.desktop: error: file contains multiple keys named "StartupNotify" in group "Desktop Entry"
Comment 13 Luca Santarelli 2019-09-06 09:47:41 UTC
(In reply to Thomas Deutschmann from comment #11)
> This is causing a QA violation:
> 
> /usr/share/applications/firefox-bin.desktop: error: file contains multiple
> keys named "StartupNotify" in group "Desktop Entry"

Excuse me but where in the firefox-bin.desktop file is the duplicate "StartupNotify" key?
Comment 14 Thomas Deutschmann (RETIRED) gentoo-dev 2019-09-06 13:48:08 UTC
See link in previous comment. We fixed the problem and removed the duplicated line.
Comment 15 Luca Santarelli 2019-09-06 15:01:56 UTC
(In reply to Thomas Deutschmann from comment #14)
> See link in previous comment. We fixed the problem and removed the
> duplicated line.

I didn't know about the startup-notification USE flag, now it all makes sense.

Thanks.