Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

bashrc - pio command not found - Paths issue #679

Open
1 task
holic-cl opened this issue Apr 5, 2019 · 5 comments
Open
1 task

bashrc - pio command not found - Paths issue #679

holic-cl opened this issue Apr 5, 2019 · 5 comments

Comments

@holic-cl
Copy link

holic-cl commented Apr 5, 2019

  • [X ] I have reset Atom to defaults prior to submitting report.
  • I have not reset Atom to defaults prior to submitting report.

Description

Pio command not found on terminal when i want to use serial monitor

Steps to reproduce

  1. Open serial monitor and terminal can't find pio command

Expected behavior:
Serial monitor show serial messages

Actual behavior:
Terminal can't find pio command

Reproduces how often:

Versions

> 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

Additional Information

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

@the-j0k3r
Copy link
Collaborator

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.

@holic-cl
Copy link
Author

holic-cl commented Apr 7, 2019

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

@the-j0k3r
Copy link
Collaborator

@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/pio
    Confirm that does it.

Else 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.

@holic-cl
Copy link
Author

holic-cl commented Apr 9, 2019

@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
Copy link
Collaborator

the-j0k3r commented Apr 9, 2019

@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.

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 =)

@the-j0k3r the-j0k3r added question and removed wontfix labels Apr 9, 2019
@holic-cl holic-cl closed this as completed Apr 9, 2019
@the-j0k3r the-j0k3r reopened this Oct 24, 2019
@the-j0k3r the-j0k3r changed the title pio command not found bashrc - pio command not found - Paths issue Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants