I recently switched to Debian because I wanted a rock solid plain Gnome environment for my daily driver / work laptop. The main downside is that even Debian testing is a bit more conservative with updates than I would like for certain applications. Normally I would use and recommend Flatpak, but there are a few edge cases where I need to use the Debian package, which leads me to today’s post.
I am really excited because the the Firefox finally removed the microphone and camera indicator!!!! I really hated their floating indicator and this update brings me a lot of joy. Like I said in the intro, I would normally install/update Firefox via Flatpak, but this doesn’t really work for me because I use 1password and I really like the integration of the Firefox extension and the desktop app. This integration throws a small kink into the the install story due to sandboxing in Flatpak not currently supporitng a native messaging portal (see also).
Fortunately, Debian apt just installs the standalone non-sandboxed Firefox. This means 1password integration works as expected. However, Debian stable and testing only ship the Firefox Extended Support Release (ESR)! This is not the latest. But Debian unstable (ie Sid) does package the latest Firefox releases.
Manual approach
At first, I just manually downloaded and installed the .deb
using dpkg -i <deb file>
.
This naturally has an issue that I need to manually track and update it when a new version is released.
Apt approach
But I found a better approach that allows the installation to be updated via apt. Apparently the source list can have multiple overlapping sources and you can set a preference for packages to prefer a specific source! I found some nice instructions here
First, you need to edit the /etc/apt/sources.list
to add this section
deb http://deb.debian.org/debian/ sid main non-free-firmware non-free contrib
deb-src http://deb.debian.org/debian/ sid main non-free-firmware non-free contrib
Next, I created two files in /etc/apt/preferences.d
# /etc/apt/preferences.d/debian
Package: *
Pin: release a=trixie
Pin-Priority: 500
Package: *
Pin: release a=unstable
Pin-Priority: 100
This file tells debian to prefer packages in the Testing repository.
Then I created
# /etc/apt/preferences.d/firefox
Package: firefox
Pin:release a=unstable
Pin-Priority: 1000
Which overrides the previous file and tells apt to prefer the Unstable repository for the firefox
package.
Finally, we can update and install Firefox
sudo apt update
sudo apt install firefox
Conclusion
I am now running the latest Firefox and have the standard update flow with apt
. However, I would be very cautious about using this approach with other applications and would certainly avoid using it for any of the core system packages like gnome, systemd, etc. Don’t make a FrankenDebian!
Once the desktop portal for native messaging is finalized, I will just switch to Flatpak. But until then, this is a nice solution for me.
Cover Photo by Jordane Mathieu on Unsplash