fix: delegate autostart to systemd for reliable restart#271
Merged
Conversation
Changed the XDG autostart desktop file to use `systemctl --user start dde-clipboard.service` instead of directly executing the binary. This ensures the clipboard process is managed by systemd, so Restart=always in the service file takes effect when the process is killed. Log: Fixed clipboard not restarting after being killed when started via XDG autostart Influence: 1. Test killing dde-clipboard process and verify it restarts automatically 2. Verify clipboard functionality continues working after restart 3. Test system startup to ensure clipboard service starts properly 4. Verify clipboard window appears correctly without transparency issues fix: 通过 systemd 托管 autostart 启动,修复 kill 后无法自动重启 将 XDG autostart 桌面文件的 Exec 改为使用 `systemctl --user start dde-clipboard.service` 而非直接执行二进制文件。这样剪贴板进程由 systemd 管理,确保服务文件中的 Restart=always 在进程被杀死后生效。 Log: 修复剪切板通过 XDG autostart 启动后被杀死无法自动重启的问题 Influence: 1. 测试手动杀死 dde-clipboard 进程并验证其自动重启 2. 验证剪贴板功能在服务重启后继续正常工作 3. 测试系统启动时剪贴板服务是否正确启动 4. 验证剪切板窗口启动时无透明问题 PMS: BUG-365901
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRoutes dde-clipboard XDG autostart through the user systemd service instead of launching the binary directly, so the systemd unit’s Restart=always reliably handles process restarts. 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 left some high level feedback:
- Consider what happens on systems where
systemd --useris unavailable or fails (e.g., non-systemd sessions) and whether the desktop entry should degrade gracefully or detect/guard against this case. - If the desktop entry previously passed any arguments or environment to
dde-clipboard, double-check whether those need to be reflected in the systemd service, otherwise behavior may subtly change when started viasystemctl --user.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider what happens on systems where `systemd --user` is unavailable or fails (e.g., non-systemd sessions) and whether the desktop entry should degrade gracefully or detect/guard against this case.
- If the desktop entry previously passed any arguments or environment to `dde-clipboard`, double-check whether those need to be reflected in the systemd service, otherwise behavior may subtly change when started via `systemctl --user`.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
|
TAG Bot New tag: 6.1.31 |
yixinshark
approved these changes
Jun 26, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ivy233, yixinshark 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the XDG autostart desktop file to use
systemctl --user start dde-clipboard.serviceinstead of directly executing the binary. This ensures the clipboard process is managed by systemd, so Restart=always in the service file takes effect when the process is killed.Log: Fixed clipboard not restarting after being killed when started via XDG autostart
Influence:
fix: 通过 systemd 托管 autostart 启动,修复 kill 后无法自动重启
将 XDG autostart 桌面文件的 Exec 改为使用
systemctl --user start dde-clipboard.service而非直接执行二进制文件。这样剪贴板进程由systemd 管理,确保服务文件中的 Restart=always 在进程被杀死后生效。
Log: 修复剪切板通过 XDG autostart 启动后被杀死无法自动重启的问题
Influence:
PMS: BUG-365901
Summary by Sourcery
Bug Fixes: