--- Begin Message ---
Package: plasma-workspace
Version: 4:5.23.5-1
Severity: normal
X-Debbugs-Cc: debian-desktop@lists.debian.org
Steps to reproduce:
- Install task-kde-desktop
- Also install gimp, nautilus and libglib2.0-bin
- Have a PDF file (if you're testing in a VM like I was, there's one in
/usr/share/doc/shared-mime-info)
- Log in to a KDE Plasma session
- Run Dolphin
- Double-click the PDF file in Dolphin
- Close whatever viewer opens
- Run Nautilus
- Double-click the PDF file again, this time in Nautilus
- Close whatever viewer opens
- In a terminal, run: gio mime application/pdf
Expected result:
- From both file managers, the PDF opens in some reasonable KDE viewer,
like Okular
- `gio mime` says the default is the same KDE viewer
Actual result (in my testing, but might be non-deterministic):
- From Dolphin, the PDF opens in Okular as expected
- From Nautilus, the PDF opens in GIMP
- `gio mime` says the default is gimp.desktop
Workaround: sysadmins can put this in /etc/xdg/kde-mimeapps.list or
/usr/local/share/applications/kde-mimeapps.list:
[Default Applications]
application/pdf=okularApplication_pdf.desktop;
or individual users can configure this in ~/.config/kde-mimeapps.list
or ~/.config/mimeapps.list.
This can be resolved in the KDE/Plasma packaging by providing a
/usr/share/applications/kde-mimeapps.list, analogous to the
gnome-mimeapps.list in gnome-session-common.
More details
------------
The way this fits together is:
- The Shared Mime Info spec (implemented by the shared-mime-info package
in Debian) is used to detect content-types (MIME types) from content
and extensions.
- The Desktop Entry spec (.desktop files) allows applications to declare
which content-types they can open. It deliberately does not allow
application maintainers to mark their application as preferred or a
default, to avoid an "arms race" where every maintainer says their
app should be the default.
https://specifications.freedesktop.org/desktop-entry-spec/latest/
- The MIME apps spec allows distros, desktop environments, sysadmins
and/or users to choose which application they want to use for each
content-type, in a way that depends on the desktop environment they
logged into (but does not depend on the application from which the
file was opened - Dolphin and Nautilus should behave the same).
https://specifications.freedesktop.org/mime-apps-spec/latest/
If nobody has expressed a preference, then the fallback behaviour of
the MIME apps spec is to choose an arbitrary one of the apps that can
open the appropriate content-type. For some file types, like PDF, this
leads to unexpected behaviour: there are several apps, including GIMP
and Calibre, that technically *can* open PDFs but are probably not what
you want as a PDF viewer.
Perhaps the Qt/KDE libraries used by Dolphin have some built-in way to
choose a "better" implementation as an extension of the MIME apps spec,
but GLib just follows the spec (and I suspect its arbitrary choice might
just be the first possible handler in alphabetical order).
The intended design seems to be that in a well-integrated desktop
environment, there should usually be an opinionated configuration for
that desktop environment in some central "data" package, installed
to /usr/share/applications/$desktop-mimeapps.list, where $desktop
is the desktop environment's value of $XDG_CURRENT_DESKTOP,
case-folded to lower case. For example, GNOME installs
/usr/share/applications/gnome-mimeapps.list via the gnome-session-common
package, which configures GNOME sessions to prefer GNOME or GNOME-adjacent
applications like eog, evince and firefox.
As with #1004906 in XFCE, I think it would be appropriate for some
"central" KDE/Plasma package (plasma-workspace-data?) to install
/usr/share/applications/kde-mimeapps.list with Okular as the preferred
PDF handler, and perhaps other PDF viewers like qpdfview as a fallback:
[Default Applications]
application/pdf=okularApplication_pdf.desktop;qpdfview.desktop;
Similarly, KDE should probably configure viewers for image/photo file
types that would fit well into an KDE environment, to avoid JPEGs
accidentally getting loaded into GIMP, a web browser, or sometimes
even Wine.
Default URL handlers can also be configured in the same way, by configuring
associations for the pseudo-MIME-types x-scheme-handler/http and
x-scheme-handler/https (or any other URL scheme of interest, such as
x-scheme-handler/mailto).
It would be technically possible for the Debian desktop team to set
defaults on a distro-wide basis, by providing
/usr/share/applications/mimeapps.list in the desktop-base package. However,
the choice of defaults is opinionated, so the desktop team would not
necessarily find it straightforward to choose something useful: I expect
it to be difficult to choose defaults that are appropriate for everyone,
because every desktop environment team will probably want their
applications to be the default.
As a result, it's probably better for each desktop environment team to
set their own default apps that integrate well in that environment,
like we do for GNOME as part of the gnome-session packaging.
smcv
--- End Message ---
--- Begin Message ---
Source: plasma-workspace
Source-Version: 4:5.24.2-1
Done: Patrick Franz <deltaone@debian.org>
We believe that the bug you reported is fixed in the latest version of
plasma-workspace, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1005074@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Patrick Franz <deltaone@debian.org> (supplier of updated plasma-workspace package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 26 Feb 2022 21:59:51 +0100
Source: plasma-workspace
Architecture: source
Version: 4:5.24.2-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Changed-By: Patrick Franz <deltaone@debian.org>
Closes: 1005074
Changes:
plasma-workspace (4:5.24.2-1) unstable; urgency=medium
.
[ Patrick Franz ]
* New upstream release (5.24.2).
* Re-export signing key without extra signatures.
* Update B-Ds and deps with the info from cmake.
* Remove autopkgtest.
* Update list of installed files.
* Update symbols from buildlogs.
* Update d/copyright.
* Add kde-mimeapps.list to plasma-workspace in order to set Okular and
Gwenview as default applications for documents and images (Closes:
#1005074).
Checksums-Sha1:
1bd559d9525c2457c375277422026314b652095d 5795 plasma-workspace_5.24.2-1.dsc
d7c7d5502e4c35c64f8ee66acb518bbefb0fcb2b 18463172 plasma-workspace_5.24.2.orig.tar.xz
bfae8ffb20944e9203903ecae3afc3dce64009b2 833 plasma-workspace_5.24.2.orig.tar.xz.asc
291ca737a440941ca3836d7199867bd8b05154e2 47404 plasma-workspace_5.24.2-1.debian.tar.xz
12e1397803b3230f8bf718faa8c4c52be9dcaa11 17980 plasma-workspace_5.24.2-1_source.buildinfo
Checksums-Sha256:
d5da3d3b27e753ac103f12ff2cac663ebb495622ff1c6ba14c0be5f2fa66065d 5795 plasma-workspace_5.24.2-1.dsc
e7fd2ad7c067710401f7322789ce796c3ad5e02a3813bdfb84ebd5dbd8787d11 18463172 plasma-workspace_5.24.2.orig.tar.xz
b4e0c1a33202c8eaddfd5bdd94226fff2df87af174395dffe9ab488a32be9115 833 plasma-workspace_5.24.2.orig.tar.xz.asc
754ea56c0a96eba0c233a435bf5ad88cd0b1d970777e7af7710dbd2dc9c2586c 47404 plasma-workspace_5.24.2-1.debian.tar.xz
0ef6554b94eccfe48345d920aafafc91d0a8381be4ad6a5f5f3d962037085b20 17980 plasma-workspace_5.24.2-1_source.buildinfo
Files:
3caf09f06aa8a4f39a7795e90f9c43d9 5795 kde optional plasma-workspace_5.24.2-1.dsc
0cbff7630dd01f881b34115a43996483 18463172 kde optional plasma-workspace_5.24.2.orig.tar.xz
2cbe5bb13405745b868c6265992e108c 833 kde optional plasma-workspace_5.24.2.orig.tar.xz.asc
f4d3e72b35b3022989dda0371b18bc89 47404 kde optional plasma-workspace_5.24.2-1.debian.tar.xz
76cefec4ca67c44e20470c9c68bb6368 17980 kde optional plasma-workspace_5.24.2-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEYodBXDR68cxZHu3Knp96YDB3/lYFAmIalhoACgkQnp96YDB3
/lac3g/+OMfDqQwxHNL0GzaAGrz+zm17N4OleRGvTKMXa8j9bzPXQOPahHfKXN15
ioGuVGdR+xGOvMvwEzSCZPu6d2VmIWZXG9HRbleM0aXSnN2OJenFU1YB13PfyTxM
OSfxvNI3BTWWKHXHnudtChn1S5jRWvgToCuCeCMSeJILlXRV5GyIGHZV2mNvS8lH
bJbNqWOVL0vRYmmg3/zF3BpAQS+Og6zbvuRZw2oZWYa5f/wcNdJNDwPkArQOH/ad
N2icY9kGrRuoRL7+Agu1uIKAeY0BrNmLJrMd/23kJvDoqbJodZImBN1rfE8NxFbv
wga/6/WSAatiMX2WzGFcEckMJQeE9gmPgmz88FdZO+EHKcaKz8VbkI2K339khdzF
3E5vFy6Hm8sG8bwVn2QtAU89N0J9ecXLvshoqjGTZrueZwXlPfr1STpLjMXTK0bs
CLvRxcEBqbFdmuB82lgbosXH+FmRbm5/NvKR1VFoVOrj0sg0g3G95XGASKh79p01
KGpSjNAp5hbRiZe0m8WRSuMZ8Wspx6HeyuHKT8ByeEEOFpxLbRj6pBw+Bvmga8HY
q8A1kcN3p6J60t6/23JvtXUPD0Hnn4CmojHRXJf37I1VrSfcARG+y4xF8VWywXcR
cXwat60+pf8VCQd8R8WlUUHugJ/x2OTpfXMnVlTlc2CgFBCccQU=
=+crZ
-----END PGP SIGNATURE-----
--- End Message ---