From 5f06f16172d616bbee2ff3c8bcc46fd31537fbb2 Mon Sep 17 00:00:00 2001 From: jackson Date: Tue, 28 Jun 2022 11:25:59 -0500 Subject: [PATCH] Move and Document Dissable Sandbox - Set Dissable Sandbox in app.py - Include explanation comment - Remove Dissable Sandbox from appimage specific script. --- installer/launch-linux.sh | 5 ----- src/classes/app.py | 5 +++++ src/windows/views/webview_backend/webengine.py | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/installer/launch-linux.sh b/installer/launch-linux.sh index 8ae23c62a..cd327d730 100755 --- a/installer/launch-linux.sh +++ b/installer/launch-linux.sh @@ -32,11 +32,6 @@ export LD_LIBRARY_PATH="${HERE}" # Set some environment variables export QT_PLUGIN_PATH="${HERE}" -# Disable sandbox support for QtWebEngine (required on some Linux distros -# for the QtWebEngineWidgets to be rendered, otherwise no timeline is visible). -# https://doc.qt.io/qt-5/qtwebengine-platform-notes.html#sandboxing-support -export QTWEBENGINE_DISABLE_SANDBOX="1" - # For Debian-based systems with newer openssl, see: # https://github.com/OpenShot/openshot-qt/issues/3242 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918727 diff --git a/src/classes/app.py b/src/classes/app.py index 4c37cb31d..e0c291cdd 100644 --- a/src/classes/app.py +++ b/src/classes/app.py @@ -37,6 +37,11 @@ import json from PyQt5.QtCore import PYQT_VERSION_STR, QT_VERSION_STR, pyqtSlot from PyQt5.QtWidgets import QApplication, QStyleFactory, QMessageBox +# Disable sandbox support for QtWebEngine (required on some Linux distros +# for the QtWebEngineWidgets to be rendered, otherwise no timeline is visible). +# https://doc.qt.io/qt-5/qtwebengine-platform-notes.html#sandboxing-support +os.environ["QTWEBENGINE_DISABLE_SANDBOX"] = "1" + def get_app(): """ Get the current QApplication instance of OpenShot """ diff --git a/src/windows/views/webview_backend/webengine.py b/src/windows/views/webview_backend/webengine.py index af6573d4b..0a743ca93 100644 --- a/src/windows/views/webview_backend/webengine.py +++ b/src/windows/views/webview_backend/webengine.py @@ -47,7 +47,6 @@ class LoggingWebEnginePage(QWebEnginePage): '%s@L%d: %s', os.path.basename(source), line, msg) def __init__(self, parent=None): - os.environ["QTWEBENGINE_DISABLE_SANDBOX"] = "1" super().__init__(parent=parent) self.setObjectName("LoggingWebEnginePage") self.levels = [logging.INFO, logging.WARNING, logging.ERROR]