https://rancher.com/ logo
#rancher-desktop
Title
# rancher-desktop
s

sticky-summer-13450

10/07/2022, 4:07 PM
RD 1.6.0 Diagnostics
Copy code
The ~/.rd/bin directory has not been added to the PATH, so command-line utilities are not configured in your bash shell.
Err - yes they are (3rd in the path list - ignore the duplicates 😉 )...
Copy code
$ echo $PATH
/home/mdsh/.local/bin:/home/mdsh/bin:/home/mdsh/.rd/bin:/home/mdsh/.local/bin:/home/mdsh/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
and
Copy code
$ tail -n 4 ~/.bashrc 

### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
export PATH="/home/mdsh/.rd/bin:$PATH"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)
f

fast-garage-66093

10/07/2022, 4:10 PM
Can you press "Re-run" in the diagnostics? If that doesn't fix it, can you enable debug logging (on the Troubleshooting page), Re-run diagnostics once more, and then share the
diagnostics.log
file?
Thanks. It looks like the logging for the RDBIN diagnostics didn't make it into the release 😞
Let me figure out a way to check this manually
s

sticky-summer-13450

10/07/2022, 4:16 PM
Thank you 🙂
f

fast-garage-66093

10/07/2022, 4:18 PM
Can you run this from your shell:
PATH=/usr/bin:/bin:/usr/sbin:/sbin bash -l -c 'echo $PATH'
s

sticky-summer-13450

10/07/2022, 4:19 PM
Copy code
$ PATH=/usr/bin:/bin:/usr/sbin:/sbin bash -l -c 'echo $PATH'
/home/mdsh/.local/bin:/home/mdsh/bin:/usr/bin:/bin:/usr/sbin:/sbin:/snap/bin
f

fast-garage-66093

10/07/2022, 4:20 PM
Ok, so it does not have
~/.rd/bin
in it. But if you open a new terminal window to create a new shell, it does?
s

sticky-summer-13450

10/07/2022, 4:21 PM
Yes.
That being a new shell
f

fast-garage-66093

10/07/2022, 4:24 PM
I'm sorry, I'm confusing myself again by thinking this is macOS, which handles login shells differently. What does your
~/.bash_profile
look like; does it have the
PATH
logic too?
s

sticky-summer-13450

10/07/2022, 4:27 PM
I have a
~/.profile
(where I manipulate $PATH), and a
~/.bashrc
(where RD put the $PATH manipulation code) but no
~/.bash_profile
~/.profile
sources
~/.bashrc
when a BASH env var exists
f

fast-garage-66093

10/07/2022, 4:28 PM
We add it to both, but maybe don't create
~/.bashrc
if it doesn't exist. The problem is that
.bashrc
is not read by a login shell, and the diagnostic always runs as a login shell.
s

sticky-summer-13450

10/07/2022, 4:30 PM
Copy code
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
export PATH="/home/mdsh/.rd/bin:$PATH"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)
That ONLY exists in
~/.bashrc
which was created by Ubuntu many years ago when this machine was first installed.
f

fast-garage-66093

10/07/2022, 4:30 PM
On macOS all terminal apps create shells as login shells (because they are started by launchd, so don't inherit any login environment otherwise), and I guess our tests on Linux always had a
~/.bash_profile
as well
Just as a test, could you
touch ~/.bash_profile
and re-run the diagnostics? You can delete it again afterwards
Oops, sorry, forgot one step: Go to Preferences, switch
PATH
management to "Manual", click "Apply", and then switch it back to "Automatic" (or just restart RD). Then re-run diagnostics and let me know if this one now passes
🙌 1
s

sticky-summer-13450

10/07/2022, 4:46 PM
Yep - now RD has added the
MANAGED BY RANCHER DESKTOP
stanza to
~/.bash_profile
and the tests pass. But then
~/.bashrc
is not sourced, so I'd want to copy the contents of
~/.profile
into
~/.bash_profile
in order to source various files... Shells are hard 😉
f

fast-garage-66093

10/07/2022, 4:47 PM
Yes, we need to think through this once more; can you file an issue with the details (important ones are that you don't have a
.bash_profile
and that you are on Linux)?
s

sticky-summer-13450

10/07/2022, 5:01 PM
Yep - I'll have to be no sooner than tomorrow, as I have to go now to drive 180 miles. Thanks 🙂
f

fast-garage-66093

10/07/2022, 5:02 PM
No worries, I can file one for you
s

sticky-summer-13450

10/14/2022, 8:25 AM
f

fast-garage-66093

10/14/2022, 3:21 PM
Thanks you! Yes, I promised to create it for you, but then actually didn't 😞
👍 2
😀 1
1330 Views