Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sddm for openSUSE:Factory checked in at 2026-07-21 22:53:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sddm (Old) and /work/SRC/openSUSE:Factory/.sddm.new.24530 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sddm" Tue Jul 21 22:53:37 2026 rev:74 rq:1366623 version:0.21.0 Changes: -------- --- /work/SRC/openSUSE:Factory/sddm/sddm.changes 2025-06-24 20:45:18.794763441 +0200 +++ /work/SRC/openSUSE:Factory/.sddm.new.24530/sddm.changes 2026-07-21 22:53:40.987939901 +0200 @@ -1,0 +2,11 @@ +Sat Jul 18 16:54:48 UTC 2026 - Fabian Vogt <[email protected]> + +- Introduce patch to make the default session configurable + beyond xsessions/default.desktop and migrate to it: + * 0001-Introduce-DefaultSession-option-in-sddm.conf.patch + * 0002-Migrate-from-default.desktop-to-General-DefaultSessi.patch +- Drop then unnecessary hunk from + 0001-Read-the-DISPLAYMANAGER_AUTOLOGIN-value-from-sysconf.patch +- Rebase 0003-Leave-duplicate-symlinks-out-of-the-SessionModel.patch + +------------------------------------------------------------------- New: ---- 0001-Introduce-DefaultSession-option-in-sddm.conf.patch 0002-Migrate-from-default.desktop-to-General-DefaultSessi.patch ----------(New B)---------- New: beyond xsessions/default.desktop and migrate to it: * 0001-Introduce-DefaultSession-option-in-sddm.conf.patch * 0002-Migrate-from-default.desktop-to-General-DefaultSessi.patch New: * 0001-Introduce-DefaultSession-option-in-sddm.conf.patch * 0002-Migrate-from-default.desktop-to-General-DefaultSessi.patch - Drop then unnecessary hunk from ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sddm.spec ++++++ --- /var/tmp/diff_new_pack.kUStSD/_old 2026-07-21 22:53:42.015974909 +0200 +++ /var/tmp/diff_new_pack.kUStSD/_new 2026-07-21 22:53:42.019975045 +0200 @@ -1,7 +1,7 @@ # # spec file for package sddm # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -73,10 +73,13 @@ Patch56: 0004-Reset-daemonApp-first-in-the-Display-constructor.patch Patch57: 0005-If-autologin-is-used-avoid-starting-a-display-server.patch # Patch100-?: PATCH-FIX-OPENSUSE +# Patch100 may be useful for upstream as well +Patch100: 0001-Introduce-DefaultSession-option-in-sddm.conf.patch Patch101: 0001-Write-the-daemon-s-PID-to-a-file-on-startup.patch Patch102: 0001-Set-XAUTHLOCALHOSTNAME-in-sessions.patch Patch103: 0001-Read-the-DISPLAYMANAGER_AUTOLOGIN-value-from-sysconf.patch Patch104: sddm-service-handle-plymouth.patch +Patch105: 0002-Migrate-from-default.desktop-to-General-DefaultSessi.patch Patch107: 0003-Leave-duplicate-symlinks-out-of-the-SessionModel.patch BuildRequires: cmake BuildRequires: fdupes ++++++ 00-general.conf ++++++ --- /var/tmp/diff_new_pack.kUStSD/_old 2026-07-21 22:53:42.055976271 +0200 +++ /var/tmp/diff_new_pack.kUStSD/_new 2026-07-21 22:53:42.063976543 +0200 @@ -1,3 +1,6 @@ +[General] +DefaultSession=/usr/share/xsessions/default.desktop + [XDisplay] ServerPath=/usr/bin/X SessionCommand=/usr/etc/X11/xdm/Xsession ++++++ 0001-Introduce-DefaultSession-option-in-sddm.conf.patch ++++++ >From c1b8b0bcbbba6471d568b5da551c1f72d3e37185 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <[email protected]> Date: Sat, 28 Jun 2025 16:09:32 +0200 Subject: [PATCH 1/2] Introduce DefaultSession option in sddm.conf This allows to set a default entry for the session selector in case there is no remembered last session. Useful for the first use of SDDM after installation and if RememberLastSession is disabled. --- data/man/sddm.conf.rst.in | 4 ++++ src/common/Configuration.h | 1 + src/daemon/Display.cpp | 15 +++++++++++++++ src/greeter/SessionModel.cpp | 6 +++++- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/data/man/sddm.conf.rst.in b/data/man/sddm.conf.rst.in index 0d00919..5e55f88 100644 --- a/data/man/sddm.conf.rst.in +++ b/data/man/sddm.conf.rst.in @@ -69,6 +69,10 @@ OPTIONS or "compose" for dead keys support. Leave this empty if unsure. +`DefaultSession=` + Path to session file that is selected by default if there is no + remembered last session. + `Namespaces=` Comma-separated list of paths bound to Linux namespaces to enter with setns() before starting the user session. For example, to enter network diff --git a/src/common/Configuration.h b/src/common/Configuration.h index 4c3572d..e94206a 100644 --- a/src/common/Configuration.h +++ b/src/common/Configuration.h @@ -48,6 +48,7 @@ namespace SDDM { Entry(InputMethod, QString, QStringLiteral("qtvirtualkeyboard"), _S("Input method module")); Entry(Namespaces, QStringList, QStringList(), _S("Comma-separated list of Linux namespaces for user session to enter")); Entry(GreeterEnvironment, QStringList, QStringList(), _S("Comma-separated list of environment variables to be set")); + Entry(DefaultSession, QString, QString(), _S("Path to session file that is selected by default. RememberLastSession takes precedence over this.")); // Name Entries (but it's a regular class again) Section(Theme, Entry(ThemeDir, QString, _S(DATA_INSTALL_DIR "/themes"), _S("Theme directory path")); diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp index e10977e..6182017 100644 --- a/src/daemon/Display.cpp +++ b/src/daemon/Display.cpp @@ -181,12 +181,27 @@ namespace SDDM { if (autologinSession.isEmpty()) { autologinSession = stateConfig.Last.Session.get(); } + // still not configured: try configured default + if (autologinSession.isEmpty()) { + autologinSession = mainConfig.DefaultSession.get(); + } + if (findSessionEntry(mainConfig.Wayland.SessionDir.get(), autologinSession)) { m_autologinSession.setTo(Session::WaylandSession, autologinSession); } else if (findSessionEntry(mainConfig.X11.SessionDir.get(), autologinSession)) { m_autologinSession.setTo(Session::X11Session, autologinSession); } else { qCritical() << "Unable to find autologin session entry" << autologinSession; + + // not found: use configured default + autologinSession = mainConfig.DefaultSession.get(); + if (findSessionEntry(mainConfig.Wayland.SessionDir.get(), autologinSession)) { + m_autologinSession.setTo(Session::WaylandSession, autologinSession); + } else if (findSessionEntry(mainConfig.X11.SessionDir.get(), autologinSession)) { + m_autologinSession.setTo(Session::X11Session, autologinSession); + } else { + qCritical() << "Unable to find fallback autologin session entry" << autologinSession; + } } } diff --git a/src/greeter/SessionModel.cpp b/src/greeter/SessionModel.cpp index 61b115b..2ec17f9 100644 --- a/src/greeter/SessionModel.cpp +++ b/src/greeter/SessionModel.cpp @@ -164,9 +164,13 @@ namespace SDDM { delete si; } } + QString lastSession = stateConfig.Last.Session.get(); + if (lastSession.isEmpty() || !QFile::exists(lastSession)) + lastSession = mainConfig.DefaultSession.get(); + // find out index of the last session for (int i = 0; i < d->sessions.size(); ++i) { - if (d->sessions.at(i)->fileName() == stateConfig.Last.Session.get()) { + if (d->sessions.at(i)->fileName() == lastSession) { d->lastIndex = i; break; } -- 2.54.0 ++++++ 0001-Read-the-DISPLAYMANAGER_AUTOLOGIN-value-from-sysconf.patch ++++++ --- /var/tmp/diff_new_pack.kUStSD/_old 2026-07-21 22:53:42.095977633 +0200 +++ /var/tmp/diff_new_pack.kUStSD/_new 2026-07-21 22:53:42.099977769 +0200 @@ -6,8 +6,6 @@ Support DISPLAYMANAGER_AUTOLOGIN entry from /etc/sysconfig/displaymanager, the value overwrites any entry in sddm.conf/[Autologin]/User. -Patch also defaults to default.desktop as default autologin session. -This is controlled only by sddm.conf file. --- CMakeLists.txt | 1 + src/common/Configuration.h | 5 +++-- @@ -27,19 +25,6 @@ set(LOG_FILE "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/sddm.log" CACHE PATH "Path of the sddm log file") set(DBUS_CONFIG_FILENAME "org.freedesktop.DisplayManager.conf" CACHE STRING "Name of the sddm config file") set(COMPONENTS_TRANSLATION_DIR "${DATA_INSTALL_DIR}/translations-qt${QT_MAJOR_VERSION}" CACHE PATH "Components translations directory") -Index: sddm-0.21.0/src/common/Configuration.h -=================================================================== ---- sddm-0.21.0.orig/src/common/Configuration.h -+++ sddm-0.21.0/src/common/Configuration.h -@@ -108,7 +108,7 @@ namespace SDDM { - - Config(StateConfig, []()->QString{auto tmp = getpwnam("sddm"); return tmp ? QString::fromLocal8Bit(tmp->pw_dir) : QStringLiteral(STATE_DIR);}().append(QStringLiteral("/state.conf")), QString(), QString(), - Section(Last, -- Entry(Session, QString, QString(), _S("Name of the session for the last logged-in user.\n" -+ Entry(Session, QString, _S("/usr/share/xsessions/default.desktop"), _S("Name of the session for the last logged-in user.\n" - "This session will be preselected when the login screen appears.")); - Entry(User, QString, QString(), _S("Name of the last logged-in user.\n" - "This user will be preselected when the login screen appears")); Index: sddm-0.21.0/src/common/Constants.h.in =================================================================== --- sddm-0.21.0.orig/src/common/Constants.h.in ++++++ 0002-Migrate-from-default.desktop-to-General-DefaultSessi.patch ++++++ >From 22321b6e859b11cc6e00ecfdf2054dd06d9a24d6 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <[email protected]> Date: Sat, 18 Jul 2026 21:49:52 +0200 Subject: [PATCH 2/2] Migrate from default.desktop to [General] DefaultSession If the last login was through autologin, state.conf will have [Last] Session=/usr/share/xsessions/default.desktop. If the used desktop drops the X11 session, this may point to some other desktop that still supports X11 (e.g. the default fallback: IceWM), which is unexpected for users. A similar case applies to [Autologin] Session. This is set to "default.desktop" by kcm_sddm by default, but without indicating a specific session type. Try to avoid the unexpected flip by using [General] DefaultSession= instead of "default.desktop". That can be set through sddm config dropins supplied by desktops in a similar priority based system as update-alternatives did for default.desktop. --- src/daemon/Display.cpp | 4 ++++ src/greeter/SessionModel.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/daemon/Display.cpp b/src/daemon/Display.cpp index 6182017..0cf8443 100644 --- a/src/daemon/Display.cpp +++ b/src/daemon/Display.cpp @@ -185,6 +185,10 @@ namespace SDDM { if (autologinSession.isEmpty()) { autologinSession = mainConfig.DefaultSession.get(); } + // migrate away from default.desktop + if (QFileInfo(autologinSession).fileName() == QStringLiteral("default.desktop")) { + autologinSession = mainConfig.DefaultSession.get(); + } if (findSessionEntry(mainConfig.Wayland.SessionDir.get(), autologinSession)) { m_autologinSession.setTo(Session::WaylandSession, autologinSession); diff --git a/src/greeter/SessionModel.cpp b/src/greeter/SessionModel.cpp index 2ec17f9..9ee98cc 100644 --- a/src/greeter/SessionModel.cpp +++ b/src/greeter/SessionModel.cpp @@ -165,7 +165,7 @@ namespace SDDM { } } QString lastSession = stateConfig.Last.Session.get(); - if (lastSession.isEmpty() || !QFile::exists(lastSession)) + if (lastSession.isEmpty() || !QFile::exists(lastSession) || QFileInfo(lastSession).fileName() == QStringLiteral("default.desktop")) lastSession = mainConfig.DefaultSession.get(); // find out index of the last session -- 2.54.0 ++++++ 0003-Leave-duplicate-symlinks-out-of-the-SessionModel.patch ++++++ --- /var/tmp/diff_new_pack.kUStSD/_old 2026-07-21 22:53:42.147979404 +0200 +++ /var/tmp/diff_new_pack.kUStSD/_new 2026-07-21 22:53:42.155979677 +0200 @@ -8,11 +8,11 @@ src/greeter/SessionModel.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -diff --git a/src/greeter/SessionModel.cpp b/src/greeter/SessionModel.cpp -index 3a89d42..9eaab10 100644 ---- a/src/greeter/SessionModel.cpp -+++ b/src/greeter/SessionModel.cpp -@@ -136,6 +136,15 @@ namespace SDDM { +Index: sddm-0.21.0/src/greeter/SessionModel.cpp +=================================================================== +--- sddm-0.21.0.orig/src/greeter/SessionModel.cpp ++++ sddm-0.21.0/src/greeter/SessionModel.cpp +@@ -137,6 +137,15 @@ namespace SDDM { sessions.removeDuplicates(); for (auto& session : qAsConst(sessions)) { Session *si = new Session(type, session); @@ -28,19 +28,17 @@ bool execAllowed = true; QFileInfo fi(si->tryExec()); if (fi.isAbsolute()) { -@@ -164,8 +173,10 @@ namespace SDDM { - } - } +@@ -168,9 +177,11 @@ namespace SDDM { + if (lastSession.isEmpty() || !QFile::exists(lastSession) || QFileInfo(lastSession).fileName() == QStringLiteral("default.desktop")) + lastSession = mainConfig.DefaultSession.get(); + ++ lastSession = QFileInfo(lastSession).canonicalFilePath(); ++ // find out index of the last session -+ const QString canonicalLastSession = QFileInfo(stateConfig.Last.Session.get()).canonicalFilePath(); for (int i = 0; i < d->sessions.size(); ++i) { -- if (d->sessions.at(i)->fileName() == stateConfig.Last.Session.get()) { -+ const QString canonicalSession = QFileInfo(d->sessions.at(i)->fileName()).canonicalFilePath(); -+ if (canonicalSession == canonicalLastSession) { +- if (d->sessions.at(i)->fileName() == lastSession) { ++ if (QFileInfo(d->sessions.at(i)->fileName()).canonicalFilePath() == lastSession) { d->lastIndex = i; break; } --- -2.39.1 -
