10

Since I installed ubuntu 22.04 I have the following error message after clicking on a link in thunderbird if firefox is already running (instead of opening the link in a new tab):

Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile.

If firefox isn't running, clicking on the link opens a new firefox instance and displays the corresponding web page.

The helper app for opening links in thunderbird points to /snap/bin/firefox.

The same problem occurs if I try to open a website (in a new tab) from command line for example firefox www.google.com.

I guess it has something to do with the fact that firefox is installed as snap now, but I am not sure.

What can I do, to solve the problem?

user56438
  • 101
  • 1
  • 3

4 Answers4

1

I can reproduce your issue in a virtual machine when I unset the DBUS_SESSION_BUS_ADDRESS environmental variable. This prevents the "firefox" command from correctly connecting to the running window of Firefox. In a default Ubuntu install, the variable is set. In my main machine, which is an upgrade, the variable is not set. Also see this bug report.

As a quick fix, add

export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"

to your ~/.profile file, and log out then back in for the variable to take effect.

If after this, the issue still exists, then uninstall and reinstall the snap package.

vanadium
  • 97,564
1

I had an identical problem and also looked for an answer in the chat room, but did not find it. Some people tried to tell me that I have an unfinished process or DBUS_SESSION_BUS_ADDRESS not set, but they certainly have not encountered such a problem. It occurs after that forced installation of firefox from snap when upgrading the Ubuntu version.

Note that most likely (like me) you now have 2 .mozilla folders

  • one in your root directory from the .deb version
  • and the other in /snap/firefox/common.

The easiest way to do this is to enable the profile manager using the command

firefox -P

and there create a new default user.

TADA! Now you can simply run firefox!

Then you can probably move your files from their respective .mozilla sources, but I simply synced using my firefox account.

I get all sorts of bugs with every Ubuntu system update, but praise God for being able to fix them. Firing the do-release-upgrade command is like “sudo upgrade-my-problem-solving-skills” :D

Hope I helped, happy coding ;)

0

I don't believe there is a workaround for this, assuming you'll keep using the snap version from inside Thunderbird.

One idea would be to set up an instance of Firefox non-snap somewhere.

Try this:

cd ~/bin ( or wherever you keep your binaries )

wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/105.0.1/linux-x86_64/en-US/firefox-105.0.1.tar.bz2

tar -xf firefox-105.0.1.tar.bz2

This will download the latest ( at this time ) version and extract it, you will have a ready executable ./firefox in the extraction directory.

Now you can change the helper app pointer to ~/yourdir/firefox-105.0.1/firefox

This instance will self-update as well.

Good luck :)

Giorgos Saridakis
  • 768
  • 1
  • 5
  • 13
0

Look in /usr/share/applications/ for the Firefox.desktop.

you can then open with a text editor look at the commands you can use for Firefox at the bottom of the file.

you should see some "desktop actions"

for your use case,for terminal, you need to type

firefox --newtab https//:www.yourwebadresshere.netcomdotfun

for thunderbird, it needs to be pointing at /usr/bin/firefox. That's where the symbolic link is stored so you can run firefox as a command on most systems. go to /usr/bin/ and find firefox in there before you change anything. I don't know how to change that, I don't use thunderbird. However, it might be pointing to /snap/bin/firefox because it was installed through snap, and that's where its symbolic link is stored. If the symbolic link is in /snap/bin/, and not usr/bin/, it might not open links at all if you change that(if you can change that), unless you make another symbolic link to /usr/bin/ or /snap/bin/

Make sure you go into the Firefox settings and make sure "open links in new tabs" is on, that should help.

If you ever get the: "Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile." - Error again, open up terminal and type "killall firefox"- that'll close it even if it's frozen. also, a straight logout to the greeter should also kill all the programs running.

Good luck.