diff --git a/src/effects/screenshot/screenshotdbusinterface1.cpp b/src/effects/screenshot/screenshotdbusinterface1.cpp index dce7ce89df..251b43f870 100644 --- a/src/effects/screenshot/screenshotdbusinterface1.cpp +++ b/src/effects/screenshot/screenshotdbusinterface1.cpp @@ -507,6 +507,11 @@ bool ScreenShotDBusInterface1::checkCall() const return false; } + static bool permissionCheckDisabled = qEnvironmentVariableIntValue("KWIN_SCREENSHOT_NO_PERMISSION_CHECKS") == 1; + if (permissionCheckDisabled) { + return true; + } + const QDBusReply reply = connection().interface()->servicePid(message().service()); if (reply.isValid()) { const uint pid = reply.value(); diff --git a/src/effects/screenshot/screenshotdbusinterface2.cpp b/src/effects/screenshot/screenshotdbusinterface2.cpp index d0c6bd9910..d771f0e5bb 100644 --- a/src/effects/screenshot/screenshotdbusinterface2.cpp +++ b/src/effects/screenshot/screenshotdbusinterface2.cpp @@ -286,6 +286,11 @@ bool ScreenShotDBusInterface2::checkPermissions() const return false; } + static bool permissionCheckDisabled = qEnvironmentVariableIntValue("KWIN_SCREENSHOT_NO_PERMISSION_CHECKS") == 1; + if (permissionCheckDisabled) { + return true; + } + const QDBusReply reply = connection().interface()->servicePid(message().service()); if (reply.isValid()) { const uint pid = reply.value();