Le 07/01/2022 à 13:06, Benjamin Riefenstahl a écrit :
Hi Didier,

Didier Kryn writes:
    My first investigations indicate that there is provision in
Freedesktop.org to put icons and launchers under $HOME/.local, but
nothing for /usr/local.
I do not think that ~/.local is related to /usr/local in any meaningfull
way. /usr/local is for the administrator to put self-compiled stuff
there, stuff that should be avaiable for all accounts on the machine.
Used to be, that in some environments that directory was on a network
share, so these packages were immediatly available on all machines in
the local network.

    This is exactly what I wrote (or meant). Freedesktop provides for private declarations but not for anything in /usr/local, while the Linux command-line-ecosystem considers /usr/local as a legitimate place to put applications and their manpages.



    Seems /usr/local is honoured by the base system (default PATH and
default man search path) but is "deprecated" by Freedesktop.
The distribution package manager and its packages have no business
installing anything there, so there is nothing to deprecate. That the
default install add /usr/local/bin to PATH and similarly for other
directories is just a convenience. Some of the BSDs do not do that
IIRC.
    We are talking of packages which do not belong to the distro.

    The default PATH is a convenience but something very standard I don't thing users remove from their profiles.

Therefore the installation of an application in /usr/local could
include executable, config files and manpages, but the icon and the
launcher would be per user.
Icon pictures can be in /usr/local. XDG desktop files (which make the
applications show up in the Gnome shell and other DEs) can be installed
in /etc/xdg, like the packages from the package manager do. It is
possible that Gnome/XDG also looks into /usr/local/etc/xdg or some
similar place in addition to /etc/xdg, I haven't checked.

    I don't exacly know what /etc/xdg is. I think it contains some kind of template or default files as most files in /etc are. It is probably used when creating new users.

    The fact is that to make an application appear in the applications menu, there are two possible places to put the launcher: /usr/share/applications or ~/.local/applications .

    /etc belongs to root and has to. We are speaking of installing software without root permission.


/etc is used both by distribution packages and by packages in
/usr/local. Only distribution packages should install default
configurations there, and only if those files did not exist before or,
during an update, if they where not modified since installation or last
update.
    As written above, we don't want to give root permission to the installer.



to my knowledge, there is no default user directory for executables;
In some distibutions /etc/profile adds ~/bin to PATH, if it exists.
Again this is just a convenience. In the end /etc is for the
administrator to set her/his own policy.

    Yes, at least in Debian. But the .profile, .bash_profile and .bashrc are very personnal things and the ~/bin directory has to be created explicitely by the user and some won't, some will prefer other names etc...

    What the user does with his subdirs is essentially personnal up to the advent of Freedesktop. Freedesktop forces some directories and files. This policy has two faces: on one face it is an abuse, on the other it facilitates standardization. What Freedesktop misses/disregards is /usr/local.

--     Didier



_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to