Results 1 to 4 of 4

Thread: /snap/bin in PATH but directory does not exist

  1. #1
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    2,023
    Distro
    Xubuntu 20.04 Focal Fossa

    /snap/bin in PATH but directory does not exist

    in Xubuntu i discovered that the default PATH (which i usually do not use, but sudo does) includes /snap/bin which does not exist. is this the normal way of SNAP, to leave it non-existent until a Snap is installed?
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweetXer

  2. #2
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,588
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: /snap/bin in PATH but directory does not exist

    You get /snap/bin in your path because of /etc/profile.d/apps-bin-path.sh which is provided by the snapd package. I believe that recent versions of all Ubuntu flavours, including Server (don't know about Minimal) install snapd by default. So what you see is not limited to Xubuntu. Ubuntu Desktop installs some snaps and you get the /snap/bin folder containing some links.

    You should have a /snap/README, though that doesn't shed much light on how /snap/bin gets created - I'd guess that installing any snap would do it.

  3. #3
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: /snap/bin in PATH but directory does not exist

    In a default install of Xubuntu "snapd " has been installed with the .iso
    Snapd= (A Service and tools for management of snap packages)
    snapd ships a snippet in /etc/profile.d that sets the PATH to /snap/bin and should theoretically work for all login shells (except for zsh which doesn't respect the profile.d standard).
    You get somewhat of a idea with:
    Code:
    systemd-path search-binaries
    As it sits currently, I shed snaps and snapd as fast as I install any buntu system.
    Code:
    # env | grep PATH
    XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
    XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
    MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
    For the above output I just installed snapd temporarily.
    And:
    Code:
    # env | grep PATH
    XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
    XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
    MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
    There has been a few bugs opened recently about how the paths have been set, with mentions of systemd.
    I'm not sure if your just making a statement or asking for support here.
    Last edited by 1fallen; December 11th, 2019 at 08:17 PM.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  4. #4
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    2,023
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: /snap/bin in PATH but directory does not exist

    if it creates the directory when it needs to put a symlink in there, then it should be good. i'm just not used to unix-like stuff doing that (no directory until needed) even though i have done things that way myself. i have .bashrc code that removes PATH directories that do not exist. i'll need to add some code to detect it, or make a list of exceptions (or directories to always have in PATH).
    Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweetXer

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •