Archives For November 30, 1999

The pre-installed Firefox Snap package in Ubuntu 22.04 & 22.10 now works again for native messaging support. Meaning user can now make it work with GSConnect, KeePassXC, Plasma extension, and/or installing Gnome Shell Extensions,

As you may know, Ubuntu switched to the Snap version of Firefox that runs in sandbox since 21.10. Which, however broke the feature to exchange messages with native applications.

Thanks to Flatpak team for working on a new WebExtensions XDG desktop portal and its integration in Firefox. The new native messaging feature is available for testing for a few months in beta channel. And, it’s made int stable channel just a few days ago.

Firefox as Snap

How to Get it

If you’re now using Firefox as Snap, just wait it will automatically update to the latest version with the new feature. Or, open terminal by pressing Ctrl+Alt+T on keyboard and run command:

sudo snap refresh firefox --stable

And install the XDG desktop portal package by running command in terminal. Also install chrome-gnome-shell if you want to use Firefox to install Gnome shell extensions.

sudo apt update && sudo apt install xdg-desktop-portal

For switching from Firefox .deb package back to Snap, just remove PPA priority file (if any) under ‘/etc/apt/preferences.d/’ directory, then run the command below in terminal:

sudo apt update && sudo apt install firefox

Finally launch Firefox, install or visit the page that need native message exchange. It will pop-up a dialog asks user to grant the permission.

Firefox Snap ask for native messaging permission

Mozilla Firefox 101 was released today with minor new features and security fixes.

If you do video conferencing regularly with Firefox web browser, you may now use as many microphones as you want, at the same time. It allows to switch your microphones at any time, if your conferencing service provider enables this flexibility.

For non-configured MIME file types, Firefox 101 allows to assign a custom action upon download completion.

Other changes in Firefox 101 include:

  • Allow sites to detect if user has requested web content present with a higher (or lower) contrast.
  • New inspector panel option ‘Click and drag to edit size values’.
  • WebDriver BiDi protocal.
  • Add support for large, small, dynamic viewport units and logical ones (*vi and *vb).
  • Various security fixes.

How to Get Firefox 101:

Ubuntu keeps updating the Firefox packages through its security & updates repository. Simply keep your system up-to-date, you’ll get this Firefox release soon in next few days.

For Ubuntu 22.04 user prefer .deb package, as well as the old Ubuntu 16.04, keep an eye on the MozillaTeam PPA.

Mozilla Firefox has reached its 100th release! It has been more than 17 years since the first 1.0 was released in 2004.

Firefox 100 now supports for displaying subtitles in the pop-out video (Picture-in-Picture mode) for YouTube, Prime Video, and Netflix videos. Also, it supports video captions on websites that use WebVTT (Web Video Text Track) format, like Coursera.org, Canadian Broadcasting Corporation, and many more.

For macOS 11 with HDR-compatible screens, users can now enjoy HDR video on YouTube out-of-the-box, though you have NOT to enable “optimize video streaming while on battery”.

For Windows, hardware accelerated AV1 video decoding is enabled for support GPUs, including Intel Gen 11+, AMD RDNA 2 Excluding Navi 24, GeForce 30. Though, AV1 Video Extension from the Microsoft Store is required.

Other changes in Firefox 100 include:

  • Detect and offer choice if Firefox does not match system language on first run.
  • Add multiple languages support for spell checking.
  • Enable video overlay to reduce power usage for Windows user with Intel GPU.
  • Support credit card autofill and capture in the United Kingdom.
  • Ignore less restricted referrer policies
  • Choose preferred color schemes for websites.
  • Support for profiling multiple java threads
  • Add Geckoview APIs

Get Firefox 100:

For the release note as well as download link, go to Mozilla web site:

For Ubuntu users, Firefox 100 will be available in next few days. Just keep your system up-to-date and you’ll get the release soon.

For Ubuntu 22.04 (and old Ubuntu 16.04), you may install Firefox 100 as .deb from Mozilla Team PPA (Need to set PPA priority, see HERE for more).

Ubuntu 22.04 finally removed the .deb package for Firefox web browser from it’s repository! Here’s how to install it back.

As you may know, Firefox in Ubuntu repository since 22.04 is a Snap package that runs in sandbox. It’s easy to remove it. But when you try installing the deb package via apt, it just install the Snap version back!!

Like Chromium, the Firefox deb in Ubuntu 22.04 + repository is an empty package that links to the Mozilla’s official Snap.

And, if you want to install the latest Firefox using the classic .deb package format, there are 2 easy ways:

  • Mozilla Team PPA maintained by Ubuntu Team members.
  • Mozilla’s new apt repository maintained by Firefox developer team!

(Optional) Remove the pre-installed Firefox Snap

It’s OK to keep the default Snap package. But it will cause duplicated Firefox icons after installing Firefox in .deb package format.

NOTE: Export bookmarks and backup other important data before removing it!

To remove it, press Ctrl+Alt+T on keyboard to open terminal. Then, run the command:

sudo snap remove firefox

Also, remove the empty Deb package by running command:

sudo apt remove firefox

Option 1: Install Firefox via “Mozilla Team” team PPA

The team described that it has assumed responsibility for Ubuntu’s official Firefox and Thunderbird packages.

And, the Firefox and Firefox ESR package maintainer for “Mozilla Team” team PPA, Rico Tzschichholz, is a well-known Ubuntu user who also maintains the official packages for LibreOffice, Plank dock, and unbound DNS server.

1. Add Mozilla Team PPA

In terminal (Ctrl+Alt+T), run the command below to add the PPA. Type user password (no asterisk feedback) when it asks and hit Enter to continue.

sudo add-apt-repository ppa:mozillateam/ppa

As the PPA description indicates, the PPA was previously created for Firefox ESR and Thunderbird. It now contains the latest Firefox too.

2. Set PPA priority:

The empty Firefox deb in Ubuntu’s official repository has version number 1:1snap1-0ubuntu2. It’s always higher than the PPA package version. Running package updates either via sudo apt upgrade or ‘Software Updater’ will automatically install the official one which redirects to Snap.

To workaround the issue, you have to set a higher PPA priority. To do so, run the command below in terminal (Ctrl+Alt+T):

sudo gedit /etc/apt/preferences.d/mozillateamppa

For Ubuntu 24.04, replace gedit in command with gnome-text-editor, or use nano that works in all the desktop environments.

The command creates and opens empty config file in Gedit text editor. When it opens, add the lines below and save it:

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

For nano text editor, press ctrl+s to save file, and ctrl+x to exit.

After saving the file, run sudo apt update command in terminal to apply changes.

sudo apt update

3. Install Firefox via apt

Tip: the commands in this step also installs Firefox for the old Ubuntu 16.04. Though sudo apt update need to be run first.

Finally, run the command below to install the latest Firefox package as deb:

sudo apt install firefox

Here -t 'o=LP-PPA-mozillateam' specifies to install Firefox from that PPA. It’s required until you set higher PPA package priority (see next step).

The -t 'o=LP-PPA-mozillateam' flag is no longer required after setup PPA priority.

For choice, you may install Firefox ESR instead. It’s another official Firefox package that moves slowly and targets for school or enterprise use.

sudo apt install firefox-esr

Option 2: Install Firefox via its official repository

Mozilla’s new apt repository contains 4 versions of Firefox packages: Firefox Stable, Firefox Beta, Firefox Development Edition, and Firefox Nightly. It’s a good choice for Ubuntu & Debian users.

1: Get Repository Key file

To add the new repository, you need to first download & install the key, so your system will trust the packages from it.

First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to make sure ‘/etc/apt/keyrings’ exist for storing the keys.

sudo mkdir -p /etc/apt/keyrings

Then, download & install the key by running the single command below in terminal:

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

After that, you can verify the new key file by listing the content of that directory via command ls /etc/apt/keyrings.

2: Add Mozilla’s apt repository

Also in a terminal window, run the single command below will create a config file and write the source repository.

echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee /etc/apt/sources.list.d/mozilla.list > /dev/null

When done, you may verify by running cat /etc/apt/sources.list.d/mozilla.list to print the source file content.

3. Set apt repository priority:

Also you need to set higher priority for Mozilla’s repository, so Ubuntu will install Firefox from it rather than the snap package.

To do so, run command to create & edit the config file:

sudo gedit /etc/apt/preferences.d/mozilla

Also, replace gedit with gnome-text-editor for Ubuntu 24.04, or use nano command line editor that works in most desktop environments.

When file opens, add following lines and save it (For nano, press ctrl+s to save, and ctrl+x to exit).

Package: firefox*
Pin: origin packages.mozilla.org
Pin-Priority: 1001

4. Install Firefox:

Finally, refresh your system package cache by running command in terminal:

sudo apt update

And, install Firefox from that repository via command:

sudo apt install firefox

You may also use firefox-beta, firefox-devedition, or firefox-nightly in last command to install other versions.

How to Restore Firefox Snap:

To restore the pre-installed Snap package, or uninstall the .deb package, first remove the repositories:

  • To remove the Mozilla Team PPA, launch ‘Software & Updates‘ utility and navigate to Other Software tab, finally remove the corresponding source line.
  • To remove the Mozilla apt repository, simply delete the source file, by running command in terminal:
    sudo rm /etc/apt/sources.list.d/mozilla.list

After that, either launch Software Updater to upgrade Firefox or use apt commands below. Both of which will automatically install back the pre-installed Snap package.

sudo apt update
sudo apt install firefox

That’s all. Enjoy!

Mozilla Firefox web browser 97.0 was released a day ago with few new features and various bug-fixes.

The release does not include any exciting new features for Linux, but only adds new minimal overlay scrollbar support for Windows 11. As well, system font loading on macOS has been improved to make opening and switching to new tabs faster in certain situations.

Other changes in Firefox 97 include:

  • The 18 colorway themes introduced in Firefox 94 expires! Though, enabled colorway will persist in add-on manager forever.
  • Remove support for directly generating PostScript for printing on Linux. However, printing to PostScript printers still remains a supported option
  • Various security fixes and new policies implemented in Enterprise 97.

colorways has gone

How to Install Firefox 97 in Ubuntu Linux:

For Ubuntu 21.10+ using the pre-installed Firefox as Snap, it updates automatically and user should now have v97.0.

For those using the classic .deb version, the best choice is wait! The official Ubuntu build will be available in next few days. At that time, open “Software Updater” to upgrade the Firefox package.

Firefox website also provides official Linux package via a portable tarball. Extract and run the executable file within the tarball will launch the web browser without installation:

Mozilla Firefox web browser released version 94.0. Here’s what’s new.

On the first launch of Firefox 94, a dialog will pop-up allows you to choose between color schemes. By clicking on “Explore colorways“, it allows to choose between 6 color palettes with live preview. And each has ‘Soft’, ‘Balance’, and ‘Cold’ colors to choose from.

For those using Mesa driver >= 21, Firefox 94 now uses the Linux graphics stack EGL instead of GLX. This will increase WebGL performance and reduce resource consumption. Ubuntu 21.04 and Ubuntu 21.10 may have the benefit, though proprietary Nvidia driver is not supported at the moment.

The new Firefox introduced a “about:unloads” page, allows users to manually unload inactive tabs to release system resources. Though it can be disabled by settings “browser.tabs.unloadOnLowMemory” to false.

Firefox about:unloads page

Other features in Firefox 94 include:

  • Firefox macOS now uses Apple’s low power mode for fullscreen video to extend battery life.
  • Firefox won’t prompt updates in Windows. Instead, it will download and install updates in background.
  • Introduced new Site Isolation security architecture.
  • Roll out Firefox Multi-Account Containers extension with Mozilla VPN integration
  • No longer warn when closing Firefox using a menu, button, or three-key command.
  • Support new Snap Layouts menus in Windows 11.
  • Reduced system resource usage and various security fixes.

Get Firefox 94:

For all current Ubuntu releases, including Ubuntu 18.04, Ubuntu 20.04, Ubuntu 21.04, and Ubuntu 21.10. It recommends to wait until the official Ubuntu builds released (check here).

It will be available to install in next few days through “Software Updater”:

For the portable Linux tarball as well as release note, go to mozilla website.

The “Software Updater” utility in Ubuntu MATE 21.10 tries to remove native Firefox package and install the SNAP version instead. If you’ve done that, here’s how to revert to Firefox DEB package and prevent the misbehavior.

As you may know, Ubuntu is switching Firefox from native DEB to the universal SNAP package. Ubuntu 21.10 now has Firefox SNAP out-of-the-box, while its flavors are still having the classic deb package.

However, in Ubuntu MATE 21.10 the “Software Updater” has a bug. It tries to remove pre-installed Firefox package by marking it as “Duplicate packages to be removed”.

Software Updater Tries to Install Firefox SNAP

If you clicked “Install Now” button without attention. The default Firefox web browser will be replaced with the SNAP app:

Revert to pre-installed Firefox DEB:

By going to the app “menu -> Help -> About Firefox” will tell if you’ve done that mistakenly.

The Firefox SNAP app

And, you may press Ctrl+Alt+T on keyboard to open terminal, and run command to remove the Snap if installed:

sudo snap remove --purge firefox

Then install the native Firefox deb package by running command:

sudo apt install firefox

Prevent Software Updater from installing Firefox Snap:

Thanks to N0rbert, run the single command below in terminal to do the trick until the upstream fixed the bug.

sudo apt-mark manual firefox

The command will work on all Ubuntu flavors, though I found the issue only in Ubuntu MATE so far.

That’s it. Enjoy!

Mozilla Firefox 93.0 was officially released today. The release features AVIF image support and further security improvements.

The AV1 image format (AVIF) is an image file format for storing images or image sequences compressed with AV1 in the HEIF file format. It offers significant file size reduction compare to JPEG, PNG and WebP. Google Chrome added it support since version 85. By releasing v93.0, Firefox now has AVIF image support.

Some PDF files have interactive fields to fill in data. Since Firefox 83, the built-in PDF viewer supports filling fields such as text, check boxes, and radio buttons. In the new release, it adds more forms (XFA-based forms, used by multiple governments and banks) support.

Firefox PDF viewer filling forms

To protect against potentially malicious or unsafe downloads, Firefox now blocks insecure HTTP downloads on a secure HTTPs web page, and blocks downloads in sandboxed iframes, unless the iframe is explicitly annotated with the allow-downloads attribute. Though, an option is available to select download anyway.

Other changes in Firefox 93 include:

  • Automatically unload tabs on Windows, when system is running out of memory.
  • Prompt to finish installation for macOS users first time running Firefox from a mounted .dmg file.
  • Improved SmartBlock and new Referrer Tracking Protections.
  • Fixed working with Orca screen reader.
  • And various security fixes.

How to Get Firefox 93.0:

Ubuntu will build and publish the latest Firefox packages through the security & updates (main) repository in next few days (check the launchpad build page). The best choice is just wait and upgrade Firefox using “Software Updater” once available.

For the release note, as well as download link for the portable tarball that contains non-install executable file to launch Firefox, go to:

Mozilla Firefox 92.0 was released today with new features and various security fixes.

The release will use HTTPS resource record (HTTPS RR) as Alt-Svc headers to make connections more secure.

The full-range color (0-255) levels are now supported for video playback. Though the limited color range (16-235) is ideal for movies and TV, the source can be switched to full-range color to match PC monitor.

For Mac, users can now access the macOS share options from the Firefox File menu. And it enables support for images containing ICC v4 profiles.

Other changes include:

  • Firefox performance with screen readers and other accessibility tools is no longer severely degraded if Mozilla Thunderbird is installed or updated after Firefox.
  • macOS VoiceOver now correctly reports buttons and links marked as ‘expanded’ using the aria-expanded attribute.
  • An open alert in a tab no longer causes performance issues in other tabs using the same process.
  • The bookmark toolbar menus on macOS now follow Firefox visual styles.
  • Certificate error pages have been redesigned for a better user experience.

How to Install Firefox 92:

Usually, Ubuntu will publish the new Firefox package in next few days. The best choice is just wait!

You’ll see the packages in Software Updater once published:

Or see the release note & download the Linux portable package from this page.

This tutorial shows how to enable hardware video acceleration (VA-API) for Firefox, so it uses the video card to decode/encode video to save power.

Hardware video acceleration is a computer technology to make the graphics card to encode and decode video, thus offloading the CPU to save power. And compared to CPU, GPU are normally more efficient at the job.

UPDATE 2024: VA-API SHOULD BE ENABLED BY DEFAULT (if available) IN RECENT FIREFOX RELESES! SO, JUST GO TO BOTTOM TO VERIFY.

There are a few ways to achieve this on Ubuntu Linux, including:

  • Video Acceleration API (VA-API) – an open source API developed by Intel.
  • Video Decode and Presentation API for Unix (VDPAU) – open source API developed by NVIDIA.
  • NVENC/NVDEC – NVIDIA’s proprietary API.

The VA-API supports Intel, AMD, and NVIDIA (via open-source Nouveau drivers) GPUs. And it is widely supported by software, such as MPV uses va-api hardware acceleration for video playback by default if available.

The VDPAU API supports both AMD and NVIDIA, but has no support in Firefox or Chromium. And while NVENC/NVDEC is used for NVIDIA GPU only, we usually use VA-API for hardware video acceleration.

Firefox pop-up video encoding/decoding via Intel GPU

Verify VA-API:

NOTE: VA-API does not work on NVIDIA via proprietary drivers as mentioned above. If you installed NVIDIA proprietary driver via ‘Additional Drivers’ utility, this will only work when you choose ‘Intel (Power Saving)’ mode in NVIDIA Prime settings.

The VA-API may work out-of-the-box in Ubuntu. You can firstly open terminal from start menu (click ‘Activities’ and search terminal).

Next install vainfo package via command:

sudo apt install vainfo

And run it to check VA-API info:

vainfo

It outputs the driver as well as supported profile. VAEntrypointVLD means decoding support for this format, VAEntrypointEncSlice means encoding support.

If the command outputs an error, you can try to install drivers via command:

  • For NVIDIA nouveau and AMD, run command:
    sudo apt install mesa-va-drivers
  • For Gen 8+ Intel hardware, install via command:
    sudo apt install intel-media-va-driver

    And for old Intel hardware, install i965-va-driver instead via apt install command.

By setting the environment variable, you can choose which driver to use. For example, set “export LIBVA_DRIVER_NAME=i965” to use i965 driver. The value can also set to “nouveau” for NVIDIA, or “radeonsi” for AMDGPU.

Enable VA-API in Firefox:

Firefox added VA-API support since version 80, though it’s not enabled by default. You can enabled it manually by doing following steps one by one.

Firstly, open Firefox and go to about:config in url bar. Click on “Accept the Risk and Continue”. Then search for following keys, enable or disable them one by one:

  • media.ffmpeg.vaapi.enabled set to true
  • media.ffvpx.enabled set to false.
  • media.rdd-vpx.enabled set to false.
  • media.navigator.mediadatadecoder_vpx_enabled set to true.
  • If you experience page crashes, try setting security.sandbox.content.level to 0.

Secondly, set environment variable (for current user only). Open terminal and run command to edit profile file:

gedit ~/.profile

When file opens, add following lines to the end:

  • (Optional) Specify va-api driver as mentioned above (replace iHD accordingly):
    export LIBVA_DRIVER_NAME=iHD

    You can SKIP this if vainfo outputs without error!

  • Diable RDD sandbox:
    export MOZ_DISABLE_RDD_SANDBOX=1
  • For Xorg session, default in Ubuntu 18.04/Ubuntu 20.04:
    export MOZ_X11_EGL=1
  • For Wayland session, default in Ubuntu 21.04 & higher:
    export MOZ_ENABLE_WAYLAND=1

Finally, log out and back in. Open Firefox and play a video and see result!

Check if Hardware Video Acceleration working:

During video playback, you can use top command to see CPU usage before and after enable VA-API. For Intel GPU, there’s intel_gpu_top command that monitor it continuously.

Open terminal and run command to install the tool first:

sudo apt install intel-gpu-tools

Next, run command:

sudo intel_gpu_top

Start playing video in Firefox and you’ll see the video bar is busy (above 0%) if VA-API starts working.

For AMD GPU, there’s another command line tool “radeontop” available to monitor GPU activity.

NOTE for YouTube videos, the video codec may sometimes not supported by your hardware. To workaround, try h264ify or enhanced-h264ify extension to make YouTube stream H.264 videos instead of VP8/VP9.

That’s all. Enjoy!