apx icon indicating copy to clipboard operation
apx copied to clipboard

~/.local/bin/ is not in PATH by default, is that on purpose?

Open Apacelus opened this issue 2 years ago • 12 comments

  1. Installed git with apx install git.
  2. exported the binary with apx export --bin git which added the binary to ~/.local/bin/git.

When I run git in the terminal, the binary is not found. echo $PATH returns /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin which doesnt include the ~/.local/bin/git dir.

Is this a bug or a feature?

Apacelus avatar Feb 21 '23 00:02 Apacelus

Which shell is it? Default or a custom?

mirkobrombin avatar Feb 21 '23 09:02 mirkobrombin

I have the same problem, using the default shell (bash)

JonasLoos avatar Feb 21 '23 13:02 JonasLoos

I have the same problem, using the default shell (bash)

Can confirm, I have the same issue in the fresh install (r7.5).

kbdharun avatar Feb 21 '23 15:02 kbdharun

Which shell is it? Default or a custom?

Fresh install, default shell

Apacelus avatar Feb 21 '23 15:02 Apacelus

Rebooting after exporting the binary seems to have automatically added it to PATH, but it would be great if a reboot would not be needed

Apacelus avatar Feb 21 '23 15:02 Apacelus

You do not need a reboot, just close and re-open the terminal.

mirkobrombin avatar Feb 22 '23 06:02 mirkobrombin

You do not need a reboot, just close and re-open the terminal.

That did not work for me, only a reboot did

Apacelus avatar Feb 22 '23 13:02 Apacelus

Hi, I think it is a feature: ~/.local/bin/ is suggested by the SystemD filesystem hierarchy. It's just that some distros don't have it in PATH by default. EDIT: You should tell your distro maintainer to add it to PATH by default as it is the standard.

dch82 avatar Mar 11 '23 16:03 dch82

I'm jumping in since I'm facing the same issue as @Apacelus!

@dch82 that's interesting, but then why a reboot solved the issue for @Apacelus? It shouldn't have to.

You should tell your distro maintainer to add it to PATH by default as it is the standard.

So you're saying the distro maintainers are in control of the PATH env variable or am I misunderstanding your comment? Sorry, first day on VanillaOS, I surely miss something.

zedtux avatar Jun 09 '23 14:06 zedtux

Can confirm on a fresh install, only reboot will add the local bin directory to PATH. Pretty annoying.

smithj33 avatar Jun 30 '23 01:06 smithj33

Can confirm on a fresh install, only reboot will add the local bin directory to PATH. Pretty annoying.

You don't need to reboot, log out and log in will do. It is added in PATH by .profile (which applies at the time you log in), only if there is something in that folder.

pulkitkrishna00 avatar Jun 30 '23 03:06 pulkitkrishna00

Can confirm on a fresh install, only reboot will add the local bin directory to PATH. Pretty annoying.

You don't need to reboot, log out and log in will do. It is added in PATH by .profile (which applies at the time you log in), only if there is something in that folder.

Reboot or logout, it still needs to be fixed. Just add the path to the default or at least warn the user when they install an app. They provide all kinds of other info about adding to bin, so a message about logout / reboot would be helpful.

smithj33 avatar Jun 30 '23 04:06 smithj33