From 82b07780f23602fb4ef5bac1c44f8354e1e81ea8 Mon Sep 17 00:00:00 2001 From: zhaoyingzhen Date: Mon, 12 Oct 2026 11:26:36 +0800 Subject: [PATCH] fix: launch default mail client via dde-shortcut-tool mime handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ` 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 ` Launch 路径拉起,真实应用为独立单元主进程,可常驻存活。 Log: launch default mail client via dde-shortcut-tool mime handler Pms: BUG-378941 Change-Id: Ib9e068286e227d985900058541b6e99abfe6a71d --- .../org.deepin.shortcut.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugin-qt/shortcut/configs/org.deepin.dde.keybinding.shortcut.mail/org.deepin.shortcut.json b/src/plugin-qt/shortcut/configs/org.deepin.dde.keybinding.shortcut.mail/org.deepin.shortcut.json index 5c46d308..251b84b7 100644 --- a/src/plugin-qt/shortcut/configs/org.deepin.dde.keybinding.shortcut.mail/org.deepin.shortcut.json +++ b/src/plugin-qt/shortcut/configs/org.deepin.dde.keybinding.shortcut.mail/org.deepin.shortcut.json @@ -46,9 +46,12 @@ }, "triggerValue": { "value": [ - "xdg-email" + "/usr/bin/dde-shortcut-tool", + "launch", + "mime", + "x-scheme-handler/mailto" ], - "serial": 0, + "serial": 1, "flags": [], "name": "triggerValue", "name[zh_CN]": "快捷键触发动作",