3

I have firefox session open. I want to open an URL from crontab. But I want crontab to open the URL in my currently open firefox window/session.

My crontab entry is:

* * * * * export DISPLAY=:0 && /usr/bin/firefox "https://askubuntu.com"

But I got an error message like:

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.

firefox profile is already in use notification

I am on Xubuntu 24.04

podcast
  • 106

1 Answers1

1

I could achieve to open an URL in already opened firefox window / session from cron by the following entry.

* * * * * export XDG_RUNTIME_DIR="/run/user/$(id -u)"; export DISPLAY=:0; /usr/bin/firefox  "https://askubuntu.com"

By the way, I am not sure if it is related but I uninstalled firefox snap version and installed it from deb package as it described at: https://support.mozilla.org/en-US/kb/install-firefox-linux

podcast
  • 106