Bug#964877: xdg-email: open_generic code path doesn't handle Terminal=true
Nicholas Guriev
nicholas at guriev.su
Fri Jan 1 09:38:24 GMT 2021
Control: tag -1 patch
Hello!
On Sat, 2020-07-11 at 18:05 +0100, Simon McVittie wrote:
> Package: xdg-utils
> Version: 1.1.3-2
> Severity: normal
> Tags: upstream
>
> Steps to reproduce:
>
> * Be in LXQT, Enlightenment, or any desktop environment that does not
> match one of xdg-email's special cases (I used lxqt-core)
> * Install a graphical MUA (I used balsa)
> * Install a text-mode MUA that has a .desktop file (I used mutt)
> * Set balsa as the default MUA. In a throwaway test environment, you can do
> this with:
> mkdir ~/.config
> (echo "[Default Applications]"; echo x-scheme-handler/mailto=balsa-mailto-handler.desktop) > ~/.config/mimeapps.list
> (or in a non-throwaway environment you'll want to edit the file with a
> text editor to preserve existing configuration).
> * Alt+F2, xdg-email me at example.com
> (or the desktop's "run a command" functionality, whatever that is: Alt+F2
> is correct for at least GNOME and LXQT)
> * If balsa launches, exit from it
> * Set mutt as the default MUA, for example:
> (echo "[Default Applications]"; echo x-scheme-handler/mailto=mutt.desktop) > ~/.config/mimeapps.list
> * Alt+F2, xdg-email me at example.com
> * In a terminal emulator, xdg-email me at example.com
>
> Expected result:
>
> (This is what will happen if you use a GNOME-derived desktop or XFCE,
> instead of LXQT.)
>
> * After first "xdg-email", balsa appears. After completing the setup wizard
> if necessary, there is a new blank draft email to me at example.com.
> * After second "xdg-email", a terminal emulator appears, with a new blank
> email to me at example.com opened in mutt
> * After third "xdg-email", another terminal emulator appears, again with a
> new blank email to me at example.com opened in mutt
>
> Actual result:
>
> * After first "xdg-email", balsa appears as expected.
> * After second "xdg-email", nothing happens.
> * After third "xdg-email", mutt runs in the terminal emulator from which
> you ran xdg-email.
>
> Workaround:
>
> * Install xterm (workaround for #773915)
> * Ensure you have libglib2.0-bin installed
> * Run: XDG_CURRENT_DESKTOP=GNOME xdg-email me at example.com
>
Yesterday, I sent to salsa.d.o my implementation for such .desktop files
of terminal applications. The commit relies on Debian specific
x-terminal-emulator executable and additionally checks that a
controlling tty is available. It opens a new window if the script was
launched not from terminal. So your third case is excluded.
Please note, xdg-email internally invokes xdg-open with mailto: protocol
prepended.
https://salsa.debian.org/freedesktop-team/xdg-utils/-/commit/9bd941413a42b78eb4e821674496366f6a43333b
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-freedesktop-maintainers/attachments/20210101/94e79cd4/attachment.sig>
More information about the Pkg-freedesktop-maintainers
mailing list