$HOME/.local/bin/ missing from PATH after update

I looked for where this $PATH was set from - and
it was not in the users $HOME
the place I found it in was
/etc/profile.d/home-local-bin.sh
and

LANG=C pacman -Qo /etc/profile.d/home-local-bin.sh 
/etc/profile.d/home-local-bin.sh is owned by filesystem 2022.06.08-3

shows that this comes from the package “filesystem”

But I do not see that package being in any recent update - so:
the file should still be there and the $PATH still be set from it
unless you made some change to the config files in your $HOME

This is a recent install of Manjaro Xfce - using bash everywhere
while I know that Plasma uses zsh in it’s default terminal.
Perhaps it’s due to that …?

1 Like

I’m not sure I’m on bash…

Maybe the .local/bin was not in .bashrc but somewhere else, so that somewhere else got edited or removed hence removed from PATH also… but .bashrc does not look like was edited according to last modification time.

echo $SHELL
returns (for me):
/bin/bash

1 Like

I’m on bash as well.

If you do have the file mentioned by

Then the only thing you have to do is reboot the system.

2 Likes

Yes the file exists:

$ cat /etc/profile.d/home-local-bin.sh
case ":${PATH}:" in
  *:"$HOME/.local/bin":*) ;;
  *) echo true export PATH="$HOME/.local/bin:$PATH" ;;
esac

According to last modification time it was modified yesterday when I updated:

$ stat /etc/profile.d/home-local-bin.sh
  File: /etc/profile.d/home-local-bin.sh
  Size: 109             Blocks: 8          IO Block: 4096   regular file
Device: 254,0   Inode: 6161216     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-10-08 22:15:03.000000000 +0000
Modify: 2022-10-08 17:17:16.000000000 +0000
Change: 2022-10-08 22:15:03.486935819 +0000
 Birth: 2022-10-08 22:15:03.486935819 +0000

This is what I did: removed $HOME/.local/bin/ from .bashrc, then rebooted, and such path doesn’t show up in $PATH.

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/home/user/.dotnet/tools:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin

Is anybody having this same issue?

I’ve noticed that there’s a weird issue with root:

$ sudo -i
true export PATH=/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/home/user/.dotnet/tools:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/root/.dotnet/tools

and then

# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/home/user/.dotnet/tools:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/root/.dotnet/tools:/usr/lib/jvm/default/bin

Directory /home/user/.dotnet/tools, which belongs to user, is in root path.
Also it’s not working as intended since the .local/bin is not in path for either user or root.

If it is in root’s $PATH - it can only be from some shell configuration file in /root directory
or - rather unlikely - somewhere in /etc

If this is the response that you get when you issue:
sudo -i

Nothing in /root or in $HOME is ever touched by anything that is installed

Only /etc is a possible source.

→ you should be able to search through /root (or /etc) for that expression
(or just the first part of it)
to find the file where it is set
it has got to be somewhere

Normally, nothing is printed when you issue:
sudo -i

The only thing that is in the same named file on my system is:

export PATH="$HOME/.local/bin:$PATH

nothing else.

$ cat /etc/profile.d/home-local-bin.sh
export PATH="$HOME/.local/bin:$PATH

I cannot imagine where the difference between your file and my file may come from.
… it is not like this in the “filesystem” package where it originates from.

This has got to be a change made by you - perhaps inadvertently.

Are you sure your system is up to date - and you don’t have any *.pacnew files?

2 Likes

I’m on unstable branch, may that be the cause?

No, on unstable is also
export PATH="$HOME/.local/bin:$PATH"

I didn’t creat that file or modified it. Maybe some package from repos or AUR? Tried searching Google and Bing but nothing pops up.

That file:

is provided by the package “filesystem”

It is possible - but unlikely - that some AUR package … replaced it.

What is in your file … is not in the original file from the original package.

and if it got replaced for some reason, pacman would have written a .pacnew file of the same name

… actually: no - wrong assessment …
the file would have stayed as it was - and a .pacnew file created with the alternate content
and unless you merged it/replaced it - it would still be the same as the original

Hmm, I’ve got the same file (content) as @Tribble after todays update of the filesystem package…

$ cat /etc/profile.d/home-local-bin.sh
case ":${PATH}:" in
  *:"$HOME/.local/bin":*) ;;
  *) echo true export PATH="$HOME/.local/bin:$PATH" ;;
esac

The file is provided with this content by filesystem-2022.10.08-1: I’ve just extracted the package manually and double checked. @Yochanan ?

edit: and this is the commit introducing this change

Btw. the fix is easy to do by yourself till a new version comes along, just remove echo true:

case ":${PATH}:" in
  *:"$HOME/.local/bin":*) ;;
  *) export PATH="$HOME/.local/bin:$PATH" ;;
esac

I am on unstable. I’m also getting the same as @Tribble with cat:

$ cat /etc/profile.d/home-local-bin.sh

case ":${PATH}:" in
  *:"$HOME/.local/bin":*) ;;
  *) echo true export PATH="$HOME/.local/bin:$PATH" ;;
esac

However, sometime ago I edited .bashrc to include $HOME/bin and $HOME/.local/bin:

if [ -d "$HOME/bin" ]
then
    export PATH=$PATH:$HOME/bin
fi

if [ -d "$HOME/.local/bin" ]
then
    export PATH=$PATH:$HOME/.local/bin
fi

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

I didn’t updated yet on unstable, had something else to do, but will ping the team about it.

1 Like

Did you notice in the commit notes it closes Issue #4? Have you read it?

Folks, this change is only applicable to filesystem 2022.10.08-1 in the unstable branch.

@Tribble Since you’re obviously using the unstable branch, it would have been very helpful to mention that and use the #unstable tag in your thread so others know. Your profile states you’re using the stable branch. Might want to keep that up to date.

FYI, there have been no changes to my $PATH after the 2022.10.08-1 update to filesystem on two machines.

1 Like

“Yes” to both questions.

The echo true is clearly not intended however present …

2 Likes

Did the update on my XFCE (as was much faster to do, and with the new filesystem by running
echo $PATH
i no longer have ~/.local/bin entry …

Removing echo true made it get back the home path.
Will see on my other installs tomorrow morning.

Aha! I didn’t notice that. :man_facepalming: Fixed with 2022.10.08-2.

1 Like

Good to know.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.