Skip to content

openExternal doesn't open browser on Linux #623

Closed

Description

@rychlis

When trying to open external URL using openExternal:
require('shell').openExternal('http://google.com')

The call doesn't open browser at all and outputs following error into console:

The setuid sandbox is not running as root. Common causes:
  * An unprivileged process using ptrace on it, like a debugger.
  * A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...)
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted

It does work when I run atom shell as root, that's not really usable for production though.

OpenExternal also works without any issues for mailto urls (like require('shell').openExternal('mailto:[email protected]').

My system is Arch Linux with xfce dm, xdg-open works fine when runned from a terminal. Tried this on a Ubuntu 14.04 box with a same result.

Activity

  1. rychlis commented on Sep 2, 2014

    @rychlis
    Author

    Just to make the bugreport complete, I'm using the x64 v0.15.9 release. If you need any more information, let me know :)

  2. kevinsawicki commented on Sep 2, 2014

    @kevinsawicki
    Contributor
  3. zcbenz commented on Sep 5, 2014

    @zcbenz
    Contributor

    Somehow atom-shell had found the sandbox installed by chrome/chromium browser and tried to use that sandbox to execute xdg-open.

  4. zcbenz commented on Sep 5, 2014

    @zcbenz
    Contributor

    Well, when you have chrome browser installed as default browser openExternal will open the url with it, and because atom-shell's render process is created with PR_SET_NO_NEW_PRIVS, chrome browser can not start with sandbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions