StartupWMClass desktop file entry bug (two icons/launcher in the dock) Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-01-26, 11:56

Ubuntu 20.04, Pale Moon installed with the OpenSUSE PPA/Repository (https://software.opensuse.org/download. ... e=palemoon)

When I open Palemoon, I get two icons in the Ubuntu dock. The first Pale Moon icon is the desktop file pinned to my dock (as Favourite), the second one with the dot is the Pale Moon window that was launched + an indicator for the amount of windows associated with that application. I have nearly abandoned Palemoon because of this as it is inconventient.

@OPNA2608 proposed a solution (Incorrect capitalisation of StartupWMClass desktop file entry, https://forum.palemoon.org/viewtopic.php?t=26746) and it works not only on Pantheon DE but also on "native" Ubuntu:
The installed palemoon.desktop contains:

Code: Select all

StartupWMClass="pale moon"
It works with (capitalised and without quotation marks)

Code: Select all

StartupWMClass=Pale moon
I did following in a terminal:

Code: Select all

sudo gedit /usr/share/applications/palemoon.desktop
Changed to this (including deleting “”):

Code: Select all

StartupWMClass=Pale moon
And it works as expected with only one icon/launcher in the dock when Pale Moon is launched.

Could this be changed in the repositories? This would be benefit many users.
Thanks.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 32025
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by Moonchild » 2022-01-26, 14:22

This was brought up a few times before but nobody told me definitively what works in which distro.
"You will observe with concern how long a useful truth may be known and exist before it is generally received and practiced on." -- Benjamin Franklin
"Compromise and collaboration lie at the heart of all great endeavours" -- Kassandra
Image

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-01-26, 14:46

Thank you, @Moonchild, for this quick feedback!
Does your answer mean that it could be changed for the Ubuntu repo?

Hopefully others using a different distro will give a feedback as well.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 32025
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by Moonchild » 2022-01-26, 15:17

Well the thing is, we only supply mainline binaries. While we can adjust what is supplied there to work with most common distros and window managers/DEs, it's impossible to make it work with all of them (and we don't have the manpower to become package maintainers for all the different distros out there; not even a handful). Steve Pusser may be able to make some concessions but I personally wouldn't know. My area of expertise is the various flavours of Windows, not GNU or Linux.
"You will observe with concern how long a useful truth may be known and exist before it is generally received and practiced on." -- Benjamin Franklin
"Compromise and collaboration lie at the heart of all great endeavours" -- Kassandra
Image

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-01-26, 15:31

Thank you for the explanation!
As I am just a user, I am not sure whether there is a desktop-file in the binaries and the StartupWMClass-line can be changed accordingly there.
StartupWMClass=Pale moon sounds like a clean and appropriate line for all distributions.
If not and if @stevepusser could change it for the Ubuntu repo, this would be be great! What is the best way to ask him or alert him about this thread?
Thank you all for all your work!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 32025
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by Moonchild » 2022-01-26, 16:12

Like I said; I never really got information about what works where. What you did may work on Ubuntu with your desktop environment, but might not on others.
"You will observe with concern how long a useful truth may be known and exist before it is generally received and practiced on." -- Benjamin Franklin
"Compromise and collaboration lie at the heart of all great endeavours" -- Kassandra
Image

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-01-27, 09:32

I have searched the forum again. As I now know the "StartupWMClass" is the problem, I searched for it. I found several similar threads. The first one about two years ago.
Here is the most comprehensive one from EMH_Mark_I:
In regards to desktop launchers and the startup notification protocol - Pale Moon forum — viewtopic.php?f=3&t=25497&p=202378&hili ... ss#p202378
He tested StartupWMClass=Pale moon without issue in MATE, KDE, XFCE, Cinnamon, and GNOME. That is quite an impressive list of Linux desktop environment.
There are some newer ones with the same conclusion: I did not have this problem till 2020 having used Pale Moon for some years and I wonder what was the change then? Could it be that StartupWMClass="pale moon" was added to the desktop-file? And somebody mistyped it (pale instead of Pale) and did not know that quotation marks are not needed?

As I have found several threads about this and EMH_Mark_I took a lot of time to explain it well, I assume this is really a problem.
There were no threads about this before 2020 and therefore I assume that no other distro had a problem with this before that, too, which would have warranted a change of the StartupWMClass-line. A capital letter for Pale moon is the right spelling & the one assigned by the program itself and therefore I assume it would be safe to change the one line in the desktop-file to

Code: Select all

StartupWMClass=Pale moon
Not sure if this can only be done for the Linux version and if not, I assume this would not affect the non-Linux versions as they don't rely on the desktop-file.

Thanks again for your kind consideration. This could benefit a lot of people, especially the not advanced users.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 32025
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by Moonchild » 2022-01-27, 09:43

Thanks. That does seem like a sane change even if the WMClass name itself makes no sense why it drops one capital and keeps another and why by exception a space isn't escaped and quotes can't be used. :crazy:
"You will observe with concern how long a useful truth may be known and exist before it is generally received and practiced on." -- Benjamin Franklin
"Compromise and collaboration lie at the heart of all great endeavours" -- Kassandra
Image

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-01-27, 09:57

:D I am not a programmer. But all people who had this problem solved it with this "insane" change. I can not look at the code but maybe at some other place in the code Pale moon was used ...
Maybe there is a search function for the code and it can search for "Pale moon". This might reveal some other mistyping which could be corrected. I would also prefer Pale Moon but it seems Pale moon is the winner for this problem although I don't know why (I have not developed Pale Moon ;) ).
As written before if you ask for the opened window name of Pale Moon with xprop WM_CLASS you get Pale moon and I don't think this naming was invented by all the DEs mentioned in the other post, I assume this is comes from the Pale Moon app itself ...

As an avid user I just want to help to make Pale Moon better and more user-friendly ...

patrick-g
Moongazer
Moongazer
Posts: 9
Joined: 2020-12-23, 10:49

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by patrick-g » 2022-01-27, 11:19

Hi,
Just for information, when I create a new launcher (right-click + Create a new ... App launcher) for Pale Moon in KDE Plasma, it fills this line this way :

Code: Select all

StartupWMClass=Navigator;Pale moon;
and everything seems to work correctly.
In fact Plasma generate a full .desktop file with lot of pertinent information.

Code: Select all

[Desktop Entry]
Categories=GTK;Network;WebBrowser;X-MandrivaLinux-Internet-WebBrowsers;X-MandrivaLinux-CrossDesktop;
Comment[fr_FR]=Navigue sur Internet
Comment=Navigue sur Internet
Comment[af]=Blaai die Web
Comment[am]=ዌብን ይቃኙ
Comment[ar]=تصفّح الوِب
Comment[az]=Vebdə gəz
Comment[bg]=Сърфиране из интернет
Comment[bn]=ওয়েব ব্রাউজ করুন
Comment[bs]=Pretražujte web
Comment[ca]=Navega pel web
Comment[cs]=Prohlížení stránek World Wide Webu
Comment[cy]=Pori'r We
Comment[da]=Surf på internettet
Comment[de]=Im Internet surfen
Comment[el]=Περιηγηθείτε στο Διαδίκτυο
Comment[eo]=Foliumi la TTT-on
Comment[es]=Navegue por la web
Comment[et]=Veebi sirvimine
Comment[eu]=Web-a arakatu
Comment[fa]=مرور بر وب
Comment[fi]=Selaa Internetin WWW-sivuja
Comment[fur]=Navighe tal Web
Comment[hi]=वेब पर ब्राउज करें
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[hy]=Զբոսնել Ցանցում
Comment[is]=Flakka á vefnum
Comment[it]=Esplora il web
Comment[ja]=ウェブを閲覧します
Comment[ka]=ინტერნეტში გასეირნება
Comment[ko]=웹을 돌아 다닙니다
Comment[ku]=Geryana Înternet
Comment[ky]=Вебди аралоо
Comment[lv]=Pārlūkojiet Web
Comment[mt]=Ibbrawżja l-web
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegar na Web
Comment[ro]=Navigați pe Web
Comment[ru]=Веб-навигация
Comment[sc]=Sfollya s'arretza
Comment[sk]=Prezerať Web
Comment[sl]=Brskanje po spletu
Comment[sq]=Shfletues Web
Comment[sr@Latn]=Pretražite Internet
Comment[sv]=Surfa på webben
Comment[ta]=வலையத்ைத மேலோட
Comment[tg]=Шабакаро баррасӣ кунед
Comment[th]=Browse the Web
Comment[tl]=I-browse ang Web
Comment[tr]=Web' de gezin
Comment[uk]=Переглядайте Тенета
Comment[vi]=Duyệt web
Comment[wa]=Naivyî so les pådjes waibe
Comment[zh_CN]=浏览 Web
Comment[zh_TW]=瀏覽網頁
Exec=/home/xxxx/bin/Palemoon/PM_29.2/palemoon/palemoon %u
GenericName[fr_FR]=Navigateur Web
GenericName=Navigateur Web
GenericName[af]=Web Blaaier
GenericName[ar]=متصفّح وِب
GenericName[as]=ৱেব চৰক
GenericName[az]=Veb Səyyahı
GenericName[be]=Гартач сеціва
GenericName[bg]=Уеб браузър
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[br]=Furcher ar Gwiad
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetbrowser
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής ιστοσελίδων
GenericName[eo]=TTT-legilo
GenericName[es]=Navegador web
GenericName[et]=Veebisirvija
GenericName[eu]=Web arakatzailea
GenericName[fa]=مرورگر وب
GenericName[fi]=WWW-selain
GenericName[fo]=Vevlesari
GenericName[ga]=Brabhsálaí Lín
GenericName[gl]=Navegador web
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hr]=Web pretraživač
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[is]=Vafri
GenericName[it]=Browser web
GenericName[ja]=GNOME ウェブ・ブラウザ
GenericName[ka]=ვებ ბრაუზერი
GenericName[kn]=ಜಾಾಲ ವೀಕ್ಷಕ
GenericName[ko]=웹 브라우저
GenericName[ku]=Geroka Torê
GenericName[ky]=Web Браузер
GenericName[li]=Wèb Browser
GenericName[lo]=ຮງກເບິ່ງຖານເບິ່ງຂໍ້ມູນ
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Tīmekļa pārlūkprogramma
GenericName[mk]=Веб прелистувач
GenericName[ml]=വെബ് ബ്രൌസര്‍
GenericName[mn]=Вэб-Хөтөч
GenericName[mr]=वेब ब्राउझर
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nds]=Nettkieker
GenericName[ne]=वेब ब्राउजर
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[oc]=Navegaire web
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
GenericName[pa]=ਵੈੱਬ ਬਰਾਊਜ਼ਰ
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[se]=Fierpmádatlogan
GenericName[sk]=Webový prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr@Latn]=Internet preglednik
GenericName[sr]=Интернет прегледник
GenericName[ss]=Ibrawuza ye-Web
GenericName[sv]=Webbläsare
GenericName[ta]=இணைய உலாவி
GenericName[tg]=Тафсири веб
GenericName[th]=เว็บเบราว์เซอร์
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач веб-сторінок
GenericName[ur]=ویب براؤزر
GenericName[uz@cyrillic]=Веб-браузер
GenericName[uz]=Veb-brauzer
GenericName[vi]=Bộ duyệt Web
GenericName[wa]=Betchteu waibe
GenericName[xh]=Umkhangeli zincwadi we Web
GenericName[zh_CN]=Web 浏览器
GenericName[zh_TW]=網頁瀏覽器
Icon=/home/xxxx/bin/Palemoon/PM_29.2/palemoon/browser/chrome/icons/default/default48.png
MimeType=video/webm;text/html;image/png;image/jpeg;image/gif;application/xml;application/xml;application/xhtml+xml;application/x-xpinstall;application/rss+xml;application/rdf+xml;
Name[fr_FR]=Palemoon 29.2 Standard
Name=Palemoon 29.2 Standard
Path=/home/xxxx/bin/Palemoon/PM_29.2/palemoon/
StartupNotify=true
StartupWMClass=Navigator;Pale moon;
Terminal=false
TerminalOptions=
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Except the French name and the path I give myself, I don't know where all these info come from. I use the vanilla tarball from http://linux.palemoon.org/download/mainline/ which doesn't seem to contain a .desktop file and my distro doesn't package Pale Moon.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by coffeebreak » 2022-01-27, 15:55

paluntu wrote:
2022-01-26, 15:31
@stevepusser ... What is the best way to ask him or alert him about this thread?
You might try the thread in the Browser Support board where he announces his releases.

Lucio Chiappetti
Lunatic
Lunatic
Posts: 480
Joined: 2014-09-01, 15:11
Location: Milan Italy

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by Lucio Chiappetti » 2022-01-27, 16:37

I use Pale Moon installed under personal home from the tar ball on Pale Moon site at work (under OpenSuse) and at home (under Ubuntu) with no problem, but in both case I have no desktop environment but a good old plain window manager (fvwm). Pale Moon starts at login from .fvwmrc, or, if needed, from the command line.

Looks like the problem is with the desktop environment the OP is using, not with the browser. Should perhaps post to an Ubuntu forum ?
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-02-03, 16:50

Thank you all for your comments!

@patrick-g
Just for information, when I create a new launcher (right-click + Create a new ... App launcher) for Pale Moon in KDE Plasma, it fills this line this way :

Code: Select all

StartupWMClass=Navigator;Pale moon;
This hints again that the naming "Pale moon" is coming from the code (as you used vanilla tarball from http://linux.palemoon.org/download/mainline/) and Pale Moon is the used name for the Pale Moon window. And a change in the "delivered" desktop-file to Pale Moon would follow this.

@Lucio
Looks like the problem is with the desktop environment the OP is using, not with the browser. Should perhaps post to an Ubuntu forum ?
I also think it depends on the desktop environment, but also where you get Pale Moon from.

@coffeebreak
You might try the thread in the Browser Support board where he announces his releases.
I will do so!

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-03-05, 20:53

Moonchild wrote:
2022-03-05, 19:42
And yet you couldn't be bothered to read a few posts further where I thanked and said it was a sane change even if the result didn't make sense to me.
It's been adjusted in the tree.
Sorry, Moonchild, for misreading your post. I read it and even responded to it. I interpret it as you missed a "not" and the change would not be sane. Maybe because I am not a native English speaker. And that is why I missed you would make a change. Thanks a lot for making the change! This solves (hopefully) this problem!
Thanks again for all your work!

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-03-28, 11:35

I have upgraded to the newest version Palemoon 29.4.5 (Ubuntu) but palemoon.desktop still contains StartupWMClass="pale moon" and not the proposed StartupWMClass=Pale moon (Capital P and no hyphens).
A shy question: Will it be included in the next version?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 32025
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by Moonchild » 2022-03-28, 11:48

This was part of the fixes for the new milestone. A security update won't have it.
it will be coming, just not in a security point release.
"You will observe with concern how long a useful truth may be known and exist before it is generally received and practiced on." -- Benjamin Franklin
"Compromise and collaboration lie at the heart of all great endeavours" -- Kassandra
Image

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock)

Unread post by paluntu » 2022-03-28, 12:03

Thanks a lot for the quick and helpful answer! I am looking forward to the next milestone release.

User avatar
paluntu
Moongazer
Moongazer
Posts: 13
Joined: 2022-01-24, 20:41

Re: StartupWMClass desktop file entry bug (two icons/launcher in the dock) solved

Unread post by paluntu » 2022-05-17, 13:20

Thank you Moonchild & other developers for the latest versions!
I am really happy that the change works and this bug has been solved, at least in my setting (hopefully also with others)!

Post Reply