Repository navigation
fix: launch default mail client via dde-shortcut-tool mime handler - #187
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe mail shortcut now launches the system default mail client through dde-shortcut-tool's mailto MIME handler, avoiding systemd transient-cgroup cleanup of clients started by xdg-email. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
|
TAG Bot New tag: 1.0.45 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, 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 |
71ccc21 to
695e68f
Compare
The mail shortcut ran `xdg-email` through `dde-am -c`, which starts a systemd transient service. `xdg-email` is a short-lived wrapper that spawns the real client via `gio open` and exits immediately, so systemd kills the remaining cgroup children (KillMode=control-group) and nothing visible happens. Change the mail trigger to `dde-shortcut-tool launch mime x-scheme-handler/mailto` and bump its serial 0->1, aligning with the existing audiomedia/music/pictures/video shortcuts. The mime handler resolves the default app via xdg-mime and launches it through the `dde-am <appId>` Launch path, where the real app is the main process of its own unit and survives. 邮件快捷键经 `dde-am -c` 执行 `xdg-email`,其为秒退的包装脚本, 拉起真实客户端后主进程即退出,systemd 按默认 control-group 清理 同组残留进程,导致客户端被杀、无任何反应。 将邮件触发改为 `dde-shortcut-tool launch mime x-scheme-handler/mailto` 并将 serial 由 0 递增为 1,与现有的 audiomedia/music/pictures/video 保持一致。mime 通道经 xdg-mime 解析默认应用,再走 `dde-am <appId>` Launch 路径拉起,真实应用为独立单元主进程,可常驻存活。 Log: launch default mail client via dde-shortcut-tool mime handler Pms: BUG-378941 Change-Id: Ib9e068286e227d985900058541b6e99abfe6a71d
695e68f to
82b0778
Compare
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Summary
xdg-emailviadde-am -c; it now usesdde-shortcut-tool launch mime x-scheme-handler/mailto(serial 0->1), same pattern as audiomedia/music/pictures/video.xdg-emailis a short-lived wrapper; once it exits, systemd kills the transient cgroup children (default KillMode=control-group), so the real mail client never stays up.Test plan
python3 -m json.toolvalidates the edited shortcut json.mailto=cmclient.desktop: directdde-shortcut-tool launch mime x-scheme-handler/mailtoopens cmclient and it survives.dde-am -c /usr/bin/dde-shortcut-tool -- launch mime x-scheme-handler/mailto: cmclient stays running; transient unit exits cleanly with noChild cmclient killed TERM. Before the fix,dde-am -c /usr/bin/xdg-emailshowed exactly that kill in journal and no visible client.PMS
Pms: BUG-378941
Summary by Sourcery
Bug Fixes: