13

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.

2 Answers 2

16
+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

Added in 2022
For Snapped Firefox you can try Parallel Installs:

  1. sudo snap set system experimental.parallel-instances=true
  2. reboot
  3. sudo snap install firefox_parallel --unaliased
  4. cp /var/lib/snapd/desktop/applications/firefox+parallel_firefox.desktop ~/.local/share/applications/
  5. gedit ~/.local/share/applications/firefox+parallel_firefox.desktop
7
  • 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, 2018 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, 2018 at 11:25
  • 1
    Unfortunately, I don't know. It works for me (I have a custom icon).
    – grisfer
    Jul 13, 2018 at 21:16
  • 1
    This bug suggests that gnome is not honoring the --class option
    – Jellicle
    Nov 30, 2018 at 20:31
  • 1
    This works for me on KDE Plasma 5.
    – MountainX
    Dec 3, 2018 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .