From f65fc68179a374bf48ec4f81dbcb80c11218b433 Mon Sep 17 00:00:00 2001 From: Julen Garcia Leunda Date: Thu, 19 Sep 2019 22:14:21 +0200 Subject: [PATCH] Add --no-sandbox option to desktop files --- package.json | 2 +- static/linux/webtorrent-desktop.ejs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6db88aa215..c06ee3dd16 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "install-system-deps": "brew install fakeroot dpkg rpm", "open-config": "node ./bin/open-config.js", "package": "node ./bin/package.js", - "start": "npm run build && electron .", + "start": "npm run build && electron --no-sandbox .", "test": "standard && depcheck --ignores=standard,babel-eslint --ignore-dirs=build,dist && node ./bin/extra-lint.js", "test-integration": "npm run build && node ./test", "update-authors": "./bin/update-authors.sh", diff --git a/static/linux/webtorrent-desktop.ejs b/static/linux/webtorrent-desktop.ejs index af143b6e6a..e88789cc6e 100644 --- a/static/linux/webtorrent-desktop.ejs +++ b/static/linux/webtorrent-desktop.ejs @@ -5,7 +5,7 @@ Name=<%= productName %> <% if (genericName) { %>GenericName=<%= genericName %><% } %> <% if (description) { %>Comment=<%= description %><% } %> Icon=<%= name %> -<% if (name) { %>Exec=<%= name %> %U<% } %> +<% if (name) { %>Exec=<%= name %> --no-sandbox %U<% } %><%/*HACK: --no-sandbox fixes an Electron 6 bug. See: #1703*/%> Terminal=false Actions=CreateNewTorrent;OpenTorrentFile;OpenTorrentAddress; <% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>;<% } %> @@ -15,12 +15,12 @@ StartupNotify=true [Desktop Action CreateNewTorrent] Name=Create New Torrent... -<% if (name) { %>Exec=<%= name %> -n <% } %> +<% if (name) { %>Exec=<%= name %> --no-sandbox -n <% } %><%/*HACK: --no-sandbox fixes an Electron 6 bug. See: #1703*/%> [Desktop Action OpenTorrentFile] Name=Open Torrent File... -<% if (name) { %>Exec=<%= name %> -o <% } %> +<% if (name) { %>Exec=<%= name %> --no-sandbox -o <% } %><%/*HACK: --no-sandbox fixes an Electron 6 bug. See: #1703*/%> [Desktop Action OpenTorrentAddress] Name=Open Torrent Address... -<% if (name) { %>Exec=<%= name %> -u <% } %> +<% if (name) { %>Exec=<%= name %> --no-sandbox -u <% } %><%/*HACK: --no-sandbox fixes an Electron 6 bug. See: #1703*/%>