You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Ubuntu 14.04 with Atom Shell 0.22.3 require('shell').openExternal('http://github.com') does not seem to work. I have both Firefox and Chromium installed on that VM.
@kevinsawicki does xdg-open http://github.com work on your VM ?
agree with @lee-dohm , would a boolean status suffice or a reason for failure needs to be thrown, the latter needs some work.
I have the same problem. I'm using i3-wm where I manually start gnome-settings-daemon to do the environment stuff. I'm exporting BROWSER="firefox" through ~/.bashrc, and have it set in the GNOME control center. xdg-open <http-link> does work, although it opens the link in chromium for some reason.
chrome complains about something and doesn't quit:
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
then Chromium starts up. If I leave away the --no-sandbox flag then I get a similar error as in #1348 (comment)
[9784:0416/151609:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
App load time: 224ms
...
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
The program 'atom' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 789 error_code 3 request_code 40 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Most likely setting the flag --disable-setuid-sandbox will be already sufficient so that Chromium correctly starts up, but of course from security aspect it's very critical to disable the sandbox or setuid-sanbox.
With Firefox as default browser I had no issues and shell.openExternal works for me. I've changed the default browser via sudo update-alternatives --config x-www-browser
If chrome/chromium is already started the, --no-sandbox does nothing harmful, since the new not-sandboxed instance will just tell the other sandboxed instance to open a new tab, that tab is then sandboxed. The culprit is just if no browser is open already. First it will open the chrome/chromium not-sandboxed and second xdg-open will still block and freeze atom.
I can't see how this is anything but a Chrome bug, maybe file it on their issue tracker? If they don't work with xdg-open then that's a big problem that is unrelated to Atom
Not sure if it's a pure Chrome bug. If I run xdg-open directly from the shell with Chromium as default browser it works. Also in my example above #1348 (comment) I don't use xdg-open at all but still face the same issue. Seems like the Node process environment of electron doesn't behave well with Chromium so that it fails to run the setuid sandbox as root in case the Chromium process gets spawned out of electron (whyever Chromium wants to do such...)
Activity
lee-dohm commentedon Apr 2, 2015
Also see: https://discuss.atom.io/t/none-of-the-menu-items-under-help-work/15818
Is it possible to make
openExternalthrow an exception if it fails so that situations like these can display a meaningful error message?deepak1556 commentedon Apr 4, 2015
@kevinsawicki does
xdg-open http://github.comwork on your VM ?agree with @lee-dohm , would a boolean status suffice or a reason for failure needs to be thrown, the latter needs some work.
jplatte commentedon Apr 4, 2015
I have the same problem. I'm using i3-wm where I manually start gnome-settings-daemon to do the environment stuff. I'm exporting
BROWSER="firefox"through~/.bashrc, and have it set in the GNOME control center.xdg-open <http-link>does work, although it opens the link in chromium for some reason.despairblue commentedon Apr 8, 2015
could this be linked to atom/settings-view#456 ?
jplatte commentedon Apr 8, 2015
@despairblue Yeah, seems like the same problem.
despairblue commentedon Apr 9, 2015
Found my problem:
5. everyone waits...despairblue commentedon Apr 9, 2015
btw: installing https://aur.archlinux.org/packages/mimi-git/ and https://aur.archlinux.org/packages/xdg-utils-no-open/ fixes it. But that is only a workaround.
despairblue commentedon Apr 9, 2015
ah, not quite, it simply forks the never quitting chrome instance into the background and returns, which at least does not lock up atom.
subesokun commentedon Apr 20, 2015
Not sure if this information helps to track down the issue, but when manually spawning a process like
{spawn} = require 'child_process' cmd = spawn('chromium-browser', ['--no-sandbox', 'https://www.google.com'])then Chromium starts up. If I leave away the
--no-sandboxflag then I get a similar error as in #1348 (comment)Most likely setting the flag
--disable-setuid-sandboxwill be already sufficient so that Chromium correctly starts up, but of course from security aspect it's very critical to disable the sandbox or setuid-sanbox.With Firefox as default browser I had no issues and
shell.openExternalworks for me. I've changed the default browser viasudo update-alternatives --config x-www-browserEdit: Maybe also this link helps for better understanding of the Chromium sandbox concept https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
despairblue commentedon Apr 20, 2015
If chrome/chromium is already started the,
--no-sandboxdoes nothing harmful, since the new not-sandboxed instance will just tell the other sandboxed instance to open a new tab, that tab is then sandboxed. The culprit is just if no browser is open already. First it will open the chrome/chromium not-sandboxed and second xdg-open will still block and freeze atom.anaisbetts commentedon Apr 20, 2015
I can't see how this is anything but a Chrome bug, maybe file it on their issue tracker? If they don't work with
xdg-openthen that's a big problem that is unrelated to Atomsubesokun commentedon Apr 20, 2015
Not sure if it's a pure Chrome bug. If I run xdg-open directly from the shell with Chromium as default browser it works. Also in my example above #1348 (comment) I don't use xdg-open at all but still face the same issue. Seems like the Node process environment of electron doesn't behave well with Chromium so that it fails to run the setuid sandbox as root in case the Chromium process gets spawned out of electron (whyever Chromium wants to do such...)
subesokun commentedon Apr 20, 2015
It seems to be also not a particular bug of Node as this small script works without problem when running directly via Node
zcbenz commentedon Apr 22, 2015
Fixed by #1454.
project0 commentedon Aug 21, 2015
still doesnt work on linux and chromium.