Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Open

Failed to run Firefox in headless mode under Ubuntu

Mehmood-Ul-hassan replied
Nguyễn Hồng Quân

Anyone succeed with running Firefox in headless mode under Ubuntu?

I tried:

firefox --headless --safe-mode -P headless https://quan.hoabinh.vn

but got this error:

[12545] Sandbox: CanCreateUserNamespace() unshare(CLONE_NEWPID): EPERM

      • You are running in headless mode.

[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt

I installed Firefox as from "https://packages.mozilla.org/apt" repo.

Anyone succeed with running Firefox in headless mode under Ubuntu? I tried: firefox --headless --safe-mode -P headless https://quan.hoabinh.vn but got this error: [12545] Sandbox: CanCreateUserNamespace() unshare(CLONE_NEWPID): EPERM *** You are running in headless mode. [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt I installed Firefox as from "https://packages.mozilla.org/apt" repo.

All Replies (6)

Tried:

firefox --headless --safe-mode --profile ~/.mozilla/firefox-headless/ h ttps://quan.hoabinh.vn

but still not work.

And how do you recognize "not work"? Did the URL not get requested (probably telling by server logs)?

According to bugzilla.mozilla.org/1693011 the RenderCompositorSWGL log is expected to be printed; however it's not related to functioning or not. The browser says "You are running in headless mode." so you probably are?

Yes, I checked the Nginx logs on the server and did not see the requests. Also, tried with `--screenshot /tmp/screenshots/`, not see any files created in "/tmp/screenshots/".

And the profile is otherwise able to launch, remembers its settings between restarts from this path etc. when you run it repeatedly as:

 firefox --profile ~/.mozilla/firefox-headless/ --no-remote --new-instance

and it's not getting stuck on some onboarding and similar?

Yes, this command

``` firefox --profile ~/.mozilla/firefox-headless/ --no-remote --new-instance ```

seems to remember its settings when I run repeatedly.

Since the profile launches normally and remembers its settings, have you tried running the same command with --headless added to that working profile command and checking whether the request then appears in the Nginx logs?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.