From b40097236598e077c1fb0e72925ef2cd831beb21 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 15 Sep 2025 09:24:50 +0300 Subject: [PATCH] duplicate firefox to firefox-npm except no profile manager --- bash/usr-local-bin/firefox-npm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 bash/usr-local-bin/firefox-npm diff --git a/bash/usr-local-bin/firefox-npm b/bash/usr-local-bin/firefox-npm new file mode 100755 index 0000000..e88281e --- /dev/null +++ b/bash/usr-local-bin/firefox-npm @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# This is variant of the firefox wrapper script, except without profile +# manager for use with desktop entry that just quickly launches the main +# profile. + +set -x +export MOZ_ENABLE_WAYLAND=1 +FlagsForFirefox="--allow-downgrade $@" + +# Firefox (stable, beta) and signatures: https://releases.mozilla.org/pub/firefox/releases/ +# Developer edition (and signatures): https://releases.mozilla.org/pub/devedition/releases/ +if [ -f ~/.local/firefox/firefox ]; then + ~/.local/firefox/firefox $FlagsForFirefox +# Fallback to global installation +elif [ -f /usr/bin/firefox ]; then + /usr/bin/firefox $FlagsForFirefox +# Fallback to global installation +elif [ -f /usr/bin/firefox-esr ]; then + /usr/bin/firefox-esr $FlagsForFirefox +# Fallback to Snap which apparently follows /etc/policies.json +elif [ -f /snap/bin/firefox ]; then + snap run firefox $FlagsForFirefox +# Fallback to flatpak, don't care if it doesn't exist +else + flatpak run org.mozilla.firefox $FlagsForFirefox +fi + +set +x