6

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?

  • 1
    If your Firefox is working correctly, you can ignore the messages to the terminal window. Many graphical programs send warning messages when started from a terminal window. -- Otherwise, if Firefox fails, and if you are using Wayland, you can try after changing to Xorg for the desktop graphics. See this link to another (maybe similar) thread at AskUbuntu. – sudodus May 20 '22 at 07:27
  • That is 'only' a comment, not an error message. – sudodus May 20 '22 at 13:32
  • @sudodus This is fresh installed copy of Ubuntu 22.04 LTS, On booting with ext4 or LVM installed copy, It would display /dev/sda2: clean, 194908/6102208 files, 6378606/244059136 blocks before the login.

    Installing Ubuntu through ZFS helped to resolve that issue.

    While trying to resolve /dev/sda2: clean, 194908/6102208 files, 6378606/244059136 blocks

    I tried, sudo apt-get install --reinstall xserver-xorg-video-vesa Xorg -configure'startx`

    From this link

    – Phil Ossefer May 20 '22 at 13:46
  • @sudodus Here, again you're suggesting Otherwise, if Firefox fails, and if you are using Wayland, you can try after changing to Xorg for the desktop graphics.

    IS there a correlation between it? Installation booting comment and firefox comment?

    – Phil Ossefer May 20 '22 at 13:48
  • In this case, I don't think so. Do Firefox and other important programs work? – sudodus May 20 '22 at 13:52
  • So far have used firefox and GIMP. it's working fine. No comments are displayed for GIMP while running it through command line. – Phil Ossefer May 20 '22 at 14:20
  • Many graphical programs send warning messages when started from a terminal window. I am used and don't worry about it as long as the programs work as they should. I think it is simply things that the developers forgot to clean because those messages will not show, when called from a menu or similar (in the graphical desktop environment). – sudodus May 20 '22 at 14:25
  • I did check the link you provided, Method to switch from Wayland to X (to make Firefox work). In the file, it is already false #WaylandEnable=false. Thought the comments were some error as no comment are shown for GIMP and many other. So tried to resolve it. Thank you @sudodus for sharing your time and knowledge. Moving forward for now. – Phil Ossefer May 20 '22 at 14:35
  • The # character makes it a comment, not active. You must remove the # character from that line in order to make it active. So I think you run Wayland. Anyway, if Firefox works (and you have no other problem due to Wayland, you can continue without changing from Wayland to Xorg). Wayland is more modern. Good luck with your Ubuntu 22.04 LTS :-) – sudodus May 20 '22 at 15:06
  • @sudodus My bad, i didn't read your solution properly, the first time. I did uncomment it, saved the file and reboot the system, but still it didn't solved the issue. So, I undo the whole Wayland thing. As my Firefox is working fine and no real issue is there, which one should I prefer between launching Firefox through command line or launching it through GUI (by clicking Firefox icon)? Which one will be good for the system performance? – Phil Ossefer May 21 '22 at 04:44
  • Both will work well. So you decide what you like better. If you put Firefox into background with nohup firefox &, the terminal window can be used for other tasks and the cruft will be written to the file nohup.out. And if you want to open a particular web site, you can add it as parameter on the command line in a terminal window. But on the other hand, it is convenient to only click on an icon. – sudodus May 21 '22 at 05:02

3 Answers3

2

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: https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04

  • 1
    Had a similar problem with inkscape 1.2 on ubuntu 22.04.some functionalitiese weren't working correctly. When starting from terminal, the failed-to-load-"canberra-gtk-module" message appeared. Uninstalling the snap-package and installing via apt fixed the problem – Max Feb 10 '23 at 15:27
  • 2024 the snap package is still not a good one (at least not in all cases). Switching to deb fixed firefox 123.0.1 for me. Firefox now survives a reboot. By the way appamor profiles for snap firefox 123.0.1 do have syntax errors (appamor_parser 3.0.4 says). Funny thing is that the snap packages works as long as i do not do a reboot. Use the link above to use the latest tutorial instructions! – DanielaWaranie Mar 09 '24 at 14:21
1

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).

0

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

If yes, then Try:

$ firefox-esr (this may work)

Firefox logo

Lorenz Keel
  • 8,905
  • It's working fine in GUI as well as through command line. I tried firefox-esr and this is the output firefox-esr: command not found. – Phil Ossefer May 21 '22 at 04:47
  • I think u install with snap – Prajwal kedari May 21 '22 at 05:49
  • I think u install with snap
    that why msg occured . something snap not work fine. May be, snap can't get resources install by "apt'' . For example.., If u install VLC Media Player with apt as well snap .... You find there are two vlc media player available in menu.... you """"FireFox""" snap and you install PacKage through apt ................. then remove the snap package (of firefox) and install through apt ***It work well* thank
    – Prajwal kedari May 21 '22 at 05:58
  • Earlier it was installed via apt, found it using type firefox. I removed it, due to your second comment I think u install with snap and installed it via snap. Later I read your recent comment, so should I install firefox or firefox-esr via apt? – Phil Ossefer May 21 '22 at 06:34