Score:2

How to have multiple Firefox profiles with separate dock icons on Ubuntu 22.10?

vn flag

Installed Ubuntu 22.10 and as I finish reconfiguring the system to my liking I'm finding that my Firefox desktop shortcuts are no longer grouping properly under their separate dock icons; example:

[Desktop Entry]
Version=1.0
Name=s3rvant-Firefox
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=firefox %u -P s3rvant --class s3rvantfox
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/s3rvant/Launchers/Firefox/s3rvantfox.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=new-window;new-private-window;
StartupWMClass=s3rvantfox

[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -new-window -P s3rvant --class s3rvantfox

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -private-window -P s3rvant --class s3rvantfox

I have 4 such profiles each with their own icon favorited to my dock however all profiles' windows group under the first profile's icon rather than under their own icons on the dock.

Checking with looking glass I see that each have the wmclass of "firefox" rather than the class I've specified so I assume it's related to that.

Any idea what is needed to ensure they group under their own class/icon?

Also note that this is not the snap package but rather from Mozilla PPA.

vanadium avatar
cn flag
Unfortunatelly yet another side effect of Wayland. There is an issue filed with firefox here: https://bugzilla.mozilla.org/show_bug.cgi?id=1577056 Reference is made to a command line option `--name`. Perhaps you could try that.
s3rvant avatar
vn flag
That worked; thank you
Score:2
vn flag

Adding --name to Exec as per vanadium's comment solved the issue per bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=1577056

Working Exec line:

Exec=firefox %u -P s3rvant --class s3rvantfox --name s3rvantfox

And also shortcut filename needs to match class/name argument:
s3rvantfox.desktop

Was also able to remove the StartupWMClass line

vanadium avatar
cn flag
Thanks to you for reporting back so concisely! You solved an issue for me where I wanted a PDF document to be launched in Evince with a distinct icon - yes, it also works for Evince!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.