Am 24.07.22 um 23:19 schrieb Carlos E. R.:
On 24/07/2022 22.35, Daniel Bauer wrote:
Am 24.07.22 um 13:47 schrieb Carlos E. R.:
Hi,
When I click on a link in an email in Thundebird, it stays silent for some seconds, then says that "Firefox is alreadu running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different process".
I have many different firefox profiles, and want to open links in mails (thunderbird) automatically in always the same (default) profile. I use KDE though, so I am not sure if this helps:
the command to open my default profile is firefox %u
the command for the other profiles is firefox -no-remote -P profileName
Yes, I know that. The problem is how to tell Thunderbird that, because things are not that easy as Thunderbird has to use the default web browser that the user selected in whatever desktop the user is using. And each desktop does this differently and saves this in different places.
Those with "no-remote" can only be started once, i.e. to open a new window of the same profile I must go over the firefox menu file->new window. If I try to open that profile again from command line or a link I get the message you described.
The firefox started without "no-remote" can be opened "unlimited" times.
The problem occurs when I open firefox from console with "firefox -P". Then it shows the dialog to chose the desired profile and you have to be careful and UNcheck "Use selected profile profile without asking".
If you used another profile without unchecking this in that dialog, the next time firefox is called it will try to open that other profile and if already a window is open of that profile it will grump with the message you've seen.
Apparently, it is using this:
X-XFCE-Binaries=firefox;firefox-gtk2;firefox-gtk;mozilla-firefox; X-XFCE-Category=WebBrowser X-XFCE-Commands=%B; X-XFCE-CommandsWithParameter=%B "%s";
And there is no "noremote" there.
You must start once with "firefox -P", chose the default profile you want to be opened without asking, and this time check that box "open without asking".
From then on it should work normal again.
No, that doesn't work.
Because when (hours later) I open manually a different profile from the command line, using:
firefox --ProfileManager --no-remote &
it changes the default, unless I remember to unclick that box.
What I need is find what exact file contains the definition of the browser to use (in XFCE, as user, not root), and edit it to contain the correct information.
So, I edited just now the file ~/.local/share/applications/firefox.desktop
and added "--no-remote" in three places:
...
Actions=new-window;PrivateBrowsing;ProfileManager
Path=
[Desktop Action new-window] Name=New Window Exec=firefox --new-window %u --no-remote
[Desktop Action PrivateBrowsing] Name=New Private Browsing Window Exec=firefox --private-window %u --no-remote
[Desktop Action ProfileManager] Name=Profile Manager Exec=firefox --ProfileManager --no-remote
And now I get the profile popup. After a moment, again I get the popup I got initially with the same error.
So I close all my firefox windows, and try again. I get the profile question, and this time firefox starts and opens the link. I click a second time on the same link, and this time it works without any complaint.
Well, issue solved! Thanks for the hint.
My file now has:
...
Actions=new-window;PrivateBrowsing;ProfileManager
Path=
[Desktop Action new-window] Name=New Window Exec=firefox -P default --new-window %u --no-remote
[Desktop Action PrivateBrowsing] Name=New Private Browsing Window Exec=firefox -P default --private-window %u --no-remote
[Desktop Action ProfileManager] Name=Profile Manager Exec=firefox --ProfileManager --no-remote
I think these exec lines should be different: in the .desktop files for your "other" browser profiles add the profile name: Exec=firefox -no-remote -P profileName (so it doesn't ask you which profile because you already defined it) in the .desktop file for your default browser remove the -no-remote -P profileName: Exec=firefox %u Then open firefox from command line with firefox -P select your default profile, check "don't ask". It should work from now on, also after logout/in, reboot... -- Daniel Bauer photographer Basel Málaga https://www.patreon.com/danielbauer https://www.daniel-bauer.com