jeroenpeeters/docker-ssh

How to get ~/.bashrc auto loaded when SSH session start?

namgivu opened this issue · 3 comments

I try to put in prmpt color in the bashrc flke but it is not loaded automatically i.e. I have to call source ~/.bashrc manually.

Hm I just found the same problem. The default prompt is unhelpful as it omits the hostname, but worse, the hostname may not be set to what you need to correctly identify what the prompt relates to. Even /etc/profile.d/* is seemingly getting skipped. This means that you don't have any automatic visual cue as to what the command prompt belongs to.

I am guessing that bash is being started in such a way that it is bypassing its entire initialisation process. However, if you then type "bash", you'll find that .bashrc gets executed.

Hm I just found the same problem. The default prompt is unhelpful as it omits the hostname, but worse, the hostname may not be set to what you need to correctly identify what the prompt relates to. Even /etc/profile.d/* is seemingly getting skipped. This means that you don't have any automatic visual cue as to what the command prompt belongs to.

I am guessing that bash is being started in such a way that it is bypassing its entire initialisation process. However, if you then type "bash", you'll find that .bashrc gets executed.

It would be useful if the default prompt was "container-name: path # " too.