Open philg-dev opened 1 month ago
@philg-dev I face the exact problem although I don't use Master password.
I added StartupWMClass=Mail
to my thunderbird.desktop but it didn't help:
cat /usr/local/share/applications/thunderbird.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Thunderbird Mail
Comment=Send and receive mail with Thunderbird
GenericName=Mail Client
Keywords=Email;E-mail;Newsgroup;Feed;RSS;Calendar;Contact
Exec=/mnt/Data/opt/bin/thunderbird %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/mnt/Data/opt/Setup/Thunderbird/thunderbird-128/thunderbird/chrome/icons/default/default128.png
Categories=Application;Network;Email;
MimeType=x-scheme-handler/mailto;application/x-xpinstall;
StartupNotify=true
Actions=Compose;Contacts;Calendar;ProfileManager
StartupWMClass=Mail
[Desktop Action Compose]
Name=Compose New Message
Exec=/mnt/Data/opt/bin/thunderbird -compose
[Desktop Action Contacts]
Name=Contacts
Exec=/mnt/Data/opt/bin/thunderbird -addressbook
[Desktop Action Calendar]
Name=Calendar
Exec=/mnt/Data/opt/bin/thunderbird -calendar
[Desktop Action ProfileManager]
Name=Profile Manager
Exec=/mnt/Data/opt/bin/thunderbird --ProfileManager
@lamyergeier can you check the WM_CLASS
of your main Thunderbird window with the xprop
command?
You can just run xprop
with no arguments in the terminal and then click on the Thunderbird window in order to "target" it for the xprop
command. For your convenience you can also filter the output directly:
xprop | grep "WM_CLASS"
My Output (after clicking the Thunderbird window):
WM_CLASS(STRING) = "Mail", "thunderbird-esr"
Pop!_OS 22.04 LTS GNOME version 42.9 Window System: X11 Thunderbird 128.1.0esr (64-bit)
I use wayland, may be thats why xprop shows no output.
Fedora 40 Gnome 46 Wayland Thunderbird 128.1.0esr (64-bit)
I'm not extremely well versed in the Linux world yet. But you might try alternatives to xprop that work with Wayland. I've found these potential alternatives in a Reddit post:
- Hyprprop
- Hyprctl
- Wlprop
- Sway-prop
From what I can tell, the closest fit should probably be Wlprop
... You'll have to look into it yourself though.
It is thunderbird-esr
So you might wanna try to add StartupWMClass=thunderbird-esr
to your Thunderbird.desktop
instead of using Mail
. Did you already try that?
@philg-dev Thank you. This worked for me!
StartupWMClass=thunderbird-esr
Also as a heads up, you might want to remove your e-mail-address from your post. If you didn't notice, it's visible in your screenshot
Awesome! I've just tested StartupWMClass=thunderbird-esr
on my X11 setup as well and it also works for me.
That way we found a solution that works for both Wayland and X11 in the same way!
Great teamwork :-) I'll file a pull request for it shortly.
I've installed Thunderbird with the instructions on the mozilla KB.
The
Thunderbird.desktop
from this repository, which is part of the instructions, has a small, but annoying issue with the GNOME Dock: When you add Thunderbird to your favorite applications it gets pinned to the Dock. That's especially useful, when you want to use simple shortcuts to switch between your favorite apps in a consistent manner (e.g.<Super> + 1~9
to access the applications in the Dock).However with the given
Thunderbird.desktop
file, when I open Thunderbird and I confirm my master password prompt, the Thunderbird main window will open with a separate icon in the Dock (window title "thunderbird-esr"), whereas the pinned desktop icon is properly titled "Thunderbird Mail".The problem is, that I switch focus to my open Thunderbird with
<Super> + 2
anymore in that case because the pinned desktop icon appears "inactive", since the main window is in a different spot instead. So that breaks my usual workflow a lot.Solution
I was digging deeper on the problem and I could solve the issue by adding the following property to the
Thunderbird.desktop
file:(Edited after the discussion below. Before the discussion my solution was
StartupWMClass=Mail
, but it turned out that only works on X11, but not on Wayland.)Resources / Approach
To get to this solution, I inspected the X-Window properties of both the master password prompt and the Thunderbird main window with the
xprop
command.The Thunderbird master password prompt always has:
WM_CLASS = "Thunderbird", "thunderbird-esr"
The Thunderbird main window always has:
WM_CLASS = "Mail", "thunderbird-esr"
Maybe somebody who is more knowledgeable on this topic could enlighten us why and how my solution works. I only know that it works for me and I have a general suspicion on how it works.
I came across a similar issue that has been fixed for VS Code to get to this solution.
Assumption on how it the problem and solution works
Thunderbird.desktop
iconWM_CLASS=Thunderbird
get's associated with the desktop icon, since there's no explicitWM_CLASS
specified in theThunderbird.desktop
fileWM_CLASS=Mail
WM_CLASS=Thunderbird
, the main window gets a separate icon in the dock because theWM_CLASS=Mail
doesn't match with the one associated with the pinned icon.WM_CLASS=Thunderbird
doesn't match the now explicitly definedStartupWMClass=Mail
from the fixedThunderbird.desktop
fileIf anybody can confirm my theory or suggest a more solid solution, we could make a pull request in order to get the fix out to everybody.