From 7f39da0b9581223c6cd0f2d977c74d81c6ddcf77 Mon Sep 17 00:00:00 2001 From: Henk Kalkwater Date: Sun, 22 Aug 2021 14:48:22 +0200 Subject: [PATCH] Make sandboxing the default, remove the cli-option SailfishOS 4.0.1 has been out for over half a year now, sandboxing should have wide support by now. --- sailfish/harbour-sailfin.desktop | 5 ++--- sailfish/src/harbour-sailfin.cpp | 15 --------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/sailfish/harbour-sailfin.desktop b/sailfish/harbour-sailfin.desktop index 8984d91..25ce959 100644 --- a/sailfish/harbour-sailfin.desktop +++ b/sailfish/harbour-sailfin.desktop @@ -1,10 +1,9 @@ [Desktop Entry] Type=Application Version=1.1 -X-Nemo-Application-Type=silica-qt5 +# X-Nemo-Application-Type=silica-qt5 Icon=harbour-sailfin -Exec=harbour-sailfin --no-attempt-sandbox - +Exec=/usr/bin/sailjail -p harbour-sailfin.desktop /usr/bin/harbour-sailfin Name=Sailfin # translation example: diff --git a/sailfish/src/harbour-sailfin.cpp b/sailfish/src/harbour-sailfin.cpp index e592501..6b13d8c 100644 --- a/sailfish/src/harbour-sailfin.cpp +++ b/sailfish/src/harbour-sailfin.cpp @@ -56,29 +56,14 @@ int main(int argc, char *argv[]) { //: Application display name app->setApplicationDisplayName(QObject::tr("Sailfin")); - bool canSanbox = QFile::exists(SANDBOX_PROGRAM); QCommandLineParser cmdParser; cmdParser.addHelpOption(); cmdParser.addVersionOption(); - QCommandLineOption sandboxOption("no-attempt-sandbox", app->translate("Command line argument description", "Try to not start with FireJail.")); - if (canSanbox) { - cmdParser.addOption(sandboxOption); - } - cmdParser.process(*app); - - if (canSanbox && !cmdParser.isSet(sandboxOption)) { - qDebug() << "Restarting in sandbox mode"; - QProcess::execute(QString(SANDBOX_PROGRAM), - QStringList() << "-p" << "harbour-sailfin.desktop" << "harbour-sailfin"); - return 0; - } - Jellyfin::registerTypes(); QQuickView *view = SailfishApp::createView(); view->setSource(SailfishApp::pathToMainQml()); view->show(); - qDebug() << "QML import paths: " << view->engine()->importPathList(); return app->exec(); }