Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Ubuntu 22.04 LTS: Starting firefox through terminal Error "cannot change mount " & Failed to load module "canberra-gtk-module", How to solve it?

Writer Andrew Henderson

System information:Computer Summary

Ubuntu version:
philossefer@dell:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy

When I'm trying to launch Firefox Web Browser through terminal, following message is displayed before firefox is launched.

philossefer@dell:~$ firefox
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/libreoffice/help /usr/share/libreoffice/help none bind,ro 0 0): cannot create directory "/usr/share/libreoffice/help": permission denied
Gtk-Message: 11:19:46.906: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:19:46.985: Failed to load module "canberra-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.

Afterwards, whenever I'm trying to launch firefox, after the first launch in-between system boot, following messaged is been displayed before firefox gets launched.

philossefer@dell:~$ firefox
Gtk-Message: 11:19:46.906: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:19:46.985: Failed to load module "canberra-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.

I have tried the following solution,by "copy and paste" those messages on google.

What I have tried so far, without any success

Try 1

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module

Try 2

sudo apt-get install --reinstall libcanberra-gtk-module

Try 3: Remove firefox and then reinstall

Uninstall:

 sudo snap remove firefox

Reinstall:

sudo apt install firefox

NOTE: I was rebooting the system after, every installation and uninstallation.

reboot

Also Updated my Ubuntu beforehand.

sudo apt update && sudo apt upgrade -y

Current Status: Still those messages are there, when I'm launching firefox using command line.

My question is, why those messages are been displayed and how to get rid of them?

SubQuestion: Is there any difference between launching firefox through icon and through using command line?

11

3 Answers

I ran into the same issue. I was not able to get the snap working, however I was able to successfully install a Firefox deb on Ubuntu 22.04. You add the Mozilla Team PPA, install the Firefox deb, then pin them so the Firefox Snap is not installed later. Here are the steps I followed:

Step 1:

sudo snap remove firefox

Step 2:

echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox

Step 3:

echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox

Step 4:

sudo apt install firefox

Reference:

Can't upvote or comment on the second answer due to just creating an account for mainly that purpose - so I'll write a follow-up answer.

I've run into the same problem, force-installing the snap-package despite the normal use of apt by Ubuntu is causing a heap of issues, and the one you're observing is one of them.

Uninstall the snap package, install the apt-package as described by @kaiyobi, and your issues should be gone (just until Ubuntu force-feeds you the snap package again, ignoring Pin-Priority etc, by their installers).

First, make sure it start well in GUI (normally by click)

If yes, then Try:

$ firefox-esr (this may work)

Firefox logo

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy