Brewblox-ctl: command not found

I have encountered a strange problem… When I try to run an update brewblox-ctl is not found. The service is up and running and I can access it through the web-ui, but seems like some files are gone, or missing from path all of a sudden… Any tips on how to get it back? Running the pip install does not do anything as all requirements are already met.

Could you please run echo $PATH, and copy output from that?

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

If you run exec $SHELL --login, then your PATH should be appended with something like /home/pi/.local/bin.

If it doesn’t, could you please describe your install? (hardware, OS, when did you install, what else is running on it)

The exec $SHELL --login did nothing, but adding it manually with export PATH helped, although I need to do it at every login.

Not sure what’s wrong, the .profile does have /home/pi/.local/bin in it, but it doesn’t seem to be used anymore for some reason… Probably did something wrong when tinkering with kiosk mode…

What is the value for SHELL? You may also have inadvertently configured your window manager to not spawn a login shell.

Does this also reproduce when using SSH?

The $SHELL is /bin/bash. And all this was through SSH.

From the bash reference:

When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.

The path extension is read from from .profile, so a first check would be to verify that .bash_profile and .bash_login don’t exist.

If they do, you can see what’s being executed by editing the .profile file, and adding a line with this instruction at the top of the file:

set -x

Now when .profile is executed, it will print all commands to your terminal. Exit SSH and log back in to trigger the normal execution of .profile.

If you’re not seeing anything extra, then .profile is not being loaded. If you’re seeing a lot of spam, then the last few lines should be something like:

+ '[' -d /home/pi/bin ']'
+ '[' -d /home/pi/.local/bin ']'
+ PATH=/home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

Thanks! Seems like the kiosk setup I tried had created a .bash_profile that was lacking a lot of info. Renamed it and now I’m back to normal.

2 Likes