lxqt
lxqt copied to clipboard
Error message from `desktop-file-validate`
A Gentoo user told me about the error message of desktop-file-validate
with the LXQt
category here. I can reproduce it with the desktop files of LXQt config; for example:
$ desktop-file-validate /usr/share/applications/lxqt-config.desktop
/usr/share/applications/lxqt-config.desktop: error: value "Settings;DesktopSettings;Qt;LXQt;" for key "Categories" in group "Desktop Entry" contains an unregistered value "LXQt"; values extending the format should start with "X-"
In short, it says that we should have used X-LXQt
instead of LXQt
. I haven't encountered any problem about it but I think that it deserves mentioning.
Any idea?
That happens on debian with lintian too. https://lintian.debian.org/tags/desktop-entry-invalid-category.html According to lintian, the categories should be one of this: https://specifications.freedesktop.org/menu-spec/latest/apas02.html And giving that X-LXQt wll produce the same result. I wonder how can LXQt enter in the freedesktop categories.
And giving that X-LXQt wll produce the same result
No, it won't, with desktop-file-validate
(in Arch). When I replace LXQt
with X-LXQt
in a test file, there's no error.
A way of looking at it: This is a "double standard" — KDE
creates no error, for example — so, stick with LXQt
until they recognize it.
I tried and in Ubuntu also X-LXQt solves de lintian issue.
Here is my opinion regarding this issue.
First it's important to highlight 'LXQt' is supported by desktop-file-utils since version 0.23 (released on 2016-06-19):
============
Version 0.23
============
desktop-file-validate
- Accept version 1.1 desktop files (Matthias Clasen).
- Add Cinnamon, EDE and LXQt to the list of registered desktop environments
(fdo#73497, fdo#56353, fdo#79561) (Michael Webster, David Faure,
Jauhien Piatlicki).
- Allow multipart/related MIME type; it's used for MHTML (fdo#93376)
(Hans Petter Jansson).
- Ensure DBusActivatable filenames conform to reverse-DNS notation
(fdo#66904) (Hans Petter Jansson).
- Downgrade trailing semicolons to optional (fdo#76902) (Jerome Leclanche).
- Fix buffer over-read (fdo#94303) (Hans Petter Jansson; reported by
Hanno Boeck and Agostino Sarubbo).
Specifically with this piece of code from src/validate.c:
/* This should be the same list as in xdg-specs/menu/menu-spec.xml */
static const char *show_in_registered[] = {
"GNOME", "GNOME-Classic", "GNOME-Flashback", "KDE", "LXDE", "LXQt", "MATE", "Razor", "ROX", "TDE", "Unity", "XFCE", "EDE", "Cinnamon", "Pantheon", "Budgie", "Enlightenment", "Deepin", "Old"
};
So using if desktop-file-utils fails to validate desktop files using 'LXQt' and can only Ok the desktop files with 'X-LXQt', means the OS uses desktop-file-utils < 0.23 (version 0.22 dates from 2013-08-29), and most likely needs to upgrade desktop-file-utils.
Gentoo has available desktop-file-utils 0.24 and 0.25, both versions support 'LXQt. ArchLinux has 0.26 available (latest version). So the Gentoo user should check the installed version of desktop-file-utils and upgrade if needed.
Packagers from OSs and users building from source using desktop-file-tuils < 0.23 may do the following to fix this issue:
desktop-file-edit \
--remove-only-show-in=LXQt \
--add-only-show-in=X-LXQt \
any-desktop-file-from-lxqt.desktop
My suggestion would be to check for desktop-file-utils >= 0.23 and simply warns users about desktop-file-utils < 0.23 and ask them to edit desktop files.
For Gentoo, 's/0.25/0.26/'. :]
In any case, to my understanding, the fix was only for 'OnlyShowIn', or at least the issue with the category has still been there after said fix.
Some more history:
- https://github.com/lxqt/lxqt/issues/155
- https://bugs.gentoo.org/512074
- https://bugs.freedesktop.org/show_bug.cgi?id=79561
- https://bugs.freedesktop.org/show_bug.cgi?id=79562