16

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.

pomsky
  • 70,557
dln949
  • 1,345

3 Answers3

17

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

For Wayland, use --name SomeClass. Like --class, --name is defined by GTK and is not documented by Firefox.

grisfer
  • 535
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.

0

Worked on Ubuntu 22.04

The only way I managed to make 2 independently firefox shortcuts in the dock (one of them with different icon), where its windows are gathered with its corresponding icon, was to install a deb firefox along with the snap firefox.

##########################
#Disable snap firefox
sudo snap disable firefox
sudo apt remove --autoremove firefox -y

########################## #Install .deb firefox sudo add-apt-repository ppa:mozillateam/ppa -y sudo apt-get update -y sudo apt-get upgrade -y #Set firefox updates priority for the .deb repository sudo bash -c 'cat > /etc/apt/preferences.d/99mozillateamppa <<EOF Package: firefox* Pin: release o=LP-PPA-mozillateam Pin-Priority: 501

Package: firefox* Pin: release o=Ubuntu Pin-Priority: -1 EOF' sudo apt install -t 'o=LP-PPA-mozillateam' firefox -y #the deb is installed in /usr/lib/firefox

###########################

enable snap firefox again

sudo snap enable firefox #########################

change firefox icon

old="Icon=firefox" new="Icon=/path/to/your/icon" sudo sed -i "/${old}/c ${new}" /usr/share/applications/firefox.desktop

#change .deb firefox name old="Name=Firefox Web Browser" new="Name=FirefoxSecond" sudo sed -i "/${old}/c ${new}" /usr/share/applications/firefox.desktop

To open firefoxSecond (.deb) :

firefox

To open firefox( snap) :

snap run firefox

Now add them to favorites!

Vitor Abella
  • 8,015
  • 16
  • 63
  • 115