{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/3169","labels_url":"https://api.github.com/repos/neovim/neovim/issues/3169/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/3169/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/3169/events","html_url":"https://github.com/neovim/neovim/issues/3169","id":101043937,"number":3169,"title":"system(): gvfs-open with firejail via shell script fails in Neovim, but not Vim (stderr related)","user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neovim/neovim/labels/waiting","name":"waiting","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-14T16:08:50Z","updated_at":"2015-08-14T20:17:29Z","closed_at":null,"body":"I've noticed that `gvfs-open http://www.example.com`, which is called from `xdg-open` fails in Neovim, but not Vim with my setup.\r\n\r\n    % gvfs-mime --query x-scheme-handler/http\r\n    Default application for 'x-scheme-handler/http': open-in-running-browser.desktop\r\n\r\n`open-in-running-browser` is a script that basically calls a browser, which is `firefox` in this case.\r\n\r\n`firefox` is a shell script/wrapper to use [firejail](https://l3net.wordpress.com/projects/firejail/):\r\n\r\n    #!/bin/sh\r\n    firejail /usr/bin/firefox \"$@\"\r\n\r\nCalling this script directly from Neovim works, but it is the call via `gvfs-open` that triggers the issue.\r\n\r\nTEST CASE:\r\n    1. Setup `gvfs-open` to call a script with `firejail /usr/bin/firefox \"$@\"`\r\n    2. nvim -u NONE -c 'echo system(\"gvfs-open http://example.com\")'\r\n\r\nThe page won't be opened.\r\n\r\nI've noticed that redirecting stderr to a file or /dev/null will not trigger the issue (but redirecting it to stdout still does):\r\n\r\n    nvim -u NONE -c 'echo system(\"gvfs-open http://example.com 2>/tmp/1\")'\r\n\r\nWhen calling it manually, this is the output:\r\n\r\n    Reading profile /etc/firejail/firefox.profile                                🐍 ? \r\n    Reading profile /etc/firejail/disable-mgmt.inc\r\n    Reading profile /etc/firejail/disable-secret.inc\r\n    Parent pid 17817, child pid 17818\r\n    Interface           IP                  Mask                Status              \r\n    lo                  127.0.0.1           255.0.0.0           UP                  \r\n    wlan0               192.168.178.33      255.255.255.0       UP                  \r\n    lxcbr0              10.0.3.1            255.255.255.0       UP                  \r\n\r\n    Child process initialized\r\n\r\n    (process:1): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed\r\n\r\n    parent is shutting down, bye...\r\n\r\nWhere this is stderr:\r\n\r\n    % gvfs-open http://example.com >/dev/null\r\n    Reading profile /etc/firejail/firefox.profile\r\n    Reading profile /etc/firejail/disable-mgmt.inc\r\n    Reading profile /etc/firejail/disable-secret.inc\r\n\r\n    (process:1): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed\r\n\r\nI've thought that maybe writing something to stderr in general triggers this issue, but the following works at least:\r\n\r\n    nvim -u NONE -c 'echo system(\"echo stderr >&2\")'\r\n\r\n\r\nfirejail 0.9.26-1, but also with 0.9.28-1.\r\ngvfs: 1.24.1-1ubuntu1"},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/131228903","html_url":"https://github.com/neovim/neovim/issues/3169#issuecomment-131228903","issue_url":"https://api.github.com/repos/neovim/neovim/issues/3169","id":131228903,"user":{"login":"netblue30","id":13711990,"avatar_url":"https://avatars.githubusercontent.com/u/13711990?v=3","gravatar_id":"","url":"https://api.github.com/users/netblue30","html_url":"https://github.com/netblue30","followers_url":"https://api.github.com/users/netblue30/followers","following_url":"https://api.github.com/users/netblue30/following{/other_user}","gists_url":"https://api.github.com/users/netblue30/gists{/gist_id}","starred_url":"https://api.github.com/users/netblue30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netblue30/subscriptions","organizations_url":"https://api.github.com/users/netblue30/orgs","repos_url":"https://api.github.com/users/netblue30/repos","events_url":"https://api.github.com/users/netblue30/events{/privacy}","received_events_url":"https://api.github.com/users/netblue30/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T20:17:29Z","updated_at":"2015-08-14T20:17:29Z","body":"Hi blueyed, firejail author here. I've recently moved to https://github.com/netblue30/firejail\r\n\r\nI think, and I might be wrong, that when you start firefox you already have another firefox instance running.\r\n\r\n```\r\n$ firejail firefox\r\nReading profile /etc/firejail/firefox.profile                                \r\nReading profile /etc/firejail/disable-mgmt.inc\r\nReading profile /etc/firejail/disable-secret.inc\r\nParent pid 17817, child pid 17818\r\nInterface           IP                  Mask                Status              \r\nlo                  127.0.0.1           255.0.0.0           UP                  \r\nwlan0               192.168.178.33      255.255.255.0       UP                  \r\nlxcbr0              10.0.3.1            255.255.255.0       UP                  \r\n\r\nChild process initialized\r\n\r\n(process:1): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed\r\n\r\nparent is shutting down, bye...\r\n```\r\n\r\nBy default Firefox keeps only one browser process running. When you start a new Firefox process, it looks for an existing one. If one is found, the new process shuts down, and the existing one opens a new tab or a new window. In this case firejail will also shut down, printing \"parent is shutting down, bye...\".\r\n"}}