Repository navigation
docs: update ddm documentation to match current code - #118
Conversation
Reviewer's GuideThe PR brings all user-facing documentation in line with the current Treeland-integrated DDM implementation, replacing obsolete SDDM greeter guidance with accurate build, deployment, architecture, theming, configuration, and man-page information. Sequence diagram for the DDM login flowsequenceDiagram
participant DDM as ddm daemon
participant TL as Treeland greeter
participant HELPER as ddm-helper
participant LOGIND as systemd-logind
participant SESSION as User session
DDM->>TL: Start treeland.service
TL->>DDM: Connect
DDM-->>TL: ShowGreeter
TL->>DDM: Login
DDM->>HELPER: fork()/exec() PAM helper
HELPER->>HELPER: pam_authenticate()
HELPER->>HELPER: pam_open_session()
HELPER-->>DDM: Authentication result
DDM->>LOGIND: Open user session
DDM->>SESSION: Start session
DDM-->>TL: UserLoggedIn
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/ARCHITECTURE.md" line_range="143" />
<code_context>
+## Configuration
+
+Configuration is loaded, from lowest to highest precedence, from the system
+configuration directory (`/usr/lib/ddm/ddm.conf.d` by default),
+`/etc/ddm.conf.d` and `/etc/ddm.conf`. The last user and session are stored in
+`state.conf` in the `dde` user's home directory. See **ddm.conf**(5) and
</code_context>
<issue_to_address>
**Configuration path is wrong**
When DDM is configured without overriding CMAKE_INSTALL_PREFIX, `SYSTEM_CONFIG_DIR` resolves to `/usr/local/lib/ddm/ddm.conf.d` with CMake's default install prefix, so users following the documented `/usr/lib/ddm/ddm.conf.d` path place configuration where a default-prefix installation will not load it.
Describe the path as `${CMAKE_INSTALL_PREFIX}/lib/ddm/ddm.conf.d` (defaulting to `/usr/local/lib/ddm/ddm.conf.d`), or explicitly document the package-specific `/usr` prefix.
</issue_to_address>
### Comment 2
<location path="docs/ARCHITECTURE.md" line_range="95" />
<code_context>
+ - **Wayland**: the daemon stops Treeland and runs the session's compositor
+ through the `Wayland.SessionCommand` script.
+ - **X11**: the daemon stops Treeland, starts the X server, writes an
+ authorization cookie to `/tmp/xauth_XXXXXX` and runs the session through
+ the `X11.SessionCommand` script.
+6. `Logout`, `Lock` and `Unlock` messages are forwarded to systemd-logind
</code_context>
<issue_to_address>
**X authorization path is wrong**
When an X11 session is started and an operator follows the documented cookie path, `XAuth` stores authorization files under `RUNTIME_DIR`, but the documentation directs operators to `/tmp/xauth_XXXXXX`; they look in the wrong location when troubleshooting X11 sessions.
Document the actual runtime-directory path used by `XAuth`.
</issue_to_address>c564cd6 to
1de78b6
Compare
1. Describe ddm as the Deepin Display Manager for Treeland and drop the removed QtQuick greeter from README, INSTALL and ARCHITECTURE. 2. Document the ddm-helper session helper, dde-seatd and the treeland_ddm_v1 protocol, and the real login flow. 3. Add the missing [Autologin] section and fix stale options, paths and the removed --test-mode in the man pages. 4. Replace the obsolete SDDM theming guide with a pointer to Treeland's greeter. 5. Fix the ddm.service description, which still said "Simple Desktop Display Manager". Log: ddm documentation (README, INSTALL, ARCHITECTURE, THEMING and man pages) is now consistent with the current code. Influence: 1. Build the man pages with cmake -DBUILD_MAN_PAGES=ON and check ddm(1), ddm.conf(5) and ddm-state.conf(5). 2. Follow the README and INSTALL build instructions on a deepin system. 3. Compare the architecture description with the ddm to Treeland login flow. docs: 根据当前代码更新 ddm 文档 1. 将 ddm 描述为面向 Treeland 的 Deepin Display Manager,并在 README、 INSTALL 和 ARCHITECTURE 中移除已删除的 QtQuick greeter。 2. 补充 ddm-helper 会话助手、dde-seatd 与 treeland_ddm_v1 协议, 以及真实的登录流程。 3. 在 man 手册中补充缺失的 [Autologin] 段,修正过时选项、路径 和已删除的 --test-mode。 4. 用指向 Treeland greeter 的说明替换过时的 SDDM 主题文档。 5. 修正 ddm.service 中仍为 "Simple Desktop Display Manager" 的描述。 Log: ddm 文档(README、INSTALL、ARCHITECTURE、THEMING 和 man 手册)已与当前代码保持一致。 Influence: 1. 使用 cmake -DBUILD_MAN_PAGES=ON 构建 man 手册,检查 ddm(1)、ddm.conf(5)、ddm-state.conf(5)。 2. 在 deepin 系统上按 README 和 INSTALL 的说明进行构建验证。 3. 对照 ddm 到 Treeland 的登录流程检查架构描述。
1de78b6 to
a67bdab
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm, wineee The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 语法正确,逻辑清晰,文档结构合理。所有 Markdown 文件语法正确,RST 手册页模板使用正确的 reStructuredText 语法,systemd 服务文件语法正确。CMake 模板变量(@STATE_DIR@、@CONFIG_FILE@ 等)在 RST 文件中使用正确。[Autologin] 配置节格式与现有配置节一致。 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 代码结构清晰,注释完整,文档内容准确且与代码实现一致。README.zh_CN.md 是 README.md 的完整且准确的中文翻译。ARCHITECTURE.md 提供了详细的组件描述、登录流程和通信通道说明。THEMING.md 正确反映了 DDM 不再拥有自己的 greeter 的事实。手册页更新了准确的配置选项。各文件之间术语使用一致(greeter 用户 dde、Treeland 合成器等)。无重复内容,无残留调试信息。 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 性能良好,资源使用合理。本次提交为纯文档更新,不涉及任何代码性能问题,无算法复杂度问题,无资源使用问题。 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 安全合规,无安全风险。文档中无硬编码密钥或敏感信息,无注入风险。services/ddm.service.in 仅更新了 Description 字段(从 Simple Desktop Display Manager 改为 Deepin Display Manager),无安全影响。文档正确描述了安全相关内容(PAM 认证、X 授权文件路径等),这些是对现有行为的文档描述,非新引入的代码。 💡 改进建议代码示例// 本次提交为纯文档更新,无需代码修复示例本报告由 AI 代码审查工具自动生成 |
|
/merge |
Update the DDM documentation so that it matches the current code.
README.md/README.zh_CN.md: describe ddm as the display manager forTreeland, list the real build and runtime dependencies, and explain how ddm
is started. The Chinese README was an empty
TODO:before.INSTALL.md: CMake-based instructions, the actual CMake options, theddegreeter user and the C++20 requirement.
docs/ARCHITECTURE.md: describe the daemon, theddm-helpersession helper,the Treeland greeter,
dde-seatd, the login flow and the communicationchannels (greeter socket,
treeland_ddm_v1, D-Bus).docs/THEMING.md: the SDDM QtQuick greeter no longer exists in thisrepository; document that the login screen is Treeland's and point at its
GreeterProxy/SessionModel/UserModel.--test-mode, add the missing[Autologin]section, fix stale paths, defaults and the state file location, and remove
the obsolete
General.DisplayServerreference.The man pages were rendered with
rst2manfrom docutils 0.22.3 to check theRST.
Multica: WM-618
Summary by Sourcery
Bring all user-facing documentation and man pages into alignment with the current Treeland-based DDM implementation.
Enhancements:
Build:
Documentation: