10

Ubuntu 17.10 (xorg), GNOME 3.26.2, Firefox 58.0 (64 bit).

I have a few Firefox profiles setup. When I run each profile, I would like it to be a separate icon on the dock. How do I make that happen? Right now what happens is that they are all grouped in the standard Firefox icon.

9
+100

Edit profile's .desktop file:

The string SomeClass must be the same in both changes.

Example .desktop file:

[Desktop Entry]
Name=Firefox Test
Exec=firefox -p test -no-remote --class FxTest
Terminal=false
Type=Application
StartupNotify=true
Icon=/path/to/custom/icon.png
StartupWMClass=FxTest
|improve this answer|||||
  • grisfer, this answer appears to work for the question I asked, so thank you. However..... While I do now have distinct icons on the dock, they are all the official Firefox icon, and not the icon I specified in the desktop file. (I realize that is not part of my original question.) – dln949 Jul 13 '18 at 0:45
  • 1
    Did you add both changes (--class SomeClass and StartupWMClass=SomeClass)? If only the first, then the icons will be distinct, but with the standard image. Also, the string SomeClass must be the same in both changes. If the strings are different then icons will be with the standard image. – grisfer Jul 13 '18 at 11:25
  • 1
    Unfortunately, I don't know. It works for me (I have a custom icon). – grisfer Jul 13 '18 at 21:16
  • 1
    This bug suggests that gnome is not honoring the --class option – JellicleCat Nov 30 '18 at 20:31
  • 1
    This works for me on KDE Plasma 5. – MountainX Dec 3 '18 at 3:41
0

Copy the firefox icon file.

cp /usr/share/applications/firefox.desktop \
   /usr/share/applications/firefox-dev.desktop

In the new file edit 4 lines, using the full path for the executable and icon. The icon shown below is a blue colored version of the firefox icon.

[Desktop Entry]
...
Exec=/opt/firefox-dev/firefox
Icon=/opt/firefox-dev/browser/chrome/icons/default/default128.png
...
[Desktop Action new-window]
...
Exec=/opt/firefox-dev/firefox -new-window
...
[Desktop Action new-private-window]
...
Exec=/opt/firefox-dev/firefox -private-window

Then follow the instructions here to put the new icon file in the gnome registry.

sudo apt install dconf-editor
dconf-editor

Navigate to org.gnome.shell favorite-apps and add in your new icon

[ ..., 'firefox.desktop', 'firefox-dev.desktop', ... ]

It may necessary to log out and log back in before using the icon.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.