Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Apacelus opened this issue Feb 21, 2023 · 12 comments
Open

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

Apacelus opened this issue Feb 21, 2023 · 12 comments

Comments

@Apacelus
Copy link

  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?

@mirkobrombin
Copy link
Member

Which shell is it? Default or a custom?

@JonasLoos
Copy link

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

@kbdharun
Copy link
Member

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

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

@Apacelus
Copy link
Author

Which shell is it? Default or a custom?

Fresh install, default shell

@Apacelus
Copy link
Author

Apacelus commented Feb 21, 2023

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

@mirkobrombin
Copy link
Member

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

@Apacelus
Copy link
Author

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

That did not work for me, only a reboot did

@dch82
Copy link
Contributor

dch82 commented Mar 11, 2023

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.

@zedtux
Copy link

zedtux commented Jun 9, 2023

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.

@smithj33
Copy link

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

@pulkitkrishna00
Copy link

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.

@smithj33
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants