6

In Kubuntu 20.04, I use autokey to create hotkeys that launch websites.

Prior to Firefox 94, these hot keys had no difficulty launching pages, but now each time I try to launch a page I get this error:

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.

enter image description here

In autokey, the python3 script that gets triggered, upon these hotkeys, is just two lines:

import os
os.system("firejail firefox https://askubuntu.com/ &")

Notice that I'm using firejail to launch firefox, which does require installation:

sudo apt install firejail

Previously, if Firefox was already running, this would achieve launching the web page into a new tab. Now, even if I include the -new-tab argument (described in Firefox's man page), I still cannot launch the page. Now, it only works if Firefox is completely closed at the time I hit the hot keys.

So, something changed upon upgrading to Firefox 94, and I'm hoping someone here can advise a workaround.

Lonnie Best
  • 2,174
  • 2
  • 32
  • 42
  • 1
    I have seen this a lot now but I use bash scripting for opening instead of Python. Anyways, I have just changed my `~/.mozilla/firefox` folder so that both my user and group have full Read and Write access to that folder and all folders contained within. It seems to be working when I test with your Python script. Might work for you. https://support.mozilla.org/en-US/kb/firefox-already-running-not-responding – Terrance Nov 06 '21 at 17:49
  • @Terrance : This works when I'm not using firejail. However, in Firefox 93 and prior, the command worked with firejail. – Lonnie Best Nov 06 '21 at 19:48
  • https://github.com/netblue30/firejail/issues/4670 – Lonnie Best Nov 06 '21 at 20:05
  • 1
    Sorry, but your original question did not mention firejail. When jailing applications it really might make it so that it is not reading your home folder like it should. It really may be a bug in firejail. – Terrance Nov 06 '21 at 22:33
  • @Terrance : Well, since Firefox was just auto-upgraded to version 94, I suspect something changed in Firefox. Firejail has no issue with Firefox 93 and lower. It may be a firejail bug, but if so, it is one that wasn't noticeable to me until Firefox 94. – Lonnie Best Nov 06 '21 at 22:47
  • Or it really could be a bug in Firefox not having access to the folders it needs. – Terrance Nov 07 '21 at 01:14
  • Firefox Bug ID [1739919](https://bugzilla.mozilla.org/show_bug.cgi?id=1739919). – Lonnie Best Nov 07 '21 at 22:54
  • 1
    I have now changed over to Waterfox since it does not seem to suffer from this. Firefox started doing it again even though I don't use firejail. – Terrance Nov 08 '21 at 19:57
  • @Terrance Hey, read Roland Kaufmann posts [here](https://bugzilla.mozilla.org/show_bug.cgi?id=1739919). I think it is likely that he discovered the exact change that caused this. Kubuntu 20.04 is a LTS release. Yet, instead of upgrading firejail to 0.9.64.4, in the repository, [as I did request](https://bugs.launchpad.net/ubuntu/+source/firejail/+bug/1949194), they patch an older version instead. Debian 11 stable has a later firejail that Ubuntu 20.04 LTS. Perhaps I have misconceptions about the meaning of "Long Term Support"? – Lonnie Best Nov 09 '21 at 13:52

1 Answers1

3

Firefox changed the way it attempts to open new tabs in existing windows, from using X11 in version 93 to using dbus in version 94. The firejail profile in 0.9.62, which is the version currently in the Ubuntu Focal 20.04 repositories, block this. This seems to have been fixed in Firejail version 0.9.64. To upgrade Firejail, add the 'deki' PPA, which currently contains version 0.9.66.:

sudo add-apt-repository -y ppa:deki/firejail
sudo apt-get update
sudo apt-get upgrade -y firejail firejail-profiles
RolKau
  • 196
  • 1
  • 2