Bug 460173 - Can't send emails to TUI email clients when Konsole is not installed
Summary: Can't send emails to TUI email clients when Konsole is not installed
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.99.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-09 17:24 UTC by Moritz Poldrack
Modified: 2022-11-04 17:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Poldrack 2022-10-09 17:24:15 UTC
When sharing a document via email without having Konsole installed, the sharing screen just disappears without any information.

STEPS TO REPRODUCE
1. install skanpage
2. do not install konsole
3. scan something
4. Share > Email

OBSERVED RESULT
5. The Share-Screen goes away, the mail client has not been opened.

EXPECTED RESULT
5. something like `xdg-open mailto:?attach=/tmp/document.pdf` is executed which in turn opens the mail client

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.19.13/not applicable
(available in About System)
KDE Plasma Version: not applicable
KDE Frameworks Version: not applicable (I think, otherwise: what package?)
Qt Version: 5.15.6
Comment 1 Nicolas Fella 2022-10-09 19:19:56 UTC
What is the output of running "xdg-mime query default x-scheme-handler/mailto"?
Comment 2 Moritz Poldrack 2022-10-11 08:02:35 UTC
aerc.desktop
Comment 3 Moritz Poldrack 2022-10-11 10:31:36 UTC
(In reply to Moritz Poldrack from comment #2)
> aerc.desktop

Which is a TUI MUA running in a persistent terminal, which is sent the mailto: link to act upon it.
Comment 4 Nicolas Fella 2022-10-11 21:13:18 UTC
That's the important point, it's a terminal application (i.e. it has Terminal=true in its desktop file). That means it will be opened in the default terminal application (as defined in Plasma's system settings). If none is set then Konsole is used.
Comment 5 Nicolas Fella 2022-10-11 21:16:11 UTC
The config file for this is Plasma-specific, so if you are not using Plasma chances are it isn't set to anything and that's why it tries to use Konsole.

As of right now there isn't really a cross-desktop way to specify a default terminal. https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/46 aims to fix that
Comment 6 Moritz Poldrack 2022-10-16 07:05:54 UTC
> there isn't really a cross-desktop way to specify a default terminal

I don't know about the internals of Skanpage, but wouldn't it be preferable to let xdg-open (or whatever backend it's using) decide on what to do with it?
Comment 7 Nate Graham 2022-11-04 17:11:27 UTC
The code to do this lives in Purpose, which calls KIO::KEmailClientLauncherJob; moving there.