Pio command not found on terminal when i want to use serial monitor
pio commandExpected behavior:
Serial monitor show serial messages
Actual behavior:
Terminal can't find pio command
Reproduces how often:
> atom --version
Atom : 1.34.0
Electron: 2.0.16
Chrome : 61.0.3163.100
Node : 8.9.3
> apm --version
apm 2.1.3
npm 6.2.0
node 8.9.3 x64
atom 1.34.0
python 2.7.16
git 2.20.1
OS name and version:
Distributor ID: Debian
Description: Debian GNU/Linux buster/sid
Release: unstable
Codename: sid
Platformio-ide-terminal version:
2.9.1
PATH enviroment variable of the terminal don't have the path for my pio command (on my home dir). Don't know how to set it.
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
But my pio command is here:
/home/holic/bin/pio
Hello @holic-cl! Thank you for reaching out with this query.
You should probably symlink to the expected path in usr, alternatively try to export your home path.
To export, add a modified version of this (that suits your particular needs) to your .bashrc
export PATH="$HOME/bin:$PATH"
Without either a symlink or exporting the path its unlikely any terminal/shell will magically know where your own bins are stored.
Hi @ the-j0k3r thanks for your answer.
My .bashrc file already have my home path, this is the content of PATH var on my bash-terminal:
echo $ PATH
/home/holic/bin:/home/holic/.local/bin/:/home/holic/app/node-v11.10.0-linux-x64/bin:/usr/local/bin:/usr/bin:/ bin: / usr / local / games: / usr / games: /home/holic/.platformio/penv/bin: /home/holic/app/node_modules/.bin
Seems to be problem on the terminal where PATH var is not being exported from .bashrc file, do not know why, maybe i am missing a specific setting or reassigning the PATH in some place
@holic-cl does your setup work on a terminal besides platformio-ide-terminal or not?
Try to export the path once on the terminal and see if that does it.
Try on terminal.
export PATH="$PATH:/home/holic/bin/pioElse try.
echo export PATH="$PATH:/home/holic/bin/pio >> ~/.bash_profile"You can also export that path into .bashrc
The orther solution is symlinking
cd /usr/bin
sudo ln -s /home/holic/bin pio
However if you are still getting issues you may want to relocate your binaries into their expected path rather than your home folders.
@the-j0k3r my problem is with atom terminal, which does not seem to read the .bashrc file, but i just tried with .bash_profile file as you suggest and it is working. I don't know if is normal to not read the .bashrc.
I was looking for a solution that did not involve the symbolic link, but i had it in mind.
Thank you a lot!
@the-j0k3r my problem is with atom terminal, which does not seem to read the
.bashrcfile, but i just tried with.bash_profilefile as you suggest and it is working.
The problem here is that platformio-ide-terminal is using term.js to interact with system shells, etc, that library has been abandoned for years and its buggy. In order to improve these types issue, We would need to implement xterm.js -> #426 same as vscode uses, its currently developed, more compatible with different OS/shells terminals etc.
This project has no official developers anymore either (the main dev is just merging PR's related -> #543 and doing releases (Im sort of managing the bug tracker), anything like fixes/and switching to other libraries has to come from users, except this project doesnt have enough skilled users that want/can or have time to implement this much needed change. SO unless someone comes along willing and able, this is it.
Glad my suggestion worked out for you in the end though =)
Most helpful comment
@the-j0k3r my problem is with atom terminal, which does not seem to read the
.bashrcfile, but i just tried with.bash_profilefile as you suggest and it is working. I don't know if is normal to not read the .bashrc.I was looking for a solution that did not involve the symbolic link, but i had it in mind.
Thank you a lot!