How can I make a desktop launcher for a specific Firefox profile?

Hi guys, I know I can easily make a launcher file in ~/.local/share/applications for it but I don't know what arguments to put in Exec= line to launch a specific profile. I know it is possible but I don't know how to find it

34 points · 16 comments · view on lemmy.world

16 Comments

zdhzm2pgp@lemmy.ml · 17 pts · 293d (1 reply)

Isn't it just firefox -p [name of profile]?

aprehendedmerlin@lemmy.dbzer0.com · 8 pts · 293d

Yes it is thanks

s3rvant@lemmy.ml · 10 pts · 293d (1 reply)

We share a single PC account and do exactly this to easily separate our profiles; here's what I have for my launcher for example:

[Desktop Entry]
Version=1.0
Name=David-Firefox
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=firefox %u -P David --class Davidfox
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/david/Launchers/Firefox/Firefox-David.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;ProfileManager;

[Desktop Action NewWindow]
Name=Open a New Window
Exec=firefox -P David --class Davidfox -new-window

[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Exec=firefox -P David --class Davidfox -private-window

[Desktop Action ProfileManager]
Name=Open the Profile Manager
Exec=firefox -ProfileManager --class Davidfox

Here I'm using a custom icon to help tell our profiles apart on our dock and use a custom window class so each profile's windows will group with each other as well.

aprehendedmerlin@lemmy.dbzer0.com · 1 pts · 293d

Thanks for sharing I did not understand the custom window class but hey that's a reason to read the Firefox CLI wiki

MonkderVierte@lemmy.zip · 5 pts · 293d (2 replies)

firefox --help ?

aprehendedmerlin@lemmy.dbzer0.com · 4 pts · 293d (1 reply)

Sorry I'm a noob I didn't realize that these also have man pages

MonkderVierte@lemmy.zip · 3 pts · 293d

Not man pages tho. Just a short summary. Similiar to Windows CMD /? (but who still knows cmd nowadays).

illusionist@lemmy.zip · 4 pts · 293d (1 reply)

Fwiw: there us a Gnome extension to add profiles to the top bar

aprehendedmerlin@lemmy.dbzer0.com · 2 pts · 293d

I should have mentioned my DE is Cinnamon

progandy@feddit.org · 4 pts · 293d (6 replies)

The list of possible CLI parameters can be found in the Mozilla wiki https://wiki.mozilla.org/Firefox/CommandLineOptions

Jumuta@sh.itjust.works · 2 pts · 293d (4 replies)

or firefox --help

aprehendedmerlin@lemmy.dbzer0.com · 2 pts · 293d (3 replies)

You're right I'm a noob I didn't realize that these also have man pages

Jumuta@sh.itjust.works · 3 pts · 293d (2 replies)

that's completely fine :)

I think the biggest part of learning Linux is learning where to get help. Most programs have a help dialog with --help or -h, or man pages you can find somewhere. Even the terminal has a help dialog if you just type "help", most things are more user friendly than they seem!

If man pages are difficult to read, I recommend installing tealdeer (tldr). it shows a short summary of example command usages and it's great (e.g. tldr ls shows the different ways you can use ls)

aprehendedmerlin@lemmy.dbzer0.com · 4 pts · 293d (1 reply)

Thanks I have tealdear installed after I saw the mental outlaw's video about it after months back. It is great indeed

FauxLiving@lemmy.world · 2 pts · 292d

First mental outlaw reference I’ve seen in the wild, 🍻

aprehendedmerlin@lemmy.dbzer0.com · 1 pts · 293d

All the possible options explained very well here thanks