Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ddm-archlinux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Install base dependencies
run: |
pacman -S --noconfirm --noprogressbar base-devel bash gcc-libs glibc libxau pam qt6-base qt6-declarative systemd-libs ttf-font xorg-server xorg-xauth git extra-cmake-modules python-docutils qt6-tools treeland-protocols ninja
pacman -S --noconfirm --noprogressbar base-devel bash gcc-libs glibc libxau pam qt6-base qt6-declarative dtk6core systemd-libs ttf-font xorg-server xorg-xauth git extra-cmake-modules python-docutils qt6-tools treeland-protocols ninja

- name: Build and Install treeland-protocols
run: |
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.25.0)

project(DDM
VERSION 0.3.8
VERSION 0.3.9
LANGUAGES CXX C)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down Expand Up @@ -83,6 +83,9 @@ find_package(TreelandProtocols 0.5.3 REQUIRED)
find_package(Qt6 CONFIG REQUIRED Core DBus Network)
qt_standard_project_setup(REQUIRES 6.6)

# DTK (DConfig)
find_package(Dtk6 REQUIRED COMPONENTS Core)

# Uninstall target
if ("${ECM_VERSION}" VERSION_LESS "1.7.0")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
Expand Down Expand Up @@ -117,10 +120,7 @@ set(RUNTIME_DIR "${RUNTIME_DIR_DEFAULT}"
set(SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/Xsession" CACHE PATH "Script to execute when starting the X11 desktop session")
set(WAYLAND_SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/wayland-session" CACHE PATH "Script to execute when starting the Wayland desktop session")

set(CONFIG_FILE "${CMAKE_INSTALL_FULL_SYSCONFDIR}/ddm.conf" CACHE PATH "Path of the ddm config file")
set(CONFIG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/ddm.conf.d" CACHE PATH "Path of the ddm config directory")
set(ACCOUNTSSERVICE_DATA_DIR "/var/lib/AccountsService" CACHE PATH "Path of the accountsservice data directory")
set(SYSTEM_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/ddm/ddm.conf.d" CACHE PATH "Path of the system ddm config directory")
set(LOG_FILE "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/ddm.log" CACHE PATH "Path of the ddm log file")
Comment on lines -120 to 124

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The CMake cache variables CONFIG_FILE, CONFIG_DIR, and SYSTEM_CONFIG_DIR are removed while the man-page templates still reference them during configuration. The generated ddm(1), ddm.conf(5), and ddm-state.conf(5) documentation therefore contains empty configuration paths instead of describing the DConfig storage locations.

Triggers: When BUILD_MAN_PAGES is enabled.

Suggested fix: Update the man-page templates and their configure inputs to document the DConfig schema and state locations, or retain suitable path variables for the generated documentation.

set(DBUS_CONFIG_FILENAME "org.freedesktop.DisplayManager.conf" CACHE STRING "Name of the ddm config file")
set(COMPONENTS_TRANSLATION_DIR "${DATA_INSTALL_DIR}/translations" CACHE PATH "Components translations directory")
Expand Down
15 changes: 15 additions & 0 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ install(FILES
DESTINATION "${DBUS_CONFIG_DIR}"
)

# DConfig schemas (org.deepin.dde.ddm)
set(DDM_DCONFIG_DIR "${CMAKE_INSTALL_FULL_DATADIR}/dsg/configs/org.deepin.dde.ddm")

configure_file(
"dconfig/org.deepin.dde.ddm.json.in"
"${CMAKE_CURRENT_BINARY_DIR}/dconfig/org.deepin.dde.ddm.json"
@ONLY
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/dconfig/org.deepin.dde.ddm.json"
"dconfig/org.deepin.dde.ddm.state.json"
DESTINATION "${DDM_DCONFIG_DIR}"
)

install(FILES
"scripts/Xsession"
"scripts/Xsetup"
Expand Down
237 changes: 237 additions & 0 deletions data/dconfig/org.deepin.dde.ddm.json.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"haltCommand": {
"value": "@HALT_COMMAND@",
"serial": 0,
"flags": [],
"name": "Halt Command",
"name[zh_CN]": "关机命令",
"description": "Halt command.",
"description[zh_CN]": "关机命令。",
"permissions": "read",
"visibility": "private"
},
"rebootCommand": {
"value": "@REBOOT_COMMAND@",
"serial": 0,
"flags": [],
"name": "Reboot Command",
"name[zh_CN]": "重启命令",
"description": "Reboot command.",
"description[zh_CN]": "重启命令。",
"permissions": "read",
"visibility": "private"
},
"namespaces": {
"value": [],
"serial": 0,
"flags": [],
"name": "Namespaces",
"name[zh_CN]": "命名空间",
"description": "Comma-separated list of paths bound to Linux namespaces to enter with setns() before starting the user session.",
"description[zh_CN]": "启动用户会话前通过 setns() 进入的 Linux 命名空间路径列表。",
"permissions": "read",
"visibility": "private"
},
"cursorTheme": {
"value": "",
"serial": 0,
"flags": [],
"name": "Cursor Theme",
"name[zh_CN]": "光标主题",
"description": "Cursor theme used in the greeter.",
"description[zh_CN]": "登录界面使用的光标主题。",
"permissions": "read",
"visibility": "private"
},
"cursorSize": {
"value": "",
"serial": 0,
"flags": [],
"name": "Cursor Size",
"name[zh_CN]": "光标大小",
"description": "Cursor size used in the greeter.",
"description[zh_CN]": "登录界面使用的光标大小。",
"permissions": "read",
"visibility": "private"
},
"x11ServerPath": {
"value": "/usr/bin/X",
"serial": 0,
"flags": [],
"name": "X11 Server Path",
"name[zh_CN]": "X11 Server 路径",
"description": "Path to the X server binary.",
"description[zh_CN]": "X server 可执行文件路径。",
"permissions": "read",
"visibility": "private"
},
"x11ServerArguments": {
"value": "-nolisten tcp",
"serial": 0,
"flags": [],
"name": "X11 Server Arguments",
"name[zh_CN]": "X11 Server 参数",
"description": "Arguments passed to the X server invocation.",
"description[zh_CN]": "传递给 X server 的启动参数。",
"permissions": "read",
"visibility": "private"
},
"x11SessionDir": {
"value": ["/usr/local/share/xsessions", "/usr/share/xsessions"],
"serial": 0,
"flags": [],
"name": "X11 Session Directories",
"name[zh_CN]": "X11 会话目录",
"description": "Comma-separated list of directories containing available X sessions.",
"description[zh_CN]": "包含可用 X 会话的目录列表。",
"permissions": "read",
"visibility": "private"
},
"x11SessionCommand": {
"value": "@SESSION_COMMAND@",
"serial": 0,
"flags": [],
"name": "X11 Session Command",
"name[zh_CN]": "X11 会话命令",
"description": "Path to a script to execute when starting the desktop session.",
"description[zh_CN]": "启动桌面会话时执行的脚本路径。",
"permissions": "read",
"visibility": "private"
},
"x11SessionLogFile": {
"value": ".local/share/ddm/xorg-session.log",
"serial": 0,
"flags": [],
"name": "X11 Session Log File",
"name[zh_CN]": "X11 会话日志文件",
"description": "Path to the user session log file, relative to the home directory.",
"description[zh_CN]": "用户会话日志文件路径,相对于用户主目录。",
"permissions": "read",
"visibility": "private"
},
"x11DisplayCommand": {
"value": "@DATA_INSTALL_DIR@/scripts/Xsetup",
"serial": 0,
"flags": [],
"name": "X11 Display Command",
"name[zh_CN]": "X11 显示启动命令",
"description": "Path to a script to execute when starting the display server.",
"description[zh_CN]": "启动显示服务器时执行的脚本路径。",
"permissions": "read",
"visibility": "private"
},
"x11DisplayStopCommand": {
"value": "@DATA_INSTALL_DIR@/scripts/Xstop",
"serial": 0,
"flags": [],
"name": "X11 Display Stop Command",
"name[zh_CN]": "X11 显示停止命令",
"description": "Path to a script to execute when stopping the display server.",
"description[zh_CN]": "停止显示服务器时执行的脚本路径。",
"permissions": "read",
"visibility": "private"
},
"waylandSessionDir": {
"value": ["/usr/local/share/wayland-sessions", "/usr/share/wayland-sessions"],
"serial": 0,
"flags": [],
"name": "Wayland Session Directories",
"name[zh_CN]": "Wayland 会话目录",
"description": "Comma-separated list of directories containing available Wayland sessions.",
"description[zh_CN]": "包含可用 Wayland 会话的目录列表。",
"permissions": "read",
"visibility": "private"
},
"waylandSessionCommand": {
"value": "@WAYLAND_SESSION_COMMAND@",
"serial": 0,
"flags": [],
"name": "Wayland Session Command",
"name[zh_CN]": "Wayland 会话命令",
"description": "Path to a script to execute when starting the desktop session.",
"description[zh_CN]": "启动桌面会话时执行的脚本路径。",
"permissions": "read",
"visibility": "private"
},
"waylandSessionLogFile": {
"value": ".local/share/ddm/wayland-session.log",
"serial": 0,
"flags": [],
"name": "Wayland Session Log File",
"name[zh_CN]": "Wayland 会话日志文件",
"description": "Path to the user session log file, relative to the home directory.",
"description[zh_CN]": "用户会话日志文件路径,相对于用户主目录。",
"permissions": "read",
"visibility": "private"
},
"singleSessionCommand": {
"value": "@WAYLAND_SESSION_COMMAND@",
"serial": 0,
"flags": [],
"name": "Single Session Command",
"name[zh_CN]": "单例会话命令",
"description": "Path to a script to execute when starting the Treeland user session.",
"description[zh_CN]": "启动 Treeland 用户会话时执行的脚本路径。",
"permissions": "read",
"visibility": "private"
},
"usersDefaultPath": {
"value": "/usr/local/bin:/usr/bin:/bin",
"serial": 0,
"flags": [],
"name": "Users Default Path",
"name[zh_CN]": "用户默认 PATH",
"description": "Default $PATH for logged in users.",
"description[zh_CN]": "已登录用户的默认 $PATH。",
"permissions": "read",
"visibility": "private"
},
"rememberLastUser": {
"value": true,
"serial": 0,
"flags": [],
"name": "Remember Last User",
"name[zh_CN]": "记住上次用户",
"description": "Remember the last successfully logged in user.",
"description[zh_CN]": "记住上次成功登录的用户。",
"permissions": "read",
"visibility": "private"
},
"rememberLastSession": {
"value": true,
"serial": 0,
"flags": [],
"name": "Remember Last Session",
"name[zh_CN]": "记住上次会话",
"description": "Remember the session of the last successfully logged in user.",
"description[zh_CN]": "记住上次成功登录用户的会话。",
"permissions": "read",
"visibility": "private"
},
"autologinUser": {
"value": "",
"serial": 0,
"flags": [],
"name": "Autologin User",
"name[zh_CN]": "自动登录用户",
"description": "User to log in automatically (empty disables autologin).",
"description[zh_CN]": "自动登录的用户(为空则禁用自动登录)。",
"permissions": "readwrite",
"visibility": "public"
},
"autologinSession": {
"value": "",
"serial": 0,
"flags": [],
"name": "Autologin Session",
"name[zh_CN]": "自动登录会话",
"description": "Session to load for automatic login (overrides the last used session).",
"description[zh_CN]": "自动登录时加载的会话(覆盖上次使用的会话)。",
"permissions": "readwrite",
"visibility": "public"
}
}
}
28 changes: 28 additions & 0 deletions data/dconfig/org.deepin.dde.ddm.state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"lastUser": {
"value": "",
"serial": 0,
"flags": [],
"name": "Last User",
"name[zh_CN]": "上次用户",
"description": "Name of the last logged-in user. This user will be preselected when the login screen appears.",
"description[zh_CN]": "上次登录的用户名,登录界面将预选该用户。",
"permissions": "readwrite",
"visibility": "private"
},
"lastSession": {
"value": "",
"serial": 0,
"flags": [],
"name": "Last Session",
"name[zh_CN]": "上次会话",
"description": "Name of the session for the last logged-in user. This session will be preselected when the login screen appears.",
"description[zh_CN]": "上次登录用户的会话名称,登录界面将预选该会话。",
"permissions": "readwrite",
"visibility": "private"
}
}
}
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
ddm (0.3.9) unstable; urgency=medium

* feat(config): switch DDM configuration to dconfig
* deb: add libdtk6core-dev build dependency for DConfig support

-- guolin <guolin@uniontech.com> Thu, 27 Aug 2026 10:58:49 +0800

ddm (0.3.8) unstable; urgency=medium

* feat: support automatic login for user sessions
Expand Down
2 changes: 2 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Maintainer: justforlxz <zhangdingyuan@deepin.org>
Build-Depends: debhelper-compat (= 13),
cmake (>= 3.4~),
extra-cmake-modules (>= 1.4.0~),
libdtk6core-dev,
libpam0g-dev,
libsystemd-dev [linux-any],
libwayland-dev,
Expand Down Expand Up @@ -39,6 +40,7 @@ Package: libddm-dev
Architecture: any
Depends: ${misc:Depends},
libddm( =${binary:Version}),
libdtk6core-dev,
qt6-base-dev
Description: DDM devel library
provide PAM headers
2 changes: 1 addition & 1 deletion services/ddm-tmpfiles.conf.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Home dir of the ddm user, also contains state.conf
# Home dir of the ddm user
d ${STATE_DIR} 0750 dde dde
# This contains X11 auth files passed to Xorg and the greeter
d ${RUNTIME_DIR} 0711 root root
Expand Down
7 changes: 5 additions & 2 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
configure_file("Constants.h.in" "Constants.h" IMMEDIATE @ONLY)

set(PUBLIC_HEADERS
${CMAKE_SOURCE_DIR}/src/common/ConfigReader.h
${CMAKE_SOURCE_DIR}/src/common/Configuration.h
${CMAKE_SOURCE_DIR}/src/common/ConfigReader.h
${CMAKE_SOURCE_DIR}/src/common/MessageHandler.h
${CMAKE_SOURCE_DIR}/src/common/Messages.h
${CMAKE_SOURCE_DIR}/src/common/Session.h
Expand All @@ -13,8 +14,8 @@ set(PUBLIC_HEADERS
)

set(SRCS
${CMAKE_SOURCE_DIR}/src/common/ConfigReader.cpp
${CMAKE_SOURCE_DIR}/src/common/Configuration.cpp
${CMAKE_SOURCE_DIR}/src/common/ConfigReader.cpp
${CMAKE_SOURCE_DIR}/src/common/Session.cpp
${CMAKE_SOURCE_DIR}/src/common/SignalHandler.cpp
${CMAKE_SOURCE_DIR}/src/common/SocketWriter.cpp
Expand All @@ -36,6 +37,8 @@ target_link_libraries(common
Qt6::DBus
Qt6::Network
PkgConfig::LibXau
PUBLIC
Dtk6::Core
)

target_include_directories(common INTERFACE
Expand Down
Loading
Loading