Snaps? What?
Snaps are the way a lot of third party software gets bundled and packaged in Ubuntu. Developed by Canonical, they are a good way to run applications in a sandboxed environment on the PC. Many, many applications that are either not focused on the Linux community, or otherwise not devoting resources to building applications to run natively on Ubuntu, Fedora, Red Hat, Debian, Arch, etc. can be installed and run on the Linux Desktop by way of Snaps. Full list here: https://snapcraft.io/store
The major competitor to Snaps is Flatpak which is another great project. I may do a blog or video comparing the two in the future, but essentially both help package hundreds of applications for Linux that run in an isolated environment on the host system. Unlike Docker or Podman, these contained applications function pretty much like a standard desktop application with icons, launchers, etc.
Now Firefox is a member of the Snap family. Great. Why the blog post?
Well Snaps have a reputation of occasionally being somewhat slow to load. Once running fine, but that initial click seems to take a while even with an SSD. I first learned about this with Ubuntu 18.04 running an admittedly 'netbook-like' device (low power laptop) when clicking the most basic calculator seemed to take several seconds. It wasn't until I learned about Snap packages vs native apt or .deb packages that I found the issue. Running calculator installed using the command 'apt install gnome-calculator' just pops right up, the Snap version takes a few seconds longer than it should.
This is true with the Firefox Snap as well. Being honest, I was kinda looking for it, because when I upgraded my laptop from Ubuntu Mate 21.10 to Ubuntu Mate 22.04 one of the things highlighted was that Firefox would be removed and replaced with a Snap. Indeed, when first using it I had lost all my settings (not too many), and it seemed slower to boot. No apt package available, I set out to install using the Firefox download.
If you download Firefox it gives you a Zip file - technically a .tar.bz2 zip file - that you can unzip and just run Firefox from the 'firefox' directory - just double-click the file firefox-bin. To make this more integrated in the desktop experience do the following.
Download and unzip Firefox from the official Mozilla website: https://www.mozilla.org/en-US/firefox/new/?redirect_source=firefox-com
Based on the location of the files create a firefox.desktop file under /usr/share/applications. *This will require 'sudo' or 'root' permissions.
Make the file:
- Open a text editor - Text Editor, Pluma, Kwrite, Nano, VI, VIM - any will do.
- Enter the following:
[Desktop Entry]
Version=1.0
Name=Firefox
GenericName=Internet Browser
Type=Application
Categories=Network;
Exec=/<extract location>/firefox/firefox-bin
Icon=/<extract location>/firefox/browser/chrome/icons/default/default32.png - Save as firefox.desktop in the /usr/share/applications directory on Ubuntu
- Log out and log back in to confirm.
That's it.
Firefox will get displayed as a searchable application. In my case it even reappeared as the top of my favorites just like it had been saved before I upgraded.
Snaps are great for ease of use and running proprietary applications, such as games, or perhaps the odd communication platform. However, I think for something as commonly used as a browser, having something running on the operating system leads to a speedier experience.
Hope it helps!
No comments:
Post a Comment