3

I have two different .desktop files for my two Firefox profiles. Both have different icons and are pinned separately to my dash, but when they run they both run under the default icon. How can I change this so they run separately?

Default profile file:

[Desktop Entry]all this seems to do is make them both launch Firefox with a default icon
Version=1.0
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox %u
Terminal=false
Type=Application
Actions=new-window;new-private-window;
Icon=firefox

[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -new-window

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

School profile file:

[Desktop Entry]
Version=1.0
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote
Terminal=false
Type=Application
Actions=new-window;new-private-window;
Icon=/home/callum/Pictures/firefox-school.png

[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -P school -no-remote -new-window

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -P school -no-remote -private-window

Here is an image of my two launchers of Firefox, I'm currently running the school profile, but it shows the default instance is open:

Image

I am running Kubuntu 19.10 with KDE Plasma 5.16.5

Thanks!

EDIT: Using classes I updated the desktop files to use classes as per @vanadium 's suggestion, but the second profile just launches another Firefox instance with the default icon. This is what I see when I open the Firefox school .desktop file with the FIrefox personal .desktop file open as well

Default profile file:

[Desktop Entry]
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox -P personal -no-remote --class personalProfile
Terminal=false
StartupNotify=true
Type=Application
Icon=firefox
StartupWMClass=personalProfile

School profile file:

[Desktop Entry]
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote --class schoolProfile
Terminal=false
Type=Application
StartupNotify=true
Icon=/home/callum/Pictures/firefox-school.png
StartupWMClass=schoolProfile

EDIT 2: I fixed it! I updated the desktop files in ~/.local/share/applications rather than the ones in usr/share/applications

2
  • Solution provided in duplicate question is valid accross DE's – vanadium Feb 10 '20 at 10:39
  • 1
    Hi, while that does work, it doesn't respect my custom icons – Callum25252 Feb 10 '20 at 11:11
4

I solved this by adding classes to the desktop files:

[Desktop Entry]
Name=Firefox School
Comment=Browse the World Wide Web
Exec=firefox -P school -no-remote --class schoolProfile
Terminal=false
Type=Application
StartupNotify=true
Icon=/home/callum/Pictures/firefox-school.png
StartupWMClass=schoolProfile
[Desktop Entry]
Name=Firefox Personal
Comment=Browse the World Wide Web
Exec=firefox -P personal -no-remote --class personalProfile
Terminal=false
StartupNotify=true
Type=Application
Icon=firefox
StartupWMClass=personalProfile

and then moving the new desktop files to ~/.local/share/applications rather than just the ones in usr/share/applications

1
  • Nice. The '--class' flag was exactly what I was looking for. – LUser May 11 '20 at 8:57

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.