Skip to content

feat: exec auto start service after quick-login unlocked#170

Merged
yixinshark merged 1 commit intolinuxdeepin:masterfrom
yixinshark:feat-quickloginautostart
Nov 27, 2025
Merged

feat: exec auto start service after quick-login unlocked#170
yixinshark merged 1 commit intolinuxdeepin:masterfrom
yixinshark:feat-quickloginautostart

Conversation

@yixinshark
Copy link
Copy Markdown
Contributor

@yixinshark yixinshark commented Nov 27, 2025

quick-login was unlocked, then exec autostart service

Log: as title
Pms: BUG-321889

Summary by Sourcery

Enhancements:

quick-login was unlocked, then exec autostart service

Log: as title
Pms: BUG-321889
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Nov 27, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the dde-quick-login X11 systemd unit so that an autostart service is executed after quick-login is unlocked, addressing BUG-321889.

File-Level Changes

Change Details Files
Update dde-quick-login X11 systemd unit to trigger an autostart service once quick-login is unlocked.
  • Modify the dde-quick-login@x11.service unit configuration to hook into the point where quick-login is unlocked
  • Add or adjust ExecStart/ExecStartPost or related directives so an autostart service runs after unlock
  • Ensure the unit dependencies/order are correct so the autostart service runs at the right time in the session-pre target
systemd/dde-session-pre.target.wants/dde-quick-login@x11.service

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a 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 they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

这是一个systemd服务配置文件的修改,我来分析一下这个变更:

  1. 变更内容:
  1. 代码质量分析:
  • 修改符合systemd配置文件的语法规范
  • 服务命名遵循了既有的命名规范(使用@模板实例化)
  • 保持了与其他配置项的一致性
  1. 潜在问题及建议:
    a) 依赖顺序:
  • 建议明确这三个服务之间的依赖关系
  • 考虑是否需要添加After=指令来确保正确的启动顺序

b) 错误处理:

  • 当前配置只定义了OnSuccess,建议考虑添加OnFailure=指令来处理失败情况
  • 可以考虑添加Restart=和RestartSec=来定义服务失败时的重启策略

c) 安全性:

d) 性能考虑:

  • 评估这三个服务是否可以并行启动
  • 如果服务之间有依赖关系,考虑使用适当的依赖指令来优化启动时间

建议的改进版本:

[Unit]
Description=Quick Login Service for X11
PartOf=dde-session-pre.target
Before=dde-session-pre.target

# SuccessExitStatus=0,launch dde-lock.service
OnSuccess=dde-lock.service dde-version-checker@quick-login.service dde-autostart@quick-login.service
OnFailure=dde-failure-handler@quick-login.service

[Service]
Slice=session.slice
# 添加以下配置以增强安全性
Type=oneshot
RemainAfterExit=yes

这些修改建议:

  1. 添加了OnFailure处理
  2. 明确了服务类型为oneshot
  3. 添加了RemainAfterExit确保服务状态保持
  4. 保持了原有的Slice配置

建议在实际部署前进行充分测试,特别是:

  1. 测试服务启动顺序
  2. 验证失败场景下的行为
  3. 确认权限设置是否合适
  4. 评估对系统启动时间的影响

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, yixinshark

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yixinshark yixinshark merged commit 9ee5020 into linuxdeepin:master Nov 27, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants