• Soft-links to binaries (was Re: Default PATH setting)

    From Janis Papanagnou@21:1/5 to Janis Papanagnou on Wed Jan 22 19:02:39 2025
    On 21.01.2025 10:06, Janis Papanagnou wrote:
    On 21.01.2025 07:52, Axel Reichert wrote:

    I think that, depending on your Linux distribution, /bin and /sbin are
    symbolic links to their respective /usr counterparts [...]

    In my environment these are not only distinct directories but also
    contain different sets of executables; [...]

    BTW, for something (not) completely different [concerning links]...

    There's certainly someone who can explain (beyond versioning) deep
    linking chains like

    /usr/bin/vi -> /etc/alternatives/vi -> /usr/bin/vim.gnome /usr/bin/vim -> /etc/alternatives/vim -> /usr/bin/vim.gnome /usr/bin/gvim -> /etc/alternatives/gvim -> /usr/bin/vim.gnome /usr/bin/vimdiff -> /etc/alternatives/vimdiff -> /usr/bin/vim.gnome /usr/bin/vim.gnome
    /usr/bin/vim.tiny
    /usr/bin/vimtutor
    /usr/bin/vimdot

    or even deeper chains like

    /usr/bin/emacs -> /etc/alternatives/emacs -> /usr/bin/emacs22 -> /etc/alternatives/emacs22 -> /usr/bin/emacs22-x

    (There's a bunch of things in /etc/alternatives, like *.gz and *.so
    items.)

    For most binaries we don't have that many links to follow to get the
    effective binary; browsing the PATH I get

    links count
    0 4093
    1 545
    2 133
    3 6
    4 1

    There's reasons for soft-linking. - But chains up to those depths...?

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Keith Thompson on Wed Jan 22 22:31:41 2025
    On Wed, 22 Jan 2025 10:59:48 -0800, Keith Thompson wrote:

    "man update-alternatives"

    <https://manpages.debian.org/update-alternatives(1)>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Keith Thompson on Thu Jan 23 10:48:59 2025
    On 22.01.2025 19:59, Keith Thompson wrote:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:

    (There's a bunch of things in /etc/alternatives, like *.gz and *.so
    items.)
    [...]

    "man update-alternatives"

    Thanks for this hint.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Axel Reichert@21:1/5 to Janis Papanagnou on Sat Jan 25 09:20:52 2025
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:

    On 21.01.2025 07:52, Axel Reichert wrote:
    Well, /usr/games is populated here ... (-:

    Well, the 50+ games I had installed there I invoke by the GUI menu (so
    no PATH component would be necessary for that in my case).

    Not so sure. My gut feeling is that GUIs have even more complicated
    mechanisms of finding/executing stuff, highly dependent on the window manager/desktop environment/Linux distribution and a lot of menu
    infrastructure and .desktop files behind the scenes.

    But probably it is better not to open this can of works, which might be off-topic in this group in a strict sense anyway.

    Best regards

    Axel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Axel Reichert on Sun Jan 26 00:03:40 2025
    On Sat, 25 Jan 2025 09:20:52 +0100, Axel Reichert wrote:

    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:

    Well, the 50+ games I had installed there I invoke by the GUI menu (so
    no PATH component would be necessary for that in my case).

    Not so sure. My gut feeling is that GUIs have even more complicated mechanisms of finding/executing stuff, highly dependent on the window manager/desktop environment/Linux distribution and a lot of menu infrastructure and .desktop files behind the scenes.

    But typically not dependent on the PATH.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)