.desktop files in /usr/share/applications/ should not be executable
Can you please provide some background information about this (for taking upstream)?
Those are not executable files: $ LANG=C /usr/share/applications/okularApplication_pdf.desktop /usr/share/applications/okularApplication_pdf.desktop: line 1: [Desktop: command not found /usr/share/applications/okularApplication_pdf.desktop: line 2: application/x-gzpdf: No such file or directory /usr/share/applications/okularApplication_pdf.desktop: line 2: application/x-bzpdf: No such file or directory /usr/share/applications/okularApplication_pdf.desktop: line 2: application/x-wwf: No such file or directory I think in case of okular it's a mix of source tarball having executable bits on some .desktop files: $ LANG=C ls -l /usr/share/applications/okularApplication_pdf.desktop -rwxr-xr-x 1 root root 8332 Mar 5 18:51 /usr/share/applications/okularApplication_pdf.desktop $ LANG=C ls -l /tmp/portage/kde-apps/okular-17.04.2/work/okular-17.04.2/generators/poppler/ | grep desktop -rwxr-xr-x 1 slyfox users 8512 Jun 5 20:00 okularApplication_pdf.desktop -rw-r--r-- 1 slyfox users 1311 Jun 5 20:00 okularPoppler.desktop -rw-r--r-- 1 slyfox users 9116 Jun 5 20:00 org.kde.mobile.okular_pdf.desktop and cmake explicitly setting executable bits (via PROGRAMS?) for final permissions when file is installed: generators/poppler/CMakeLists.txt: install( PROGRAMS okularApplication_pdf.desktop org.kde.mobile.okular_pdf.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) I guess it should be FILES used in other places: install( FILES okularPoppler.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) install( PROGRAMS okularApplication_pdf.desktop org.kde.mobile.okular_pdf.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) install( FILES org.kde.okular-poppler.metainfo.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
Since the majority of KDE packages seem to do this, I don't think it makes sense to have individual tracker bugs. We should bring this up on the KDE mailing list, and if there's agreement we can start fixing upstream repos.
*** Bug 621974 has been marked as a duplicate of this bug. ***
*** Bug 621972 has been marked as a duplicate of this bug. ***
*** Bug 642470 has been marked as a duplicate of this bug. ***
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=70ed594d0d6a67b486c8781e02dbab1bba92aba4 commit 70ed594d0d6a67b486c8781e02dbab1bba92aba4 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2021-08-05 22:30:53 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2021-08-21 13:10:11 +0000 ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir Bug: https://bugs.gentoo.org/621970 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/ecm.eclass | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c3597edfe479b5e81a09380f11b6c23bbcaf723 commit 1c3597edfe479b5e81a09380f11b6c23bbcaf723 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2021-08-05 22:30:53 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2021-09-02 16:46:25 +0000 ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir Bug: https://bugs.gentoo.org/621970 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/ecm.eclass | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)