These are my rough notes for installing Firefox Nightly on Fedora 32 so it has a launcher icon in the GNOME dock.
Unpack the tarball
The tarball is available from
mozilla.org.
Internally it contains everything in a directory firefox
:
✸ tar tf firefox-76.0a1.en-US.linux-x86_64.tar.bz2 | head
firefox/omni.ja
firefox/firefox-bin
firefox/plugin-container
firefox/fix_linux_stack.py
firefox/fix_stack_using_bpsyms.py
firefox/libnssutil3.so
firefox/gmp-clearkey/0.1/manifest.json
firefox/gmp-clearkey/0.1/libclearkey.so
firefox/libgraphitewasm.so
firefox/libplc4.so
Expand into /opt/firefox
. Make the target dir and content owned by me, so it
can update automatically running as my user without privileges.
✸ sudo mkdir -p /opt/firefox
✸ sudo chown $USER:$USER /opt/firefox
✸ tar xf firefox-76.0a1.en-US.linux-x86_64.tar.bz2 -C /opt
✸ rm firefox-76.0a1.en-US.linux-x86_64.tar.bz2
Make the desktop entry
Make a desktop entry so I can
add it to the GNOME dock. This is based on Fedora’s default
firefox-wayland.desktop.
It should be installed as ~/.local/share/applications/firefox-nightly.desktop
[Desktop Entry]
Version=1.0
Name=Firefox Nightly
Exec=env MOZ_ENABLE_WAYLAND=1 /opt/firefox/firefox-bin --name=firefox-nightly -P nightly %u
Icon=firefox-nightly
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
StartupNotify=true
StartupWMClass=firefox-nightly
Notes:
-
MOZ_ENABLE_WAYLAND=1
makes sure we get the Wayland back end instead of the X11 back end, for working vsync and crisp scaling. -
--name=firefox-nightly
setswmclass
so GNOME associates the icon in the dock with the running windows, and keeps it separate from the Fedora-supplied stable Firefox. This must match the setting forStartupWMClass
.Hint:
alt-f2
and runlg
for GNOME looking glass, this lets you inspect the list of windows and their associatedwmclass
. -
-P nightly
uses an alternate profile, so that stable and nightly aren’t sharing on-disk storage.
Symlink the icon
Mozilla supplies icon files for the blue Firefox Nightly logo in the tarball, but they’re oddly named:
✸ find /opt/firefox/ -path '*browser*icons*png'
/opt/firefox/browser/chrome/icons/default/default32.png
/opt/firefox/browser/chrome/icons/default/default64.png
/opt/firefox/browser/chrome/icons/default/default16.png
/opt/firefox/browser/chrome/icons/default/default128.png
/opt/firefox/browser/chrome/icons/default/default48.png
Symlink these to the right location and name:
✸ src=/opt/firefox/browser/chrome/icons/default
✸ for z in 16 32 48 64 128; do \
dest=~/.local/share/icons/hicolor/${z}x$z/apps; \
mkdir -p "$dest"; \
ln -sv "$src/default$z.png" "$dest/firefox-nightly.png"; \
done
'/home/aron/.local/share/icons/hicolor/16x16/apps/firefox-nightly.png' -> '/opt/firefox/browser/chrome/icons/default/default16.png'
'/home/aron/.local/share/icons/hicolor/32x32/apps/firefox-nightly.png' -> '/opt/firefox/browser/chrome/icons/default/default32.png'
'/home/aron/.local/share/icons/hicolor/48x48/apps/firefox-nightly.png' -> '/opt/firefox/browser/chrome/icons/default/default48.png'
'/home/aron/.local/share/icons/hicolor/64x64/apps/firefox-nightly.png' -> '/opt/firefox/browser/chrome/icons/default/default64.png'
'/home/aron/.local/share/icons/hicolor/128x128/apps/firefox-nightly.png' -> '/opt/firefox/browser/chrome/icons/default/default128.png'
Done!