diff --git a/src/remotedesktop.cpp b/src/remotedesktop.cpp index 44ceebcf..8146df20 100644 --- a/src/remotedesktop.cpp +++ b/src/remotedesktop.cpp @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include "permission_store.h" @@ -224,7 +226,10 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle, notification->setIconName(QStringLiteral("krfb")); notification->sendEvent(); } else { - if (!isAppMegaAuthorized(app_id)) { // authorize right away + auto cfg = KSharedConfig::openConfig(QStringLiteral("plasmaremotedesktoprc")); + const auto unattendedAccess = cfg->group("Sharing").readEntry("Unattended", false); + if (!unattendedAccess || !isAppMegaAuthorized(app_id)) // authorize right away + { QScopedPointer remoteDesktopDialog( new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->persistMode())); Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);