I found it useful to generalize .local

Damjan Jovanovic damjan.jov at gmail.com
Mon Apr 11 03:08:01 PDT 2011


On Mon, Apr 11, 2011 at 11:52 AM, Martin Konold <konold at kde.org> wrote:
> Am Montag, 11. April 2011, 11:41:58 schrieb Thiago Macieira:
>
> Hi,
>
>> There's nothing wrong with having your binaries in $HOME/.local/bin. That
>
>> would contribute to de-polluting the home dir.
>
> Yes, I agree. Especially because in the common case when $HOME is displayed
> in a DE the user is explicitly not interested in "systems"-directories.
>
> I am in favour of using $HOME/.local/bin provided that all other directories
> like share, lib etc. are consisten with the FHS. After all this would make
> it simpler for packagers to create packages for the rpm-root
> $HOME/.local/bin in a clean manner.
>
> Yours,
>
> -- martin

Most *nix applications hardcode their installation prefix at compile
time, so you'd have to have exactly the same $HOME as the account
under which an RPM was compiled for that to work.

This is not an issue that can really be fixed portably: argv[0] is
unreliable, POSIX has no API like GetModuleHandle() and
GetModulePath() on Windows, /proc/self/exe is Linux-only and can only
be used for application, while searching the lines in /proc/self/maps
for an internal symbol is the only method available to a library to
discover its own path, only works on Linux, and is obscure and unknown
to the vast majority of developers.

Damjan


More information about the xdg mailing list