diff --git a/.gitignore b/.gitignore
index 63b1fefcd..b3a953127 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,6 @@ tests/report/*
.cursor/
# for snipe
src/global_util/dbus/*
+obj-x86_64-linux-gnu/
+.debhelper/
+.codegraph/
diff --git a/misc/images/remote_login.svg b/misc/images/remote_login.svg
new file mode 100644
index 000000000..c301957ae
--- /dev/null
+++ b/misc/images/remote_login.svg
@@ -0,0 +1,8 @@
+
+
diff --git a/resources.qrc b/resources.qrc
index 51feaad80..2068e00fd 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -8,6 +8,7 @@
misc/images/login_wait.svg
misc/images/password_hint.svg
misc/images/select.svg
+ misc/images/remote_login.svg
misc/images/auth/face.svg
misc/images/auth/passkey.svg
misc/images/auth/fingerprint.svg
diff --git a/src/app/lightdm-deepin-greeter.cpp b/src/app/lightdm-deepin-greeter.cpp
index c72fee2bd..3babdbc95 100644
--- a/src/app/lightdm-deepin-greeter.cpp
+++ b/src/app/lightdm-deepin-greeter.cpp
@@ -13,6 +13,8 @@
#include "sessionbasemodel.h"
#include "public_func.h"
#include "plugin_manager.h"
+#include "fullscreenbackground.h"
+#include "warningcontent.h"
#ifndef ENABLE_DSS_SNIPE
#include
@@ -143,11 +145,22 @@ int main(int argc, char* argv[])
// 初始化LoginContent
LoginContent::instance()->init(model);
+ WarningContent::instance()->setModel(model);
QObject::connect(LoginContent::instance(), &LoginContent::requestSwitchToUser, worker, &GreeterWorker::switchToUser);
QObject::connect(LoginContent::instance(), &LoginContent::requestSetLayout, worker, &GreeterWorker::setKeyboardLayout);
QObject::connect(LoginContent::instance(), &LoginContent::requestCheckAccount, worker, &GreeterWorker::checkAccount);
QObject::connect(LoginContent::instance(), &LoginContent::requestCheckSameNameAccount, worker, &GreeterWorker::checkSameNameAccount);
QObject::connect(worker, &GreeterWorker::requestShowUsersWithTheSameName, LoginContent::instance(), &LoginContent::showUsersWithTheSameName);
+ QObject::connect(worker, &GreeterWorker::requestShowActiveSessionConfirm, WarningContent::instance(), &WarningContent::showActiveSessionConfirm);
+ QObject::connect(worker, &GreeterWorker::requestShowActiveSessionLoading, WarningContent::instance(), &WarningContent::showActiveSessionLoading);
+ QObject::connect(worker, &GreeterWorker::requestHideActiveSessionOverlay, WarningContent::instance(), &WarningContent::hideActiveSessionOverlay);
+ QObject::connect(worker, &GreeterWorker::requestShowRemoteUserLimitMessage, WarningContent::instance(), &WarningContent::showRemoteUserLimitMessage);
+ QObject::connect(WarningContent::instance(), &WarningContent::requestActiveSessionOverlayHide, LoginContent::instance(), [model] {
+ FullScreenBackground::setContent(LoginContent::instance());
+ model->setCurrentContentType(SessionBaseModel::LockContent);
+ });
+ QObject::connect(WarningContent::instance(), &WarningContent::activeSessionConfirmAccepted, worker, &GreeterWorker::onActiveSessionConfirmAccepted);
+ QObject::connect(WarningContent::instance(), &WarningContent::activeSessionConfirmCanceled, worker, &GreeterWorker::onActiveSessionConfirmCanceled);
QObject::connect(LoginContent::instance(), &LoginContent::requestStartAuthentication, worker, &GreeterWorker::startAuthentication);
QObject::connect(LoginContent::instance(), &LoginContent::sendTokenToAuth, worker, &GreeterWorker::sendTokenToAuth);
QObject::connect(LoginContent::instance(), &LoginContent::requestEndAuthentication, worker, &GreeterWorker::endAuthentication);
diff --git a/src/dde-lock/lockworker.cpp b/src/dde-lock/lockworker.cpp
index e4585d4b9..92f7f3e6a 100644
--- a/src/dde-lock/lockworker.cpp
+++ b/src/dde-lock/lockworker.cpp
@@ -5,6 +5,7 @@
#include "lockworker.h"
#include "authcommon.h"
+#include "sessionconflict.h"
#include "sessionbasemodel.h"
#include "userinfo.h"
#include "login_plugin_util.h"
@@ -892,7 +893,7 @@ void LockWorker::switchToUser(std::shared_ptr user)
* 当前用户界面还未更新完成,已经切换为下一用户界面了,导致切换回来时,闪现用户列表。
* 故使用 QTimer 将切换用户的操作放在事件队列最后处理。
*/
- if (user->isLogin()) {
+ if (user->isLogin() && !SessionConflict::hasActiveSessionConflict(m_login1Inter, user->name())) {
QTimer::singleShot(0, this, [user] {
QProcess::startDetached("dde-switchtogreeter", QStringList() << user->name());
});
diff --git a/src/global_util/dbus/dbusvariant.cpp b/src/global_util/dbus/dbusvariant.cpp
index 328d5964b..da78d0e7d 100644
--- a/src/global_util/dbus/dbusvariant.cpp
+++ b/src/global_util/dbus/dbusvariant.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2015-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -90,7 +90,7 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, SeatInfo &obj)
}
SessionInfo::SessionInfo()
- : pid(-1)
+ : uid(-1)
{
}
SessionInfo::~SessionInfo() {}
@@ -105,7 +105,7 @@ void SessionInfo::registerMetaType() {
QDBusArgument &operator<<(QDBusArgument &argument, const SessionInfo &obj)
{
argument.beginStructure();
- argument << obj.session << obj.pid << obj.user << obj.id << obj.seat;
+ argument << obj.session << obj.uid << obj.user << obj.seat << obj.path;
argument.endStructure();
return argument;
}
@@ -113,7 +113,7 @@ QDBusArgument &operator<<(QDBusArgument &argument, const SessionInfo &obj)
const QDBusArgument &operator>>(const QDBusArgument &argument, SessionInfo &obj)
{
argument.beginStructure();
- argument >> obj.session >> obj.pid >> obj.user >> obj.id >> obj.seat;
+ argument >> obj.session >> obj.uid >> obj.user >> obj.seat >> obj.path;
argument.endStructure();
return argument;
}
diff --git a/src/global_util/dbus/dbusvariant.h b/src/global_util/dbus/dbusvariant.h
index daa80c49c..afad1f3f5 100644
--- a/src/global_util/dbus/dbusvariant.h
+++ b/src/global_util/dbus/dbusvariant.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2015-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -56,10 +56,10 @@ class SeatInfo {
class SessionInfo {
public:
QString session;
- qlonglong pid;
+ quint32 uid;
QString user;
- QString id;
QString seat;
+ QDBusObjectPath path;
SessionInfo();
~SessionInfo();
@@ -87,4 +87,3 @@ typedef QList SessionList;
Q_DECLARE_METATYPE(SessionInfo)
Q_DECLARE_METATYPE(SessionList)
#endif // DBUSVARIANT
-
diff --git a/src/global_util/sessionconflict.cpp b/src/global_util/sessionconflict.cpp
new file mode 100644
index 000000000..2fc11f889
--- /dev/null
+++ b/src/global_util/sessionconflict.cpp
@@ -0,0 +1,166 @@
+// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "sessionconflict.h"
+
+#include "constants.h"
+#include "dbusvariant.h"
+
+#include
+#include
+
+namespace {
+
+bool isGraphicalSessionType(const QString &type)
+{
+ return type == QLatin1String("x11") || type == QLatin1String("wayland") || type == QLatin1String("mir");
+}
+
+// 真实远程用户会话由 lightdm 启动,service 为 "lightdm";
+// greeter 登录界面的 service 是 "lightdm-greeter",不计入远程用户。
+bool isLightdmService(const QString &service)
+{
+ return service == QLatin1String("lightdm");
+}
+
+QVariant sessionProperty(const QString &sessionPath, const QString &name)
+{
+ QDBusInterface props("org.freedesktop.login1", sessionPath, "org.freedesktop.DBus.Properties",
+ QDBusConnection::systemBus());
+ QDBusReply reply = props.call("Get", "org.freedesktop.login1.Session", name);
+ if (!reply.isValid()) {
+ return QVariant();
+ }
+ return reply.value();
+}
+
+} // namespace
+
+bool SessionConflict::isCurrentSessionRemote(DBusLogin1Manager *login1Inter)
+{
+ static QPair cached {false, false}; //
+ if (cached.first) {
+ return cached.second;
+ }
+
+ if (login1Inter == nullptr || !login1Inter->isValid()) {
+ qCWarning(DDE_SHELL) << "Login1 not available, treat current session as local";
+ return false;
+ }
+
+ QDBusPendingReply sessionReply = login1Inter->GetSessionByPID(0);
+ sessionReply.waitForFinished();
+ if (!sessionReply.isValid()) {
+ return false;
+ }
+
+ const QVariant remote = sessionProperty(sessionReply.value().path(), QStringLiteral("Remote"));
+ if (!remote.isValid()) {
+ qCWarning(DDE_SHELL) << "Failed to read current session Remote property";
+ return false;
+ }
+
+ cached.first = true;
+ cached.second = remote.toBool();
+ return cached.second;
+}
+
+bool SessionConflict::hasActiveSessionConflict(DBusLogin1Manager *login1Inter, const QString &username)
+{
+ if (username.isEmpty() || username == "..." || login1Inter == nullptr || !login1Inter->isValid()) {
+ qCWarning(DDE_SHELL) << "Login1 not available, skip active session check";
+ return false;
+ }
+
+ const bool currentRemote = isCurrentSessionRemote(login1Inter);
+ qCInfo(DDE_SHELL) << "Checking active session conflicts, current remote:" << currentRemote;
+ QDBusPendingReply reply = login1Inter->ListSessions();
+ reply.waitForFinished();
+ if (!reply.isValid()) {
+ qCWarning(DDE_SHELL) << "ListSessions failed:" << reply.error().message();
+ return false;
+ }
+
+ const SessionList sessions = reply.value();
+ for (const SessionInfo &info : sessions) {
+ if (info.user != username) {
+ continue;
+ }
+
+ QDBusPendingReply sessionReply = login1Inter->GetSession(info.session);
+ sessionReply.waitForFinished();
+ if (!sessionReply.isValid()) {
+ continue;
+ }
+
+ const QString sessionPath = sessionReply.value().path();
+ const QVariant type = sessionProperty(sessionPath, QStringLiteral("Type"));
+ const QVariant remote = sessionProperty(sessionPath, QStringLiteral("Remote"));
+ if (!type.isValid() || !remote.isValid()) {
+ continue;
+ }
+
+ const QString typeValue = type.toString();
+ if (!isGraphicalSessionType(typeValue)) {
+ continue;
+ }
+
+ const bool remoteValue = remote.toBool();
+ qCInfo(DDE_SHELL) << "Found session for user" << username << ", type:" << typeValue << ", remote:" << remoteValue;
+ if ((currentRemote && !remoteValue) || (!currentRemote && remoteValue)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+int SessionConflict::countActiveRemoteUsers(DBusLogin1Manager *login1Inter, const QString &excludeUsername)
+{
+ if (login1Inter == nullptr || !login1Inter->isValid()) {
+ qCWarning(DDE_SHELL) << "Login1 not available, skip remote user count";
+ return 0;
+ }
+
+ QDBusPendingReply reply = login1Inter->ListSessions();
+ reply.waitForFinished();
+ if (!reply.isValid()) {
+ qCWarning(DDE_SHELL) << "ListSessions failed:" << reply.error().message();
+ return 0;
+ }
+
+ QSet remoteUsers;
+ const SessionList sessions = reply.value();
+ for (const SessionInfo &info : sessions) {
+ if (info.user.isEmpty() || info.user == excludeUsername) {
+ continue;
+ }
+
+ QDBusPendingReply sessionReply = login1Inter->GetSession(info.session);
+ sessionReply.waitForFinished();
+ if (!sessionReply.isValid()) {
+ continue;
+ }
+
+ const QString sessionPath = sessionReply.value().path();
+ const QVariant remote = sessionProperty(sessionPath, QStringLiteral("Remote"));
+ const QVariant service = sessionProperty(sessionPath, QStringLiteral("Service"));
+ if (!remote.isValid() || !service.isValid()) {
+ continue;
+ }
+
+ if (!remote.toBool()) {
+ continue;
+ }
+ if (!isLightdmService(service.toString())) {
+ continue;
+ }
+
+ remoteUsers.insert(info.user);
+ }
+
+ qCInfo(DDE_SHELL) << "Active remote users count:" << remoteUsers.size()
+ << ", excluding:" << excludeUsername;
+ return remoteUsers.size();
+}
diff --git a/src/global_util/sessionconflict.h b/src/global_util/sessionconflict.h
new file mode 100644
index 000000000..64ec285ee
--- /dev/null
+++ b/src/global_util/sessionconflict.h
@@ -0,0 +1,19 @@
+// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef SESSIONCONFLICT_H
+#define SESSIONCONFLICT_H
+
+#include "dbuslogin1manager.h"
+
+#include
+
+namespace SessionConflict {
+constexpr int kMaxRemoteLoginUsers = 2;
+bool isCurrentSessionRemote(DBusLogin1Manager *login1Inter);
+bool hasActiveSessionConflict(DBusLogin1Manager *login1Inter, const QString &username);
+int countActiveRemoteUsers(DBusLogin1Manager *login1Inter, const QString &excludeUsername);
+}
+
+#endif // SESSIONCONFLICT_H
diff --git a/src/lightdm-deepin-greeter/greeterworker.cpp b/src/lightdm-deepin-greeter/greeterworker.cpp
index ec31cefef..61cac585a 100644
--- a/src/lightdm-deepin-greeter/greeterworker.cpp
+++ b/src/lightdm-deepin-greeter/greeterworker.cpp
@@ -5,6 +5,8 @@
#include "greeterworker.h"
#include "greeterpasswordchange.h"
+#include "sessionconflict.h"
+
#include "authcommon.h"
#include "keyboardmonitor.h"
#include "userinfo.h"
@@ -27,6 +29,10 @@
#endif
#include
#include
+#include
+#include
+#include
+#include
#define SECURITY_ENHANCE_PATH "/com/deepin/daemon/SecurityEnhance"
#define SECURITY_ENHANCE_NAME "com.deepin.daemon.SecurityEnhance"
@@ -55,6 +61,7 @@ GreeterWorker::GreeterWorker(SessionBaseModel *const model, QObject *parent)
#endif
, m_resetSessionTimer(new QTimer(this))
, m_limitsUpdateTimer(new QTimer(this))
+ , m_forceLogoutTimer(new QTimer(this))
, m_retryAuth(false)
, m_passwordChange(new GreeterPasswordChange(this))
{
@@ -87,6 +94,9 @@ GreeterWorker::GreeterWorker(SessionBaseModel *const model, QObject *parent)
m_limitsUpdateTimer->setSingleShot(true);
m_limitsUpdateTimer->setInterval(50);
+ m_forceLogoutTimer->setSingleShot(true);
+ m_forceLogoutTimer->setInterval(15000);
+
//认证超时重启
m_resetSessionTimer->setInterval(15000);
#ifndef ENABLE_DSS_SNIPE
@@ -207,6 +217,8 @@ void GreeterWorker::initConnections()
connect(m_authFramework, &DeepinAuthFramework::SessionCreated, this, &GreeterWorker::onSessionCreated);
connect(m_authFramework, &DeepinAuthFramework::TokenAccountMismatch, this, &GreeterWorker::resetAuth);
+ connect(m_forceLogoutTimer, &QTimer::timeout, this, &GreeterWorker::onForceLogoutTimeout);
+
/* org.freedesktop.login1.Session */
connect(m_login1SessionSelf, &Login1SessionSelf::ActiveChanged, this, [this](bool active) {
qCInfo(DDE_SHELL) << "Login1SessionSelf::ActiveChanged:" << active;
@@ -262,20 +274,38 @@ void GreeterWorker::initConnections()
});
connect(m_login1Inter, &DBusLogin1Manager::SessionRemoved, this, [this] {
qCInfo(DDE_SHELL) << "DBus login1 manager session removed";
+ auto currentUser = m_model->currentUser();
+ if (!currentUser) {
+ qWarning() << "Current user is nullptr";
+ return;
+ }
+
if (m_model->updateCurrentUser(m_lockInter->CurrentUser())) {
m_model->updateAuthState(AT_All, AS_Cancel, "Cancel");
destroyAuthentication(m_account);
- if (!m_model->currentUser()->isNoPasswordLogin()) {
- createAuthentication(m_model->currentUser()->name());
+ if (!currentUser->isNoPasswordLogin()) {
+ createAuthentication(currentUser->name());
} else {
m_model->setAuthType(AT_None);
}
}
#ifndef ENABLE_DSS_SNIPE
- m_soundPlayerInter->PrepareShutdownSound(static_cast(m_model->currentUser()->uid()));
+ m_soundPlayerInter->PrepareShutdownSound(static_cast(currentUser->uid()));
#else
prepareShutdownSound();
#endif
+
+ // 处理远程桌面登录冲突场景
+ if (m_forceLogoutInProgress) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] Force logout in progress";
+ if (SessionConflict::hasActiveSessionConflict(m_login1Inter, currentUser->name())) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] Conflict still exists after SessionRemoved, keep waiting";
+ return;
+ }
+
+ qCInfo(DDE_SHELL) << "[ForceLogout] Conflict cleared by SessionRemoved, continue login";
+ continueLoginAfterForceLogout();
+ }
});
/* com.deepin.dde.LockService */
connect(m_lockInter, &DBusLockService::UserChanged, this, [this](const QString &json) {
@@ -559,9 +589,34 @@ void GreeterWorker::setCurrentUser(const std::shared_ptr user)
void GreeterWorker::switchToUser(std::shared_ptr user)
{
+ if (!user) {
+ qWarning() << "The user is about to switch is nullptr";
+ return;
+ }
+
if (*user == *m_model->currentUser()) {
+ // 需要密码的的用户开启密码认证就完事儿了
if (!m_model->currentUser()->isNoPasswordLogin()) {
createAuthentication(user->name());
+ } else {
+ // 处理无密码登录场景
+ qInfo() << "User is no password login, check session conflict";
+ if (user && SessionConflict::isCurrentSessionRemote(m_login1Inter) &&
+ SessionConflict::countActiveRemoteUsers(m_login1Inter, user->name())
+ >= SessionConflict::kMaxRemoteLoginUsers) {
+ // 超过登录限制数量的场景
+ qCInfo(DDE_SHELL) << "[RemoteUserLimit] Max remote login users reached, reject no-password login for"
+ << user->name();
+ emit requestShowRemoteUserLimitMessage();
+ } else if (user && SessionConflict::hasActiveSessionConflict(m_login1Inter, user->name())) {
+ // 登录冲突场景
+ qCInfo(DDE_SHELL) << "[ForceLogout] Active session conflict detected before LightDM respond";
+ emit requestShowActiveSessionConfirm();
+ } else if (user->isLogin() && SessionConflict::isCurrentSessionRemote(m_login1Inter)) {
+ qCInfo(DDE_SHELL) << "Remote session reconnect";
+ // 远程登录重连场景
+ startGreeterAuth(user->name());
+ }
}
return;
}
@@ -576,7 +631,15 @@ void GreeterWorker::switchToUser(std::shared_ptr user)
}
setCurrentUser(user);
- if (user->isLogin()) { // switch to user Xorg
+ // 点已登录的用户,两种情况:
+ // 走 if(直接切会话):登录界面在本地,目标用户的会话也在本地,直接切换到该用户会话。
+ // 走 else(留在登录界面输密码):
+ // 1. 目标用户没登录;
+ // 2. 登录界面和目标用户会话一个本地一个远程;
+ // 3. 当前界面和目标用户会话都是远程;
+ if (user->isLogin()
+ && !SessionConflict::isCurrentSessionRemote(m_login1Inter)
+ && !SessionConflict::hasActiveSessionConflict(m_login1Inter, user->name())) { // switch to user Xorg
QProcess::startDetached("dde-switchtogreeter", QStringList() << user->name());
} else {
m_model->updateAuthState(AT_All, AS_Cancel, "Cancel");
@@ -1033,19 +1096,21 @@ void GreeterWorker::handleAuthenticationComplete(bool result, const QString &acc
}
qCInfo(DDE_SHELL) << "Authentication result:" << result << ", retry auth" << m_retryAuth;
- if (!result) {
+ const auto currentUser = m_model->currentUser();
+ if (!result && currentUser) {
+ if (currentUser->isNoPasswordLogin() && currentUser->expiredState() != User::ExpiredAlready) {
+ qInfo() << "User is `No Password Login`, the authentication must be canceled, do nothing.";
+ return;
+ }
if (m_retryAuth && !m_model->getAuthProperty().MFAFlag) {
showMessage(tr("Wrong Password"), QLightDM::Greeter::MessageTypeError);
}
- if (!m_model->currentUser()->limitsInfo(AT_Password).locked) {
- m_authenticationLocale = m_model->currentUser()->locale();
- m_greeter->authenticate(m_model->currentUser()->name());
+ if (!currentUser->limitsInfo(AT_Password).locked) {
+ m_authenticationLocale = currentUser->locale();
+ m_greeter->authenticate(currentUser->name());
}
return;
}
-
- emit m_model->authFinished(true);
-
m_password.clear();
switch (m_model->powerAction()) {
@@ -1068,10 +1133,25 @@ void GreeterWorker::handleAuthenticationComplete(bool result, const QString &acc
DDE_EventLogger::EventLogger::instance().writeEventLog(data);
#endif
+ startSessionAfterAuth();
+}
+
+void GreeterWorker::startSessionAfterAuth()
+{
+ auto currentUser = m_model->currentUser();
+ if (!currentUser) {
+ qWarning() << "Current user is nullptr, can not start session";
+ return;
+ }
+
+ emit requestHideActiveSessionOverlay();
+ emit m_model->authFinished(true);
+
+ qCInfo(DDE_SHELL) << "Start session after auth, session:" << m_model->sessionKey();
qCInfo(DDE_SHELL) << "Start session: " << m_model->sessionKey();
- emit requestUpdateBackground(m_model->currentUser()->greeterBackground());
- setCurrentUser(m_model->currentUser());
+ emit requestUpdateBackground(currentUser->greeterBackground());
+ setCurrentUser(currentUser);
m_greeter->startSessionSync(m_model->sessionKey());
endAuthentication(m_account, AT_All);
destroyAuthentication(m_account);
@@ -1080,7 +1160,166 @@ void GreeterWorker::handleAuthenticationComplete(bool result, const QString &acc
QDBusReply reply = m_systemDaemon->call("ClearTtys");
if (!reply.isValid()) {
qCWarning(DDE_SHELL) << "Clear ttys failed, error messages: " << reply.error().message();
- };
+ }
+}
+
+void GreeterWorker::startForceLogout(const QString &username)
+{
+ qInfo() << "[ForceLogout] Start force logout, user name:" << username;
+ if (m_forceLogoutInProgress) {
+ qCWarning(DDE_SHELL) << "[ForceLogout] Already in progress, ignore repeated request";
+ return;
+ }
+
+ QDBusInterface remoteLogin(
+ "org.deepin.RemoteDesktop1",
+ "/org/deepin/RemoteDesktop1/RemoteLogin",
+ "org.deepin.RemoteDesktop1.RemoteLogin",
+ QDBusConnection::systemBus());
+ if (!remoteLogin.isValid()) {
+ qCWarning(DDE_SHELL) << "[ForceLogout] RemoteLogin interface is invalid";
+ emit m_model->authFailedTipsMessage(tr("Failed to sign out other sessions"));
+ resetAuthAfterCancel();
+ return;
+ }
+
+ m_forceLogoutInProgress = true;
+ m_forceLogoutTimedOut = false;
+ qCInfo(DDE_SHELL) << "[ForceLogout] Start for user:" << username;
+ emit requestShowActiveSessionLoading();
+
+ qCInfo(DDE_SHELL) << "[ForceLogout] Call `ForceLogoutByUser`, user name:" << username;
+ QDBusPendingReply<> reply = remoteLogin.asyncCall("ForceLogoutByUser", username, "");
+ if (m_forceLogoutWatcher) {
+ m_forceLogoutWatcher->deleteLater();
+ }
+ m_forceLogoutWatcher = new QDBusPendingCallWatcher(reply, this);
+ connect(m_forceLogoutWatcher, &QDBusPendingCallWatcher::finished,
+ this, &GreeterWorker::onForceLogoutFinished);
+ m_forceLogoutTimer->start();
+ qCInfo(DDE_SHELL) << "[ForceLogout] ForceLogoutByUser sent, wait DBus reply and SessionRemoved";
+}
+
+void GreeterWorker::resetAuthAfterCancel()
+{
+ emit requestHideActiveSessionOverlay();
+
+ // 无密码登录不需要重置认证,因为开启认证后就直接进入系统了
+ if (m_model->currentUser() && m_model->currentUser()->isNoPasswordLogin()) {
+ qInfo() << "Current user is `No password login`, do not reset auth";
+ return;
+ }
+
+ resetAuth(m_account);
+}
+
+void GreeterWorker::onActiveSessionConfirmAccepted()
+{
+ qCInfo(DDE_SHELL) << "[ForceLogout] User accepted active-session conflict confirm";
+ auto currentUser = m_model->currentUser();
+ if (!currentUser)
+ return;
+ startForceLogout(currentUser->name());
+}
+
+void GreeterWorker::onActiveSessionConfirmCanceled()
+{
+ qCInfo(DDE_SHELL) << "[ForceLogout] User canceled active-session conflict confirm";
+ resetAuthAfterCancel();
+}
+
+void GreeterWorker::onForceLogoutFinished(QDBusPendingCallWatcher *watcher)
+{
+ if (watcher == nullptr) {
+ return;
+ }
+ QDBusPendingReply<> reply = *watcher;
+ watcher->deleteLater();
+ m_forceLogoutWatcher = nullptr;
+
+ if (!m_forceLogoutInProgress) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] Reply received but force logout not in progress, ignore";
+ return;
+ }
+ qCInfo(DDE_SHELL) << "[ForceLogout] DBus reply received";
+
+ if (m_forceLogoutTimedOut) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] Already timed out before DBus reply";
+ return;
+ }
+
+ if (!reply.isValid()) {
+ m_forceLogoutTimer->stop();
+ m_forceLogoutInProgress = false;
+ qCWarning(DDE_SHELL) << "[ForceLogout] ForceLogoutByUser failed:" << reply.error().message();
+ emit m_model->authFailedTipsMessage(tr("Failed to sign out other sessions"));
+ resetAuthAfterCancel();
+ return;
+ }
+
+ qCInfo(DDE_SHELL) << "[ForceLogout] ForceLogoutByUser success, wait SessionRemoved";
+}
+
+void GreeterWorker::continueLoginAfterForceLogout()
+{
+ if (!m_forceLogoutInProgress) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] Continue login ignored, force logout not in progress";
+ return;
+ }
+
+ auto currentUser = m_model->currentUser();
+ if (!currentUser) {
+ qWarning() << "[ForceLogout] Current user is nullptr, can not continue login";
+ return;
+ }
+
+ m_forceLogoutTimer->stop();
+ m_forceLogoutInProgress = false;
+
+ if (SessionConflict::isCurrentSessionRemote(m_login1Inter) &&
+ SessionConflict::countActiveRemoteUsers(m_login1Inter, currentUser->name())
+ >= SessionConflict::kMaxRemoteLoginUsers) {
+ qCInfo(DDE_SHELL) << "[RemoteUserLimit] Max remote login users reached, reject continue login for"
+ << currentUser->name();
+ emit requestShowRemoteUserLimitMessage();
+ return;
+ }
+
+ qCInfo(DDE_SHELL) << "[ForceLogout] Continue login flow";
+ if (currentUser->isNoPasswordLogin()) {
+ // 无密码登录的时候不可能处于认证状态,因为一旦开启认证就直接认证成功了
+ // 在这个过程之前就已经Cancel过了,在远程桌面登录界面切换无密码登录的场景下会出问题,这个再次处理一下
+ if (m_greeter->inAuthentication())
+ m_greeter->cancelAuthentication();
+ startGreeterAuth(currentUser->name());
+ } else if (m_greeter->inAuthentication()) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] LightDM is in authentication, respond now";
+ respondToGreeter(m_authFramework->AuthSessionPath(m_account) + QString(";") + m_password);
+ updatePasswordExpiredStateBySPName(m_account);
+ if (currentUser->expiredState() == User::ExpiredAlready) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] Password expired, switch to change password flow";
+ changePasswd();
+ }
+ } else {
+ qCWarning(DDE_SHELL) << "[ForceLogout] LightDM is not in authentication, reset auth";
+ resetAuthAfterCancel();
+ }
+}
+
+void GreeterWorker::onForceLogoutTimeout()
+{
+ if (!m_forceLogoutInProgress) {
+ return;
+ }
+ qCWarning(DDE_SHELL) << "[ForceLogout] Timed out while waiting session conflict to clear";
+ m_forceLogoutTimedOut = true;
+ m_forceLogoutInProgress = false;
+ if (m_forceLogoutWatcher) {
+ m_forceLogoutWatcher->deleteLater();
+ m_forceLogoutWatcher = nullptr;
+ }
+ emit m_model->authFailedTipsMessage(tr("Session sign-out timed out. Please retry."));
+ resetAuthAfterCancel();
}
void GreeterWorker::onAuthFinished()
@@ -1088,11 +1327,32 @@ void GreeterWorker::onAuthFinished()
if (m_model->greeterPasswordChangeActive() || m_passwordChange->active() || m_discardGreeterCompletion)
return;
qCInfo(DDE_SHELL) << "Auth finished";
+ auto currentUser = m_model->currentUser();
+ if (!currentUser) {
+ qWarning() << "Current user is nullptr";
+ return;
+ }
if (m_greeter->inAuthentication()) {
+ const bool skipConflictCheck = (currentUser->expiredState() == User::ExpiredAlready);
+ if (!skipConflictCheck &&
+ SessionConflict::isCurrentSessionRemote(m_login1Inter) &&
+ SessionConflict::countActiveRemoteUsers(m_login1Inter, currentUser->name())
+ >= SessionConflict::kMaxRemoteLoginUsers) {
+ qCInfo(DDE_SHELL) << "[RemoteUserLimit] Max remote login users reached, reject login for"
+ << currentUser->name();
+ emit requestShowRemoteUserLimitMessage();
+ return;
+ }
+ if (!skipConflictCheck && SessionConflict::hasActiveSessionConflict(m_login1Inter, currentUser->name())) {
+ qCInfo(DDE_SHELL) << "[ForceLogout] Active session conflict detected before LightDM respond";
+ emit requestShowActiveSessionConfirm();
+ return;
+ }
+
respondToGreeter(m_authFramework->AuthSessionPath(m_account) + QString(";") + m_password);
#ifndef ENABLE_DSS_SNIPE
updatePasswordExpiredStateBySPName(m_account);
- if (m_model->currentUser()->expiredState() == User::ExpiredAlready) {
+ if (currentUser->expiredState() == User::ExpiredAlready) {
changePasswd();
}
#else
@@ -1590,10 +1850,14 @@ void GreeterWorker::resetAuth(const QString &account)
void GreeterWorker::onNoPasswordLoginChanged(const QString &account, bool noPassword)
{
- if(m_model->currentUser()->name() == account && m_greeter->authenticationUser() == account) {
-
- if (noPassword && m_greeter->inAuthentication()) {
+ qInfo() << "Greeter authentication user:" << m_greeter->authenticationUser()
+ << ", greeter is in authentication:" << m_greeter->inAuthentication();
+ if(m_model->currentUser() && m_model->currentUser()->name() == account) {
+ if (noPassword && m_greeter->inAuthentication() && m_greeter->authenticationUser() == account) {
+ qCInfo(DDE_SHELL) << "Cancel current authentication because user switched to no password login, account:" << account;
m_greeter->cancelAuthentication();
+ endAuthentication(account, AT_All);
+ destroyAuthentication(account);
return;
}
diff --git a/src/lightdm-deepin-greeter/greeterworker.h b/src/lightdm-deepin-greeter/greeterworker.h
index 12e81500c..164868664 100644
--- a/src/lightdm-deepin-greeter/greeterworker.h
+++ b/src/lightdm-deepin-greeter/greeterworker.h
@@ -14,6 +14,7 @@
#include
#include
#include
+#include
#include
#ifndef ENABLE_DSS_SNIPE
@@ -46,6 +47,10 @@ class GreeterWorker : public Auth::AuthInterface
void requestShowPrompt(const QString &prompt);
void requestShowMessage(const QString &message);
void requestShowUsersWithTheSameName(const QString nativeUserName, const QString &doMainAccountDetail);
+ void requestShowActiveSessionConfirm();
+ void requestShowActiveSessionLoading();
+ void requestHideActiveSessionOverlay();
+ void requestShowRemoteUserLimitMessage();
public slots:
/* New authentication framework */
@@ -63,6 +68,8 @@ public slots:
const QString &confirmation, const QString &hint);
void cancelPasswordChange();
void onNoPasswordLoginChanged(const QString &account, bool noPassword);
+ void onActiveSessionConfirmAccepted();
+ void onActiveSessionConfirmCanceled();
private slots:
void onAuthStateChanged(const int type, const int state, const QString &message);
@@ -72,6 +79,8 @@ private slots:
void terminalLockedChanged(const QDBusMessage &msg);
void resetAuth(const QString &);
void sendExtraInfo(const QString &account, AuthCommon::AuthType authType, const QString &info);
+ void onForceLogoutFinished(QDBusPendingCallWatcher *watcher);
+ void onForceLogoutTimeout();
private:
void initConnections();
@@ -103,6 +112,10 @@ private slots:
#ifdef ENABLE_DSS_SNIPE
void prepareShutdownSound();
#endif
+ void startSessionAfterAuth();
+ void startForceLogout(const QString &username);
+ void continueLoginAfterForceLogout();
+ void resetAuthAfterCancel();
private:
DeepinAuthFramework *m_authFramework;
@@ -114,6 +127,8 @@ private slots:
#endif
QTimer *m_resetSessionTimer;
QTimer *m_limitsUpdateTimer;
+ QTimer *m_forceLogoutTimer;
+ QDBusPendingCallWatcher *m_forceLogoutWatcher = nullptr;
QString m_account;
QString m_authenticationLocale;
QQueue> m_unansweredGreeterPrompts;
@@ -128,6 +143,8 @@ private slots:
QString m_savedAuthAccount;
AuthFlags m_savedAuthType = AT_None;
bool m_savedMFA = false;
+ bool m_forceLogoutInProgress = false;
+ bool m_forceLogoutTimedOut = false;
};
#endif // GREETERWORKEK_H
diff --git a/src/session-widgets/authinterface.cpp b/src/session-widgets/authinterface.cpp
index aad424586..0e3d14964 100644
--- a/src/session-widgets/authinterface.cpp
+++ b/src/session-widgets/authinterface.cpp
@@ -8,13 +8,48 @@
#include "dbusconstant.h"
#include
+#include
+#include
#include
+#include
#define POWER_CAN_SLEEP "POWER_CAN_SLEEP"
#define POWER_CAN_HIBERNATE "POWER_CAN_HIBERNATE"
using namespace Auth;
+namespace {
+QVariant sessionProperty(const QVariantMap &properties, const QString &name)
+{
+ const QVariant value = properties.value(name);
+ return value.canConvert() ? value.value().variant() : value;
+}
+
+bool remoteSessionUid(const QVariantMap &properties, uint &uid)
+{
+ const QString type = sessionProperty(properties, QStringLiteral("Type")).toString();
+ if ((type != QLatin1String("x11")
+ && type != QLatin1String("wayland"))
+ || !sessionProperty(properties, QStringLiteral("Remote")).toBool()) {
+ return false;
+ }
+
+ const QVariant user = sessionProperty(properties, QStringLiteral("User"));
+ if (!user.canConvert()) {
+ return false;
+ }
+
+ QDBusObjectPath userPath;
+ quint32 sessionUid = 0;
+ const QDBusArgument argument = user.value();
+ argument.beginStructure();
+ argument >> sessionUid >> userPath;
+ argument.endStructure();
+ uid = sessionUid;
+ return true;
+}
+}
+
AuthInterface::AuthInterface(SessionBaseModel *const model, QObject *parent)
: QObject(parent)
, m_model(model)
@@ -54,6 +89,92 @@ AuthInterface::AuthInterface(SessionBaseModel *const model, QObject *parent)
} else {
qCWarning(DDE_SHELL) << "Login interface is invalid, error:" << m_login1Inter->lastError().type();
}
+
+ connect(m_login1Inter, &DBusLogin1Manager::SessionNew,
+ this, &AuthInterface::queryRemoteLoginSession);
+ connect(m_login1Inter, &DBusLogin1Manager::SessionRemoved,
+ this, &AuthInterface::removeRemoteLoginSession);
+
+ updateRemoteLoginStatus();
+}
+
+void AuthInterface::updateRemoteLoginStatus()
+{
+ auto *sessionsWatcher = new QDBusPendingCallWatcher(m_login1Inter->ListSessions(), this);
+ connect(sessionsWatcher, &QDBusPendingCallWatcher::finished, this,
+ [this](QDBusPendingCallWatcher *watcher) {
+ const QDBusPendingReply reply = *watcher;
+ watcher->deleteLater();
+
+ if (!reply.isValid()) {
+ qCWarning(DDE_SHELL) << "Failed to list login1 sessions:" << reply.error().message();
+ return;
+ }
+
+ const QList sessions = reply.value();
+ qCDebug(DDE_SHELL) << "Start scan remote login sessions, total:" << sessions.size();
+ for (const SessionInfo &session : sessions) {
+ queryRemoteLoginSession(session.session, session.path);
+ }
+ });
+}
+
+void AuthInterface::queryRemoteLoginSession(const QString &sessionId, const QDBusObjectPath &path)
+{
+ m_pendingRemoteSessions.insert(sessionId);
+
+ QDBusMessage message = QDBusMessage::createMethodCall(
+ QStringLiteral("org.freedesktop.login1"), path.path(),
+ QStringLiteral("org.freedesktop.DBus.Properties"), QStringLiteral("GetAll"));
+ message << QStringLiteral("org.freedesktop.login1.Session");
+
+ auto *watcher = new QDBusPendingCallWatcher(QDBusConnection::systemBus().asyncCall(message), this);
+ connect(watcher, &QDBusPendingCallWatcher::finished, this,
+ [this, sessionId](QDBusPendingCallWatcher *watcher) {
+ const QDBusPendingReply reply = *watcher;
+ watcher->deleteLater();
+
+ if (!m_pendingRemoteSessions.remove(sessionId)) {
+ qCDebug(DDE_SHELL) << "Remote session query discarded, session removed:" << sessionId;
+ return;
+ }
+
+ uint uid = 0;
+ if (!reply.isValid()) {
+ qCWarning(DDE_SHELL) << "Failed to query session properties:" << sessionId << reply.error().message();
+ return;
+ }
+ if (!remoteSessionUid(reply.value(), uid)) {
+ return;
+ }
+
+ m_remoteSessions.insert(sessionId, uid);
+ qCDebug(DDE_SHELL) << "Remote login session detected, session:" << sessionId << "uid:" << uid;
+ updateRemoteLoginUser(uid, true);
+ });
+}
+
+void AuthInterface::removeRemoteLoginSession(const QString &sessionId)
+{
+ m_pendingRemoteSessions.remove(sessionId);
+
+ const auto session = m_remoteSessions.find(sessionId);
+ if (session == m_remoteSessions.end()) {
+ return;
+ }
+
+ const uint uid = session.value();
+ m_remoteSessions.erase(session);
+ qCDebug(DDE_SHELL) << "Remote login session removed, session:" << sessionId << "uid:" << uid;
+ updateRemoteLoginUser(uid, false);
+}
+
+void AuthInterface::updateRemoteLoginUser(uint uid, bool remote)
+{
+ const auto user = m_model->findUserByUid(uid);
+ if (user) {
+ user->updateRemoteLoginState(remote);
+ }
}
void AuthInterface::setKeyboardLayout(std::shared_ptr user, const QString &layout)
diff --git a/src/session-widgets/authinterface.h b/src/session-widgets/authinterface.h
index f9472bf6d..d279714af 100644
--- a/src/session-widgets/authinterface.h
+++ b/src/session-widgets/authinterface.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2022-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -25,7 +25,10 @@
#include
#endif
+#include
+#include
#include
+#include
#include
#ifndef ENABLE_DSS_SNIPE
@@ -70,6 +73,10 @@ class AuthInterface : public QObject {
void initDBus();
void initData();
void onLoginUserListChanged(const QString &list);
+ void updateRemoteLoginStatus();
+ void queryRemoteLoginSession(const QString &sessionId, const QDBusObjectPath &path);
+ void removeRemoteLoginSession(const QString &sessionId);
+ void updateRemoteLoginUser(uint uid, bool remote);
bool checkHaveDisplay(const QJsonArray &array);
bool isLogined(uint uid);
@@ -112,6 +119,8 @@ class AuthInterface : public QObject {
uint m_currentUserUid;
std::list m_loginUserList;
bool m_isVM;
+ QHash m_remoteSessions;
+ QSet m_pendingRemoteSessions;
};
} // namespace Auth
diff --git a/src/session-widgets/lockcontent.cpp b/src/session-widgets/lockcontent.cpp
index 126c805e2..2ce186b39 100644
--- a/src/session-widgets/lockcontent.cpp
+++ b/src/session-widgets/lockcontent.cpp
@@ -28,11 +28,29 @@
#include
#include "dbusconstant.h"
+#include "dbuslogin1manager.h"
using namespace dss;
using namespace dss::module;
DCORE_USE_NAMESPACE
+// 通过 logind D-Bus 接口判断当前 session 是否为远程会话
+static bool isRemoteSession()
+{
+ const auto bus = QDBusConnection::systemBus();
+ DBusLogin1Manager login1("org.freedesktop.login1", "/org/freedesktop/login1", bus);
+ QDBusReply session = login1.GetSessionByPID(0);
+ // The lock service runs outside the graphical session's scope.
+ if (!session.isValid() && !qEnvironmentVariableIsEmpty("XDG_SESSION_ID"))
+ session = login1.GetSession(qEnvironmentVariable("XDG_SESSION_ID"));
+ if (!session.isValid())
+ return false;
+
+ QDBusInterface iface("org.freedesktop.login1", session.value().path(),
+ "org.freedesktop.login1.Session", bus);
+ return iface.property("Remote").toBool();
+}
+
LockContent::LockContent(QWidget *parent)
: SessionBaseWindow(parent)
, m_wmInter(new com::deepin::wm("com.deepin.wm", "/com/deepin/wm", QDBusConnection::sessionBus(), this))
@@ -887,7 +905,9 @@ void LockContent::onUserListChanged(QList> list)
}
}
- bool enable = (alwaysShowUserSwitchButton || (allowShowUserSwitchButton && (userList > (m_model->isServerModel() ? 0 : 1)))) && haveLoginedUser;
+ // 仅远程锁屏和桌面电源菜单强制隐藏,登录界面按原有条件判断。
+ bool hideForRemote = m_model->appType() == AuthCommon::Lock && isRemoteSession();
+ bool enable = !hideForRemote && (alwaysShowUserSwitchButton || (allowShowUserSwitchButton && (userList > (m_model->isServerModel() ? 0 : 1)))) && haveLoginedUser;
bool controlEnable = enable && (m_model->userlistVisible() || m_model->currentUser()->name() != "...");
m_controlWidget->setUserSwitchEnable(controlEnable);
diff --git a/src/session-widgets/user_widget.cpp b/src/session-widgets/user_widget.cpp
index 58118a458..fad729794 100644
--- a/src/session-widgets/user_widget.cpp
+++ b/src/session-widgets/user_widget.cpp
@@ -56,10 +56,8 @@ void UserWidget::initUI()
#endif
nameLayout->addStretch();
- QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/select.svg");
- pixmap.setDevicePixelRatio(devicePixelRatioF());
m_loginState->setAccessibleName("LoginState");
- m_loginState->setPixmap(pixmap);
+ updateLoginStateIcon();
m_loginState->setVisible(m_user->isLogin());
QVBoxLayout *loginStateLayout = new QVBoxLayout;
loginStateLayout->setSpacing(0);
@@ -68,7 +66,7 @@ void UserWidget::initUI()
#else
loginStateLayout->setMargin(0);
#endif
- loginStateLayout->addSpacing(4);
+ loginStateLayout->addSpacing(6);
loginStateLayout->addWidget(m_loginState);
nameLayout->addLayout(loginStateLayout);
@@ -132,6 +130,7 @@ void UserWidget::initConnections()
connect(m_user.get(), &User::avatarChanged, this, &UserWidget::setAvatar);
connect(m_user.get(), &User::displayNameChanged, this, &UserWidget::updateUserNameLabel);
connect(m_user.get(), &User::loginStateChanged, this, &UserWidget::setLoginState);
+ connect(m_user.get(), &User::remoteLoginStateChanged, this, &UserWidget::updateLoginStateIcon);
connect(qGuiApp, &QGuiApplication::fontChanged, this, &UserWidget::updateUserNameLabel);
connect(m_avatar, &UserAvatar::clicked, this, &UserWidget::clicked);
}
@@ -231,6 +230,16 @@ void UserWidget::setLoginState(const bool isLogin)
m_loginState->setVisible(isLogin);
}
+void UserWidget::updateLoginStateIcon()
+{
+ const QString iconPath = m_user->isRemoteLogin()
+ ? QStringLiteral(":/misc/images/remote_login.svg")
+ : QStringLiteral(":/misc/images/select.svg");
+ QPixmap pixmap = DHiDPIHelper::loadNxPixmap(iconPath);
+ pixmap.setDevicePixelRatio(devicePixelRatioF());
+ m_loginState->setPixmap(pixmap);
+}
+
/**
* @brief 更新模糊背景参数
*/
diff --git a/src/session-widgets/user_widget.h b/src/session-widgets/user_widget.h
index 8e07b498e..112f7659b 100644
--- a/src/session-widgets/user_widget.h
+++ b/src/session-widgets/user_widget.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2021-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -55,6 +55,7 @@ class UserWidget : public QWidget
void setAvatar(const QString &avatar);
void updateUserNameLabel();
void setLoginState(const bool isLogin);
+ void updateLoginStateIcon();
void updateBlurEffectGeometry();
diff --git a/src/session-widgets/userinfo.cpp b/src/session-widgets/userinfo.cpp
index 83fa12d55..19b816ece 100644
--- a/src/session-widgets/userinfo.cpp
+++ b/src/session-widgets/userinfo.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2021-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -22,6 +22,7 @@ User::User(QObject *parent)
, m_accountType(Administrator)
, m_isAutomaticLogin(false)
, m_isLogin(false)
+ , m_isRemoteLogin(false)
, m_isNoPasswordLogin(false)
, m_isPasswordValid(true)
, m_isUse24HourFormat(true)
@@ -46,6 +47,7 @@ User::User(const User &user)
, m_accountType(user.m_accountType)
, m_isAutomaticLogin(user.m_isAutomaticLogin)
, m_isLogin(user.m_isLogin)
+ , m_isRemoteLogin(user.m_isRemoteLogin)
, m_isNoPasswordLogin(user.m_isNoPasswordLogin)
, m_isPasswordValid(user.m_isPasswordValid)
, m_isUse24HourFormat(user.m_isUse24HourFormat)
@@ -127,6 +129,15 @@ void User::updateLoginState(const bool isLogin)
emit loginStateChanged(isLogin);
}
+void User::updateRemoteLoginState(bool isRemoteLogin)
+{
+ if (isRemoteLogin == m_isRemoteLogin) {
+ return;
+ }
+ m_isRemoteLogin = isRemoteLogin;
+ emit remoteLoginStateChanged(isRemoteLogin);
+}
+
/**
* @brief 更新账户限制信息
*
diff --git a/src/session-widgets/userinfo.h b/src/session-widgets/userinfo.h
index 1e9b20b87..7e5bf4c06 100644
--- a/src/session-widgets/userinfo.h
+++ b/src/session-widgets/userinfo.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2021-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -75,6 +75,7 @@ class User : public QObject
inline bool isAutomaticLogin() const { return m_isAutomaticLogin; }
inline bool isPasswordValid() const { return m_isPasswordValid; }
inline bool isLogin() const { return m_isLogin; }
+ inline bool isRemoteLogin() const { return m_isRemoteLogin; }
inline bool isNoPasswordLogin() const { return m_isNoPasswordLogin || !m_isPasswordValid; }
virtual inline bool isUserValid() const { return false; }
inline bool isUse24HourFormat() const { return m_isUse24HourFormat; }
@@ -106,6 +107,7 @@ class User : public QObject
void updateLimitsInfo(const QString &info);
void updateLoginState(const bool isLogin);
+ void updateRemoteLoginState(bool isRemoteLogin);
void setLastAuthType(const AuthCommon::AuthType type);
void setLastCustomAuth(const QString &key) { m_lastCustomAuth = key; }
bool allowToChangePassword() const;
@@ -126,6 +128,7 @@ class User : public QObject
void limitsInfoChanged(const QMap *);
void localeChanged(const QString &locale);
void loginStateChanged(const bool);
+ void remoteLoginStateChanged(bool isRemoteLogin);
void noPasswordLoginChanged(const bool);
void passwordHintChanged(const QString &);
void shortDateFormatChanged(const int);
@@ -144,6 +147,7 @@ class User : public QObject
int m_accountType; // 账户类型
bool m_isAutomaticLogin; // 自动登录
bool m_isLogin; // 登录状态
+ bool m_isRemoteLogin; // 远程图形会话登录状态
bool m_isNoPasswordLogin; // 无密码登录
bool m_isPasswordValid; // 用户是否设置密码
bool m_isUse24HourFormat; // 24小时制
diff --git a/src/widgets/activesessionwidgets.cpp b/src/widgets/activesessionwidgets.cpp
new file mode 100644
index 000000000..f2abfd9f5
--- /dev/null
+++ b/src/widgets/activesessionwidgets.cpp
@@ -0,0 +1,150 @@
+// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "activesessionwidgets.h"
+#include "statebutton.h"
+#include "useravatar.h"
+#include "userinfo.h"
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+DWIDGET_USE_NAMESPACE
+
+namespace {
+constexpr int kAvatarSize = 100;
+}
+
+ActiveSessionConfirmWidget::ActiveSessionConfirmWidget(QWidget *parent)
+ : QWidget(parent)
+ , m_avatar(new UserAvatar(this))
+ , m_userNameLabel(new QLabel(this))
+ , m_messageLabel(new QLabel(this))
+ , m_confirmButton(new StateButton(tr("Confirm Login"), this))
+ , m_cancelButton(new StateButton(tr("Cancel"), this))
+{
+ initUI();
+}
+
+void ActiveSessionConfirmWidget::setUser(const std::shared_ptr &user)
+{
+ m_user = user;
+ if (m_user) {
+ m_userNameLabel->setText(m_user->displayName());
+ } else {
+ m_userNameLabel->clear();
+ }
+ updateAvatar();
+}
+
+void ActiveSessionConfirmWidget::initUI()
+{
+ setAccessibleName("ActiveSessionConfirmWidget");
+
+ m_avatar->setAvatarSize(kAvatarSize);
+
+ m_userNameLabel->setAlignment(Qt::AlignCenter);
+ DFontSizeManager::instance()->bind(m_userNameLabel, DFontSizeManager::T2, QFont::Light);
+
+ m_messageLabel->setWordWrap(true);
+ m_messageLabel->setAlignment(Qt::AlignCenter);
+ DFontSizeManager::instance()->bind(m_messageLabel, DFontSizeManager::T7);
+ m_messageLabel->setMinimumWidth(550);
+
+ m_cancelButton->setObjectName("ActiveSessionCancelButton");
+ m_cancelButton->setFixedHeight(42);
+ m_cancelButton->setMinimumWidth(130);
+ m_cancelButton->setBorderRadius(8);
+ m_cancelButton->setNormalTextColor(QColor(255, 255, 255));
+ m_cancelButton->setHoverTextColor(QColor(0, 0, 0));
+ m_cancelButton->setPressTextColor(QColor(0, 129, 255));
+ m_cancelButton->setNormalBackground(QColor(255, 255, 255, 25));
+ m_cancelButton->setHoverBackground(QColor(255, 255, 255, 102));
+ m_cancelButton->setPressBackground(QColor(255, 255, 255, 51));
+ DFontSizeManager::instance()->bind(m_cancelButton, DFontSizeManager::T7);
+
+ m_confirmButton->setObjectName("ActiveSessionConfirmButton");
+ m_confirmButton->setFixedHeight(42);
+ m_confirmButton->setMinimumWidth(130);
+ m_confirmButton->setBorderRadius(8);
+ m_confirmButton->setNormalTextColor(QColor(255, 255, 255));
+ m_confirmButton->setHoverTextColor(QColor(0, 0, 0));
+ m_confirmButton->setPressTextColor(QColor(0, 129, 255));
+ m_confirmButton->setNormalBackground(QColor(255, 255, 255, 25));
+ m_confirmButton->setHoverBackground(QColor(255, 255, 255, 102));
+ m_confirmButton->setPressBackground(QColor(255, 255, 255, 51));
+ DFontSizeManager::instance()->bind(m_confirmButton, DFontSizeManager::T7);
+
+ auto *buttonLayout = new QHBoxLayout;
+ buttonLayout->setSpacing(60);
+ buttonLayout->addStretch();
+ buttonLayout->addWidget(m_cancelButton);
+ buttonLayout->addWidget(m_confirmButton);
+ buttonLayout->addStretch();
+
+ auto *mainLayout = new QVBoxLayout(this);
+ mainLayout->setSpacing(0);
+ mainLayout->addStretch();
+ mainLayout->addWidget(m_avatar, 0, Qt::AlignHCenter);
+ mainLayout->addSpacing(6);
+ mainLayout->addWidget(m_userNameLabel, 0, Qt::AlignHCenter);
+ mainLayout->addSpacing(20);
+ mainLayout->addWidget(m_messageLabel, 0, Qt::AlignHCenter);
+ mainLayout->addSpacing(30);
+ mainLayout->addLayout(buttonLayout);
+ mainLayout->addStretch();
+ setLayout(mainLayout);
+
+ connect(m_confirmButton, &QPushButton::clicked, this, &ActiveSessionConfirmWidget::confirmed);
+ connect(m_cancelButton, &QPushButton::clicked, this, &ActiveSessionConfirmWidget::canceled);
+}
+
+void ActiveSessionConfirmWidget::setLimitMode(bool limitMode)
+{
+ if (limitMode) {
+ m_messageLabel->setText(tr("Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again."));
+ m_confirmButton->hide();
+ } else {
+ m_messageLabel->setText(tr("This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?"));
+ m_confirmButton->show();
+ }
+}
+
+void ActiveSessionConfirmWidget::updateAvatar()
+{
+ if (m_user && !m_user->avatar().isEmpty()) {
+ m_avatar->setIcon(m_user->avatar());
+ }
+}
+
+ActiveSessionLoadingWidget::ActiveSessionLoadingWidget(QWidget *parent)
+ : QWidget(parent)
+ , m_spinner(new Dtk::Widget::DSpinner(this))
+{
+ initUI();
+ m_spinner->start();
+}
+
+void ActiveSessionLoadingWidget::initUI()
+{
+ setAccessibleName("ActiveSessionLoadingWidget");
+
+ m_spinner->setFixedSize(56, 56);
+ QPalette pa(m_spinner->palette());
+ pa.setColor(QPalette::Highlight, Qt::white);
+ m_spinner->setPalette(pa);
+
+ auto *rowLayout = new QHBoxLayout;
+ rowLayout->addStretch();
+ rowLayout->addWidget(m_spinner);
+ rowLayout->addStretch();
+
+ setLayout(rowLayout);
+}
diff --git a/src/widgets/activesessionwidgets.h b/src/widgets/activesessionwidgets.h
new file mode 100644
index 000000000..3c8ae2bf0
--- /dev/null
+++ b/src/widgets/activesessionwidgets.h
@@ -0,0 +1,63 @@
+// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef ACTIVESESSIONWIDGETS_H
+#define ACTIVESESSIONWIDGETS_H
+
+#include
+
+#include
+
+namespace Dtk {
+namespace Widget {
+class DSpinner;
+}
+}
+
+class QLabel;
+class StateButton;
+class UserAvatar;
+class User;
+
+class ActiveSessionConfirmWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ActiveSessionConfirmWidget(QWidget *parent = nullptr);
+ void setUser(const std::shared_ptr &user);
+ void setLimitMode(bool limitMode);
+
+signals:
+ void confirmed();
+ void canceled();
+
+private:
+ void initUI();
+ void updateAvatar();
+
+private:
+ UserAvatar *m_avatar;
+ QLabel *m_userNameLabel;
+ QLabel *m_messageLabel;
+ StateButton *m_confirmButton;
+ StateButton *m_cancelButton;
+ std::shared_ptr m_user;
+};
+
+class ActiveSessionLoadingWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ActiveSessionLoadingWidget(QWidget *parent = nullptr);
+
+private:
+ void initUI();
+
+private:
+ Dtk::Widget::DSpinner *m_spinner;
+};
+
+#endif // ACTIVESESSIONWIDGETS_H
diff --git a/src/widgets/statebutton.cpp b/src/widgets/statebutton.cpp
new file mode 100644
index 000000000..74086644f
--- /dev/null
+++ b/src/widgets/statebutton.cpp
@@ -0,0 +1,164 @@
+// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "statebutton.h"
+
+#include
+#include
+#include
+
+StateButton::StateButton(const QString &text, QWidget *parent)
+ : QPushButton(text, parent)
+ , m_normalTextColor(Qt::white)
+ , m_hoverTextColor(Qt::black)
+ , m_pressTextColor(QColor(0, 129, 255))
+ , m_normalBackground(QColor(255, 255, 255, 25))
+ , m_hoverBackground(QColor(255, 255, 255, 102))
+ , m_pressBackground(QColor(255, 255, 255, 51))
+ , m_borderRadius(8)
+ , m_hovered(false)
+ , m_pressed(false)
+{
+ setMouseTracking(true);
+ setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+}
+
+StateButton::~StateButton()
+{
+}
+
+void StateButton::setNormalTextColor(const QColor &color)
+{
+ m_normalTextColor = color;
+ updateTextColor();
+}
+
+void StateButton::setHoverTextColor(const QColor &color)
+{
+ m_hoverTextColor = color;
+ updateTextColor();
+}
+
+void StateButton::setPressTextColor(const QColor &color)
+{
+ m_pressTextColor = color;
+ updateTextColor();
+}
+
+void StateButton::setNormalBackground(const QColor &color)
+{
+ m_normalBackground = color;
+ updateBackground();
+}
+
+void StateButton::setHoverBackground(const QColor &color)
+{
+ m_hoverBackground = color;
+ updateBackground();
+}
+
+void StateButton::setPressBackground(const QColor &color)
+{
+ m_pressBackground = color;
+ updateBackground();
+}
+
+void StateButton::setBorderRadius(int radius)
+{
+ m_borderRadius = radius;
+ update();
+}
+
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+void StateButton::enterEvent(QEnterEvent *event)
+#else
+void StateButton::enterEvent(QEvent *event)
+#endif
+{
+ m_hovered = true;
+ updateTextColor();
+ updateBackground();
+ QPushButton::enterEvent(event);
+}
+
+void StateButton::leaveEvent(QEvent *event)
+{
+ m_hovered = false;
+ m_pressed = false;
+ updateTextColor();
+ updateBackground();
+ QPushButton::leaveEvent(event);
+}
+
+void StateButton::mousePressEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ m_pressed = true;
+ updateTextColor();
+ updateBackground();
+ }
+ QPushButton::mousePressEvent(event);
+}
+
+void StateButton::mouseReleaseEvent(QMouseEvent *event)
+{
+ if (event->button() == Qt::LeftButton) {
+ m_pressed = false;
+ updateTextColor();
+ updateBackground();
+ }
+ QPushButton::mouseReleaseEvent(event);
+}
+
+void StateButton::paintEvent(QPaintEvent *event)
+{
+ Q_UNUSED(event)
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ QColor bgColor;
+ if (m_pressed) {
+ bgColor = m_pressBackground;
+ } else if (m_hovered) {
+ bgColor = m_hoverBackground;
+ } else {
+ bgColor = m_normalBackground;
+ }
+
+ QPainterPath path;
+ path.addRoundedRect(rect(), m_borderRadius, m_borderRadius);
+ painter.fillPath(path, bgColor);
+
+ QColor textColor;
+ if (m_pressed) {
+ textColor = m_pressTextColor;
+ } else if (m_hovered) {
+ textColor = m_hoverTextColor;
+ } else {
+ textColor = m_normalTextColor;
+ }
+
+ painter.setPen(textColor);
+ painter.setFont(font());
+ painter.drawText(rect(), Qt::AlignCenter, text());
+}
+
+void StateButton::updateTextColor()
+{
+ QPalette pal = palette();
+ if (m_pressed) {
+ pal.setColor(QPalette::ButtonText, m_pressTextColor);
+ } else if (m_hovered) {
+ pal.setColor(QPalette::ButtonText, m_hoverTextColor);
+ } else {
+ pal.setColor(QPalette::ButtonText, m_normalTextColor);
+ }
+ setPalette(pal);
+}
+
+void StateButton::updateBackground()
+{
+ update();
+}
diff --git a/src/widgets/statebutton.h b/src/widgets/statebutton.h
new file mode 100644
index 000000000..ab3b95fa0
--- /dev/null
+++ b/src/widgets/statebutton.h
@@ -0,0 +1,55 @@
+// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef STATEBUTTON_H
+#define STATEBUTTON_H
+
+#include
+
+class StateButton : public QPushButton
+{
+ Q_OBJECT
+public:
+ explicit StateButton(const QString &text, QWidget *parent = nullptr);
+ ~StateButton() override;
+
+ void setNormalTextColor(const QColor &color);
+ void setHoverTextColor(const QColor &color);
+ void setPressTextColor(const QColor &color);
+
+ void setNormalBackground(const QColor &color);
+ void setHoverBackground(const QColor &color);
+ void setPressBackground(const QColor &color);
+
+ void setBorderRadius(int radius);
+
+protected:
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ void enterEvent(QEnterEvent *event) override;
+#else
+ void enterEvent(QEvent *event) override;
+#endif
+ void leaveEvent(QEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
+
+private:
+ void updateTextColor();
+ void updateBackground();
+
+ QColor m_normalTextColor;
+ QColor m_hoverTextColor;
+ QColor m_pressTextColor;
+
+ QColor m_normalBackground;
+ QColor m_hoverBackground;
+ QColor m_pressBackground;
+
+ int m_borderRadius;
+ bool m_hovered;
+ bool m_pressed;
+};
+
+#endif // STATEBUTTON_H
diff --git a/src/widgets/warningcontent.cpp b/src/widgets/warningcontent.cpp
index c9cc31468..d1887e48c 100644
--- a/src/widgets/warningcontent.cpp
+++ b/src/widgets/warningcontent.cpp
@@ -4,6 +4,7 @@
#include "dconfig_helper.h"
#include "warningcontent.h"
+#include "activesessionwidgets.h"
#include "fullscreenbackground.h"
#include "lockcontent.h"
#include "keyboardmonitor.h"
@@ -42,6 +43,12 @@ WarningContent *WarningContent::instance()
void WarningContent::setModel(SessionBaseModel * const model)
{
+ if (m_model == model)
+ return;
+
+ if (m_model)
+ disconnect(m_model, &SessionBaseModel::shutdownInhibit, this, &WarningContent::shutdownInhibit);
+
m_model = model;
connect(m_model, &SessionBaseModel::shutdownInhibit, this, &WarningContent::shutdownInhibit);
}
@@ -419,6 +426,62 @@ void WarningContent::tryGrabKeyboard(bool exitIfFailed)
#endif
}
+void WarningContent::showActiveSessionConfirm()
+{
+ if (!m_activeSessionConfirm) {
+ m_activeSessionConfirm = new ActiveSessionConfirmWidget(this);
+ connect(m_activeSessionConfirm, &ActiveSessionConfirmWidget::confirmed,
+ this, &WarningContent::activeSessionConfirmAccepted);
+ connect(m_activeSessionConfirm, &ActiveSessionConfirmWidget::canceled,
+ this, &WarningContent::activeSessionConfirmCanceled);
+ }
+
+ m_activeSessionConfirm->setLimitMode(false);
+ if (m_model)
+ m_activeSessionConfirm->setUser(m_model->currentUser());
+
+ FullScreenBackground::setContent(this);
+ if (m_model)
+ m_model->setCurrentContentType(SessionBaseModel::WarningContent);
+ setCenterContent(m_activeSessionConfirm, 0, Qt::AlignCenter);
+}
+
+void WarningContent::showRemoteUserLimitMessage()
+{
+ if (!m_activeSessionConfirm) {
+ m_activeSessionConfirm = new ActiveSessionConfirmWidget(this);
+ connect(m_activeSessionConfirm, &ActiveSessionConfirmWidget::confirmed,
+ this, &WarningContent::activeSessionConfirmAccepted);
+ connect(m_activeSessionConfirm, &ActiveSessionConfirmWidget::canceled,
+ this, &WarningContent::activeSessionConfirmCanceled);
+ }
+
+ m_activeSessionConfirm->setLimitMode(true);
+ if (m_model)
+ m_activeSessionConfirm->setUser(m_model->currentUser());
+
+ FullScreenBackground::setContent(this);
+ if (m_model)
+ m_model->setCurrentContentType(SessionBaseModel::WarningContent);
+ setCenterContent(m_activeSessionConfirm, 0, Qt::AlignCenter);
+}
+
+void WarningContent::showActiveSessionLoading()
+{
+ if (!m_activeSessionLoading)
+ m_activeSessionLoading = new ActiveSessionLoadingWidget(this);
+
+ FullScreenBackground::setContent(this);
+ if (m_model)
+ m_model->setCurrentContentType(SessionBaseModel::WarningContent);
+ setCenterContent(m_activeSessionLoading, 0, Qt::AlignCenter);
+}
+
+void WarningContent::hideActiveSessionOverlay()
+{
+ emit requestActiveSessionOverlayHide();
+}
+
void WarningContent::showEvent(QShowEvent *event)
{
tryGrabKeyboard();
@@ -441,7 +504,8 @@ bool WarningContent::supportDelayOrWait() const
void WarningContent::mouseReleaseEvent(QMouseEvent *event)
{
- doCancelShutdownInhibit();
+ if (m_warningView)
+ doCancelShutdownInhibit();
return SessionBaseWindow::mouseReleaseEvent(event);
}
@@ -449,7 +513,8 @@ void WarningContent::keyPressEvent(QKeyEvent *event)
{
switch (event->key()) {
case Qt::Key_Escape:
- doCancelShutdownInhibit();
+ if (m_warningView)
+ doCancelShutdownInhibit();
break;
}
QWidget::keyPressEvent(event);
diff --git a/src/widgets/warningcontent.h b/src/widgets/warningcontent.h
index bb705626d..8735aa91b 100644
--- a/src/widgets/warningcontent.h
+++ b/src/widgets/warningcontent.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2015-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -15,6 +15,9 @@
#include "multiuserswarningview.h"
#include "dbus/dbuslogin1manager.h"
+class ActiveSessionConfirmWidget;
+class ActiveSessionLoadingWidget;
+
class WarningContent : public SessionBaseWindow
{
Q_OBJECT
@@ -28,9 +31,16 @@ class WarningContent : public SessionBaseWindow
void setPowerAction(const SessionBaseModel::PowerAction action);
bool supportDelayOrWait() const;
void tryGrabKeyboard(bool exitIfFailed = true);
+ void showActiveSessionConfirm();
+ void showActiveSessionLoading();
+ void hideActiveSessionOverlay();
+ void showRemoteUserLimitMessage();
signals:
void requestLockFrameHide();
+ void requestActiveSessionOverlayHide();
+ void activeSessionConfirmAccepted();
+ void activeSessionConfirmCanceled();
protected:
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
@@ -47,6 +57,8 @@ private slots:
SessionBaseModel *m_model;
DBusLogin1Manager *m_login1Inter;
WarningView * m_warningView = nullptr;
+ ActiveSessionConfirmWidget *m_activeSessionConfirm = nullptr;
+ ActiveSessionLoadingWidget *m_activeSessionLoading = nullptr;
QStringList m_inhibitorBlacklists;
SessionBaseModel::PowerAction m_powerAction;
int m_failures;
diff --git a/tests/dde-lock/ut_interface.cpp b/tests/dde-lock/ut_interface.cpp
index 729ac38d0..41b6cf575 100644
--- a/tests/dde-lock/ut_interface.cpp
+++ b/tests/dde-lock/ut_interface.cpp
@@ -1,10 +1,12 @@
-// SPDX-FileCopyrightText: 2018 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2018-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
#include
#include "dbusconstant.h"
+#include
+
#include "userinfo.h"
class UT_Interface : public testing::Test
@@ -71,3 +73,20 @@ TEST_F(UT_Interface, user)
EXPECT_EQ(nativeUser->name(), name);
addomainUser->setFullName(displayname);
}
+
+TEST_F(UT_Interface, remoteLoginState)
+{
+ User user;
+ QSignalSpy spy(&user, &User::remoteLoginStateChanged);
+
+ EXPECT_FALSE(user.isRemoteLogin());
+ user.updateRemoteLoginState(true);
+ EXPECT_TRUE(user.isRemoteLogin());
+ EXPECT_EQ(spy.count(), 1);
+
+ user.updateRemoteLoginState(true);
+ EXPECT_EQ(spy.count(), 1);
+
+ User copy(user);
+ EXPECT_TRUE(copy.isRemoteLogin());
+}
diff --git a/tests/dde-lock/ut_sessionconflict.cpp b/tests/dde-lock/ut_sessionconflict.cpp
new file mode 100644
index 000000000..2d2bdb26d
--- /dev/null
+++ b/tests/dde-lock/ut_sessionconflict.cpp
@@ -0,0 +1,25 @@
+// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "sessionconflict.h"
+
+#include
+
+TEST(SessionConflict, InvalidInputHasNoConflict)
+{
+ EXPECT_FALSE(SessionConflict::hasActiveSessionConflict(nullptr, QString()));
+ EXPECT_FALSE(SessionConflict::hasActiveSessionConflict(nullptr, QStringLiteral("...")));
+}
+
+TEST(SessionConflict, InvalidInputNotRemote)
+{
+ EXPECT_FALSE(SessionConflict::isCurrentSessionRemote(nullptr));
+}
+
+TEST(SessionConflict, InvalidInputNoRemoteUsers)
+{
+ const QString alice = QStringLiteral("alice");
+ EXPECT_EQ(SessionConflict::countActiveRemoteUsers(nullptr, QString()), 0);
+ EXPECT_EQ(SessionConflict::countActiveRemoteUsers(nullptr, alice), 0);
+}
diff --git a/tests/lightdm-deepin-greeter/CMakeLists.txt b/tests/lightdm-deepin-greeter/CMakeLists.txt
index cb1ddb895..3a5710eab 100644
--- a/tests/lightdm-deepin-greeter/CMakeLists.txt
+++ b/tests/lightdm-deepin-greeter/CMakeLists.txt
@@ -47,8 +47,9 @@ if (DISABLE_DSS_SNIPE)
)
endif ()
-target_compile_definitions(lightdm-deepin-greeter
- PRIVATE ENABLE_SESSION
+target_compile_definitions(${BIN_NAME}
+ PRIVATE
+ ENABLE_SESSION
)
target_link_libraries(${BIN_NAME} PRIVATE
diff --git a/translations/dde-session-shell.ts b/translations/dde-session-shell.ts
index ca2675d62..59916f7b8 100644
--- a/translations/dde-session-shell.ts
+++ b/translations/dde-session-shell.ts
@@ -1,6 +1,29 @@
+
+ ActiveSessionConfirmWidget
+
+
+ Confirm Login
+
+
+
+
+ Cancel
+
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
ContentWidget
diff --git a/translations/dde-session-shell_af.ts b/translations/dde-session-shell_af.ts
index b3ae8b7c4..a32fee233 100644
--- a/translations/dde-session-shell_af.ts
+++ b/translations/dde-session-shell_af.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ak.ts b/translations/dde-session-shell_ak.ts
index a2b506c7c..36dcbf5f4 100644
--- a/translations/dde-session-shell_ak.ts
+++ b/translations/dde-session-shell_ak.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_am_ET.ts b/translations/dde-session-shell_am_ET.ts
index b9388683f..01742b0ba 100644
--- a/translations/dde-session-shell_am_ET.ts
+++ b/translations/dde-session-shell_am_ET.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ar.ts b/translations/dde-session-shell_ar.ts
index 6dd8ba094..8f3fb454a 100644
--- a/translations/dde-session-shell_ar.ts
+++ b/translations/dde-session-shell_ar.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ast.ts b/translations/dde-session-shell_ast.ts
index 0bd416e6d..52d7372cc 100644
--- a/translations/dde-session-shell_ast.ts
+++ b/translations/dde-session-shell_ast.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_az.ts b/translations/dde-session-shell_az.ts
index 7d14a4926..f7a3b1de8 100644
--- a/translations/dde-session-shell_az.ts
+++ b/translations/dde-session-shell_az.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_bg.ts b/translations/dde-session-shell_bg.ts
index 260998ab0..4c21c934d 100644
--- a/translations/dde-session-shell_bg.ts
+++ b/translations/dde-session-shell_bg.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_bn.ts b/translations/dde-session-shell_bn.ts
index 81ca32f2b..9340ec5ae 100644
--- a/translations/dde-session-shell_bn.ts
+++ b/translations/dde-session-shell_bn.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_bo.ts b/translations/dde-session-shell_bo.ts
index 7b5bf37a1..6ee0f2d9a 100644
--- a/translations/dde-session-shell_bo.ts
+++ b/translations/dde-session-shell_bo.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_br.ts b/translations/dde-session-shell_br.ts
index 4c59a0902..7335bde36 100644
--- a/translations/dde-session-shell_br.ts
+++ b/translations/dde-session-shell_br.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ca.ts b/translations/dde-session-shell_ca.ts
index 59d0e953b..5987c5df0 100644
--- a/translations/dde-session-shell_ca.ts
+++ b/translations/dde-session-shell_ca.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_cs.ts b/translations/dde-session-shell_cs.ts
index ece4184bb..5408ab551 100644
--- a/translations/dde-session-shell_cs.ts
+++ b/translations/dde-session-shell_cs.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_da.ts b/translations/dde-session-shell_da.ts
index 963fc3bfc..e6f7a482e 100644
--- a/translations/dde-session-shell_da.ts
+++ b/translations/dde-session-shell_da.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_de.ts b/translations/dde-session-shell_de.ts
index 219cdffa9..2004db8e0 100644
--- a/translations/dde-session-shell_de.ts
+++ b/translations/dde-session-shell_de.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_el.ts b/translations/dde-session-shell_el.ts
index 65de76bae..1916df153 100644
--- a/translations/dde-session-shell_el.ts
+++ b/translations/dde-session-shell_el.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_el_GR.ts b/translations/dde-session-shell_el_GR.ts
index 7c3cb8eea..7a68934d3 100644
--- a/translations/dde-session-shell_el_GR.ts
+++ b/translations/dde-session-shell_el_GR.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_en.ts b/translations/dde-session-shell_en.ts
index 4753bd43b..01a8a597c 100644
--- a/translations/dde-session-shell_en.ts
+++ b/translations/dde-session-shell_en.ts
@@ -1,6 +1,25 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+ Confirm Login
+
+
+ Cancel
+ Cancel
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
AuthFace
diff --git a/translations/dde-session-shell_en_AU.ts b/translations/dde-session-shell_en_AU.ts
index 6b58d979f..edad354c3 100644
--- a/translations/dde-session-shell_en_AU.ts
+++ b/translations/dde-session-shell_en_AU.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_en_GB.ts b/translations/dde-session-shell_en_GB.ts
index bbbd03bbf..6ab1181d4 100644
--- a/translations/dde-session-shell_en_GB.ts
+++ b/translations/dde-session-shell_en_GB.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_en_US.ts b/translations/dde-session-shell_en_US.ts
index c2cbb48c8..d8bd518f7 100644
--- a/translations/dde-session-shell_en_US.ts
+++ b/translations/dde-session-shell_en_US.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_eo.ts b/translations/dde-session-shell_eo.ts
index af13d963f..c08c33e8b 100644
--- a/translations/dde-session-shell_eo.ts
+++ b/translations/dde-session-shell_eo.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_es.ts b/translations/dde-session-shell_es.ts
index f3eca221b..c2f772088 100644
--- a/translations/dde-session-shell_es.ts
+++ b/translations/dde-session-shell_es.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_et.ts b/translations/dde-session-shell_et.ts
index 8c8c1af69..09d6a7062 100644
--- a/translations/dde-session-shell_et.ts
+++ b/translations/dde-session-shell_et.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_fa.ts b/translations/dde-session-shell_fa.ts
index 345804802..3bbe6e967 100644
--- a/translations/dde-session-shell_fa.ts
+++ b/translations/dde-session-shell_fa.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_fi.ts b/translations/dde-session-shell_fi.ts
index 099fedfb0..01cd17344 100644
--- a/translations/dde-session-shell_fi.ts
+++ b/translations/dde-session-shell_fi.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_fr.ts b/translations/dde-session-shell_fr.ts
index ef8e53390..4a9d30f02 100644
--- a/translations/dde-session-shell_fr.ts
+++ b/translations/dde-session-shell_fr.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_gl_ES.ts b/translations/dde-session-shell_gl_ES.ts
index f6a301fb6..bda7330a4 100644
--- a/translations/dde-session-shell_gl_ES.ts
+++ b/translations/dde-session-shell_gl_ES.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_he.ts b/translations/dde-session-shell_he.ts
index 059ffbfd9..820859e24 100644
--- a/translations/dde-session-shell_he.ts
+++ b/translations/dde-session-shell_he.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_hi_IN.ts b/translations/dde-session-shell_hi_IN.ts
index abd6575cf..97abbfc68 100644
--- a/translations/dde-session-shell_hi_IN.ts
+++ b/translations/dde-session-shell_hi_IN.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_hr.ts b/translations/dde-session-shell_hr.ts
index adb69c729..1e9644adf 100644
--- a/translations/dde-session-shell_hr.ts
+++ b/translations/dde-session-shell_hr.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_hu.ts b/translations/dde-session-shell_hu.ts
index 890bfa62d..08fa23863 100644
--- a/translations/dde-session-shell_hu.ts
+++ b/translations/dde-session-shell_hu.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_hy.ts b/translations/dde-session-shell_hy.ts
index 153989a1b..cdd913a4a 100644
--- a/translations/dde-session-shell_hy.ts
+++ b/translations/dde-session-shell_hy.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_id.ts b/translations/dde-session-shell_id.ts
index e286f75a8..5dfd10cea 100644
--- a/translations/dde-session-shell_id.ts
+++ b/translations/dde-session-shell_id.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_it.ts b/translations/dde-session-shell_it.ts
index a56f21379..338e6725e 100644
--- a/translations/dde-session-shell_it.ts
+++ b/translations/dde-session-shell_it.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ja.ts b/translations/dde-session-shell_ja.ts
index 41f2adec0..5af6f23f2 100644
--- a/translations/dde-session-shell_ja.ts
+++ b/translations/dde-session-shell_ja.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ka.ts b/translations/dde-session-shell_ka.ts
index 518f6b00f..745441dd0 100644
--- a/translations/dde-session-shell_ka.ts
+++ b/translations/dde-session-shell_ka.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_kab.ts b/translations/dde-session-shell_kab.ts
index 82b61dd28..68bcee56c 100644
--- a/translations/dde-session-shell_kab.ts
+++ b/translations/dde-session-shell_kab.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_kk.ts b/translations/dde-session-shell_kk.ts
index 3eb051858..c5dbd2d35 100644
--- a/translations/dde-session-shell_kk.ts
+++ b/translations/dde-session-shell_kk.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_km_KH.ts b/translations/dde-session-shell_km_KH.ts
index eb4965c71..a607b872a 100644
--- a/translations/dde-session-shell_km_KH.ts
+++ b/translations/dde-session-shell_km_KH.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ko.ts b/translations/dde-session-shell_ko.ts
index c42a8d00e..816c1bc32 100644
--- a/translations/dde-session-shell_ko.ts
+++ b/translations/dde-session-shell_ko.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ku.ts b/translations/dde-session-shell_ku.ts
index 7c0add352..46b5a71a1 100644
--- a/translations/dde-session-shell_ku.ts
+++ b/translations/dde-session-shell_ku.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ku_IQ.ts b/translations/dde-session-shell_ku_IQ.ts
index c22e5c8ef..cbc4596f1 100644
--- a/translations/dde-session-shell_ku_IQ.ts
+++ b/translations/dde-session-shell_ku_IQ.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ky.ts b/translations/dde-session-shell_ky.ts
index ba3bffc29..a28e50e01 100644
--- a/translations/dde-session-shell_ky.ts
+++ b/translations/dde-session-shell_ky.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ky@Arab.ts b/translations/dde-session-shell_ky@Arab.ts
index f15f02cac..3d84a9c72 100644
--- a/translations/dde-session-shell_ky@Arab.ts
+++ b/translations/dde-session-shell_ky@Arab.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_lo.ts b/translations/dde-session-shell_lo.ts
index ace21c7ab..8a613ce76 100644
--- a/translations/dde-session-shell_lo.ts
+++ b/translations/dde-session-shell_lo.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_lt.ts b/translations/dde-session-shell_lt.ts
index 93918b61e..5fc134951 100644
--- a/translations/dde-session-shell_lt.ts
+++ b/translations/dde-session-shell_lt.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_lv.ts b/translations/dde-session-shell_lv.ts
index 0991e1230..a0ef93399 100644
--- a/translations/dde-session-shell_lv.ts
+++ b/translations/dde-session-shell_lv.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ml.ts b/translations/dde-session-shell_ml.ts
index c89cf5eff..5e6ae00b2 100644
--- a/translations/dde-session-shell_ml.ts
+++ b/translations/dde-session-shell_ml.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_mn.ts b/translations/dde-session-shell_mn.ts
index 3fdb6e87e..889fd89cb 100644
--- a/translations/dde-session-shell_mn.ts
+++ b/translations/dde-session-shell_mn.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ms.ts b/translations/dde-session-shell_ms.ts
index 1c8c59379..45b973203 100644
--- a/translations/dde-session-shell_ms.ts
+++ b/translations/dde-session-shell_ms.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_nb.ts b/translations/dde-session-shell_nb.ts
index bf646df76..8800f2171 100644
--- a/translations/dde-session-shell_nb.ts
+++ b/translations/dde-session-shell_nb.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_ne.ts b/translations/dde-session-shell_ne.ts
index 68f40376c..722fa7eca 100644
--- a/translations/dde-session-shell_ne.ts
+++ b/translations/dde-session-shell_ne.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_nl.ts b/translations/dde-session-shell_nl.ts
index a00a4f4f5..7a77b87b6 100644
--- a/translations/dde-session-shell_nl.ts
+++ b/translations/dde-session-shell_nl.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_pa.ts b/translations/dde-session-shell_pa.ts
index c558a4dd4..e8823b378 100644
--- a/translations/dde-session-shell_pa.ts
+++ b/translations/dde-session-shell_pa.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_pam.ts b/translations/dde-session-shell_pam.ts
index 08242d1ee..c2d7e4edf 100644
--- a/translations/dde-session-shell_pam.ts
+++ b/translations/dde-session-shell_pam.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_pl.ts b/translations/dde-session-shell_pl.ts
index c60e691a5..217e14da8 100644
--- a/translations/dde-session-shell_pl.ts
+++ b/translations/dde-session-shell_pl.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_pt.ts b/translations/dde-session-shell_pt.ts
index ba86a0acb..25361e282 100644
--- a/translations/dde-session-shell_pt.ts
+++ b/translations/dde-session-shell_pt.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+ Confirm Login
+
+
+
+ Cancel
+
+
+
+ This account is already logged in elsewhere. Continuing will force logout the existing session. Proceed with login?
+
+
+
+ Two remote users are already signed in, which is the maximum allowed. Wait for a remote user to sign out, then try again.
+
+
+
AuthFace
diff --git a/translations/dde-session-shell_pt_BR.ts b/translations/dde-session-shell_pt_BR.ts
index 12b12bc83..5842245ab 100644
--- a/translations/dde-session-shell_pt_BR.ts
+++ b/translations/dde-session-shell_pt_BR.ts
@@ -1,4 +1,23 @@
+
+ ActiveSessionConfirmWidget
+
+