pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Executable bit on .desktop files: necessary or unwanted?



On Sat, 15 Feb 2025 at 13:32:42 +0100, Thomas Klausner wrote:
>Hi!
>
>While working on digikam I noticed a warning during 'install' about
>the executable bit set on the .desktop files.
>
>I wondered if that was fine or not and found:
>
>https://unix.stackexchange.com/questions/373239/what-is-the-advantage-of-desktop-files-without-executable-bit-set
>
>where it says:
>
>"KDE and gnome developers introduced a custom hack that somewhat
>deviates the intended Unix file execution permission purpose to add a
>security layer. With this new layer, only .desktop files with the
>executable bit set are taken into account by the desktop environment."
>
>On my system, most .desktop files I have installed are not executable
>(53 of 64), but some KDE ones and a few others are.
>
>Should we unify this one way or the other? Does KDE (or any other
>desktop environment) need the executable bit set on .desktop files?
> Thomas

I'm pressed for time right now, my quick answer would be I've treated
this in the past as an error/misfeature and removed the execution bit
in pkgsrc packages. I see them as data files. Putting a shebang line at
the top seemed even more strange to me. (I don't follow how that would
"solve" anything, necessarily. I may be missing something.)

On a Fedora 41 machine with a variety of DEs installed from Fedora
packaging (current GNOME, KDE, Xfce, MATE, Cinnamon), I have 650
.desktop files found in /usr/share/applications. Of these only 12 have
the execute bit set (all are KDE, but the vast majority of KDE-related
apps do not have it set, either). So the current common practice of
(system-wide) .desktop file installations would seem to be not to mark
them as executable. (Only one out of the 650 files in my installation
has a shebang line, and it is not marked executable!)

I can't comment on the state of KDE or Gnome DEs in pkgsrc itself; I
don't use them. Certainly this isn't universally required by every DE
out there. I'd be opposed to unifying by marking them executable,
unless someone can point definitively to which DEs (and which versions
of those) definitely require it, in which contexts (installation
paths).

Regards,

Dave



Home | Main Index | Thread Index | Old Index