* Problem contacting Firefox from Emacs daemon started as systemd service
@ 2021-01-21 19:14 Sébastien Gendre
2021-01-21 20:01 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Gendre @ 2021-01-21 19:14 UTC (permalink / raw)
To: help-gnu-emacs
Hello.
I start an Emacs daemon at the start of my session with a systemd (user)
service. When I try to open an URL from Emacs, I got this error message
from Firefox:
Firefox is already running, but is not responding. The old Firefox
process must be closed to open a new window.
But if I call this command from a simple terminal:
firefox https://fsf.org
In Firefox, a new tab open on the FSF website, with no problem.
`browse-url-browser-function` value is `browse-url-default-browser`. That
mean Emacs call xdg-open, who call firefox command.
Have you an idea about this problem ? I can't found anything on the web.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem contacting Firefox from Emacs daemon started as systemd service
2021-01-21 19:14 Problem contacting Firefox from Emacs daemon started as systemd service Sébastien Gendre
@ 2021-01-21 20:01 ` Eli Zaretskii
2021-01-21 20:53 ` Sébastien Gendre
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2021-01-21 20:01 UTC (permalink / raw)
To: help-gnu-emacs
> From: Sébastien Gendre <seb@k-7.ch>
> Date: Thu, 21 Jan 2021 20:14:59 +0100
>
> I start an Emacs daemon at the start of my session with a systemd (user)
> service. When I try to open an URL from Emacs, I got this error message
> from Firefox:
>
> Firefox is already running, but is not responding. The old Firefox
> process must be closed to open a new window.
>
> But if I call this command from a simple terminal:
> firefox https://fsf.org
>
> In Firefox, a new tab open on the FSF website, with no problem.
>
> `browse-url-browser-function` value is `browse-url-default-browser`. That
> mean Emacs call xdg-open, who call firefox command.
>
>
> Have you an idea about this problem ? I can't found anything on the web.
The 'firefox' command line asks the existing instance of Firefox to
display the URL, whereas xdg-open tries to start a new instance.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem contacting Firefox from Emacs daemon started as systemd service
2021-01-21 20:01 ` Eli Zaretskii
@ 2021-01-21 20:53 ` Sébastien Gendre
2021-01-22 7:04 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Gendre @ 2021-01-21 20:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Thanks for your reply.
If I run the Firefox command from a shell in Emacs, I got the same
problem as when I try to open an url from Emacs.
Eli Zaretskii writes:
>> From: Sébastien Gendre <seb@k-7.ch>
>> Date: Thu, 21 Jan 2021 20:14:59 +0100
>>
>> I start an Emacs daemon at the start of my session with a systemd (user)
>> service. When I try to open an URL from Emacs, I got this error message
>> from Firefox:
>>
>> Firefox is already running, but is not responding. The old Firefox
>> process must be closed to open a new window.
>>
>> But if I call this command from a simple terminal:
>> firefox https://fsf.org
>>
>> In Firefox, a new tab open on the FSF website, with no problem.
>>
>> `browse-url-browser-function` value is `browse-url-default-browser`. That
>> mean Emacs call xdg-open, who call firefox command.
>>
>>
>> Have you an idea about this problem ? I can't found anything on the web.
>
> The 'firefox' command line asks the existing instance of Firefox to
> display the URL, whereas xdg-open tries to start a new instance.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem contacting Firefox from Emacs daemon started as systemd service
2021-01-21 20:53 ` Sébastien Gendre
@ 2021-01-22 7:04 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2021-01-22 7:04 UTC (permalink / raw)
To: help-gnu-emacs
> From: Sébastien Gendre <seb@k-7.ch>
> Cc: help-gnu-emacs@gnu.org
> Date: Thu, 21 Jan 2021 21:53:32 +0100
>
> If I run the Firefox command from a shell in Emacs, I got the same
> problem as when I try to open an url from Emacs.
Maybe some shell alias is involved?
I don't have a complete and ready solution to your problem, it's
something you will have to investigate. I thought I'd give you the
information I do have to point you in the right direction, since you
said you don't find anything pertinent on the Internet. The problem
here is that you need to tell Firefox to use the existing running
instance to display the new URL. Both browse-url-browser-function
and/or browse-url-default-browser should be taught to do that. I
suggest to try using browse-url-firefox as your first step. If that
works, customize browse-url-browser-function to use it. If that
doesn't work, I suggest to search the Firefox Help information for the
solution to this problem, starting from the error message you get.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-22 7:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-21 19:14 Problem contacting Firefox from Emacs daemon started as systemd service Sébastien Gendre
2021-01-21 20:01 ` Eli Zaretskii
2021-01-21 20:53 ` Sébastien Gendre
2021-01-22 7:04 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).