GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
208 stars 62 forks source link

Fix sandbox error on AppImage startup on certain linux systems #4458

Closed cmdcolin closed 5 months ago

cmdcolin commented 5 months ago

Fixes #4457

This is adapted from a script I found that replaces the AppImage launcher script with a bash one-liner that adds the no-sandbox flag

https://github.com/d3473r/jitsi-meet-electron/commit/11b9348f117a87349917c252cbae203cf92062a8

there were other things that discussed adding the no-sandbox flag via the 'main' process with app.appendSwitch('--no-sandbox') but this did not work for me

I also add --no-sandbox to the devmode script. This is a little 'heavy handed' but it only affects dev mode

cmdcolin commented 5 months ago

tested by running "yarn build-electron:linux" and running the produced AppImage script in the dist folder

cmdcolin commented 5 months ago

there is a slightly more sophisticated version of this script here that checks for the suid permissions before adding no-sandbox https://github.com/gergof/electron-builder-sandbox-fix/blob/master/lib/index.js but it might be ok to just use the always no-sandbox solution...