A newbie helping newbies - Launch Firefox profile from shortcut.

I recently switched from Windows 10 to ZorrinOS (after a quick detour to NixOS… OOF) and in the course of setting things up how I like, I ran across some interesting stuff relating to flatpaks and shortcuts. I wanted to get this written to provide a resource for other people who might be switching.

This is a guide to making a shortcut to launch a particular Firefox profile, on a Ubuntu based distro, while running Firefox as a flatpak. This is just how I did it, put the files where you want.

  1. Make a directory to hold the launch script and a shortcut icon. My script:

<span style="color:#323232;">#!/bin/sh
</span><span style="color:#323232;">flatpak run org.mozilla.firefox -p youtube
</span>

Obviously, make it executable.

Because Firefox is running as a flatpak we can’t just launch it using firefox. They’re actually stored in /var/lib/flatpak/app and can be launched like this.

opensource.com/…/launch-flatpaks-linux-terminal

  1. Create a text file in the Desktop directory with a .desktop extension like this:

<span style="color:#323232;">[Desktop Entry]
</span><span style="color:#323232;">Name=YouTube
</span><span style="color:#323232;">Comment= Launches Firefox Youtube profile
</span><span style="color:#323232;">Exec=/home/user/Documents/firefox-youtube/firefox-youtube.sh
</span><span style="color:#323232;">Icon=/home/user/Documents/firefox-youtube/youtube-app-icon.png
</span><span style="color:#323232;">Terminal=false
</span><span style="color:#323232;">Type=Application
</span>

www.baeldung.com/linux/desktop-entry-files

  1. Once saved, make it executable. Right click > “Allow Launching”. Done.

Just for fun, this is the image I like for it.

LunchEnjoyer,
@LunchEnjoyer@lemmy.world avatar

Out if curiosity, what did you not like with Nix?

capital, (edited )

I had this issue where every time it locked due to inactivity, it killed my session. Every time I logged back in I had to relaunch everything.

I tried a few power settings in the config file but nothing helped.

It just worked out of the box on Zorin.

LunchEnjoyer,
@LunchEnjoyer@lemmy.world avatar

Good you found something that works for you 👌

governorkeagan,

I was looking for something like this the other day. Thank you!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • fightinggames
  • All magazines