Using Webbrowser.open_new_tab, suddenly doesn’t open new tabs but tries to open new windows?

Happened in two configurations:

Firefox 138.0.3; Ubuntu 24.04.02 LTS; Python 3.12.3

Firefox 147.0.3; Ubuntu 24.04.04 LTS; Python 3.12.3 (main, Jan 22 2026, 20:57:42) [GCC 13.3.0]

Whether trying inside a program or just the shell, this and other shorter variations, now always tries to make a new instance of Firefox instead of using the one I have running. And when doing it inside a script instead of from shell, I also see a new Firefox process that’s named after the page I tried to open.

import webbrowser
webbrowser.get(“firefox”).open_new_tab(“google.com”)

Just returns True before the same message I get from how I can’t get new tabs by Terminal either pops up? firefox --new-tab --url about:newtab also tries to launch or even just firefox --new-tab about:newtab gets me:

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.

Which isn’t right, since I’m using Firefox right now and it’s fine.

The first time this happened, closing and reopening Firefox fixed it for one run of the program, the second time… still fixed by close and reload.


I wonder if this subprocess call in webbrowser.py has anything to do with it.

xdg-settings get default-web-browser, which gets me:

firefox_firefox.desktop