-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Starting X11 dde-session using ddm #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: apr3vau 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 |
|
Hi @apr3vau. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's GuideThis PR implements X11 session startup within ddm by first launching a minimal Wayland-based greeter for authentication, then tearing it down on successful login to start a full Xorg server with updated greeter settings and skip-auth support. Sequence diagram for X11 session startup using ddm and Wayland greetersequenceDiagram
actor User
participant ddm as DDM Daemon
participant Greeter
participant Wayland as Wayland Compositor
participant Xorg as Xorg Server
User->>ddm: Selects X11 session (via ddm.conf)
ddm->>Wayland: Start minimal Wayland compositor
ddm->>Greeter: Start greeter in single mode
User->>Greeter: Login credentials
Greeter->>ddm: Authentication success
ddm->>Wayland: Stop Wayland compositor
ddm->>Greeter: Stop greeter
ddm->>Xorg: Start Xorg server
ddm->>Greeter: Start greeter with skip-auth and user context
User->>Greeter: Session starts (no further auth)
Greeter->>Xorg: Launch user session
Class diagram for updated Greeter and Auth classes with skip-auth supportclassDiagram
class Greeter {
+void setSingleMode(bool on = true)
+void setUser(QString user)
+void setSkipAuth(bool on = true)
+bool m_singleMode
+QString m_user
+bool m_skipAuth
}
class Auth {
+void setSkipAuth(bool on = true)
+bool skipAuth
+void start()
}
Greeter --> Auth : uses
Class diagram for HelperApp with skip-auth logicclassDiagram
class HelperApp {
+bool m_skipAuth
+void authenticate()
}
HelperApp --> Auth : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and found some issues that need to be addressed.
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/helper/UserSession.cpp:125` </location>
<code_context>
}
qInfo() << "Starting X11 session:" << m_displayServerCmd << command;
- if (m_displayServerCmd.isEmpty()) {
- auto args = QProcess::splitCommand(command);
- setProgram(args.takeFirst());
- setArguments(args);
- } else {
</code_context>
<issue_to_address>
Removal of fallback for empty m_displayServerCmd may break session startup.
Ensure m_displayServerCmd is always set, or add handling for empty values to prevent session startup failures.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @apr3vau, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements support for starting X11 sessions through ddm by using a temporary Wayland greeter for authentication before switching to the actual X11 server. The implementation includes authentication bypass capabilities and simplifies session command handling.
- Adds X11DisplayServerType support that boots a SingleWaylandDisplayServer as greeter, then switches to XorgDisplayServer after login
- Introduces skip-auth mode to bypass authentication for X11 sessions
- Fixes terminal control flag and unifies session command handling
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/helper/UserSession.cpp | Simplifies X11 session startup by removing wrapper helper and fixes terminal control flag |
| src/helper/HelperApp.h | Adds skip-auth flag member variable |
| src/helper/HelperApp.cpp | Implements skip-auth command line argument parsing and authentication bypass |
| src/daemon/Greeter.h | Adds user and skip-auth configuration methods and success signal |
| src/daemon/Greeter.cpp | Implements user/skip-auth setters and adds success signal handling |
| src/daemon/Display.cpp | Major refactor to support X11 via temporary Wayland greeter with session switching logic |
| src/auth/Auth.h | Adds session type tracking and skip-auth support |
| src/auth/Auth.cpp | Implements session type and skip-auth functionality |
| data/scripts/Xsetup | Adds xhost command for X11 access control |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
793108c to
672874f
Compare
|
TAG Bot New tag: 0.2.1 |
This commit enables starting sessions other than treeland with ddm. It use treeland as greeter to handle user login. Once user logged in, it kills the wayland compositor and start the desired user session.
This commit modifies X11DisplayServerType to start X11 with ddm. It use treeland as greeter to handle user login. Once user logged in, it kills the wayland compositor and start the X11 server.
Summary by Sourcery
Implement X11 session startup via ddm by launching a temporary Wayland greeter for authentication before tearing it down and starting the Xorg server, with new skip-auth support and simplified session launch logic.
New Features:
Bug Fixes:
Enhancements: