-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colorize terminal through /etc/bash.bashrc as /home/jovyan/.bashrc tends to be wiped #815
Comments
Lots of good info here - I didn't quite follow the wiped/mounted-storage bit, but I suppose it refers to the late-creation of the container runtime user account. What about something like this - you can make use of the fact that
|
Adding a file (bash_aliases, bashrc in skel, etc.) at build time to make the prompt prettier sounds good to me. If we copy a custom |
Customising/simplifying the base-image coloured
... and when shelling-in to that, I have colour, and
This does not help for the terminal plugin in JupyterLab - something must be clearing it to |
I opened PR #826 to enable terminal colors for a couple common use cases. It doesn't address customizing the default prompt or colorizing the terminal in all possible cases (e.g., user mounts a home directory not containing a Feedback welcome. |
@consideRatio @javabrett (or anyone else) would you like to take another pass at terminal colorization to support the use cases my PR didn't handle or should we close this out? |
@parente hmmm sorry for dropping the ball on this and thanks for your work! I'd love to see a system wide default configuration to allow the users with no I'm not a ninja when it comes to these things, how would we go about this? After reading on this unicorn based webpage I'm thinking that perhaps we should have set things in /etc/profile instead?
Oh reading further, this is what I figure we should do, we add a file to |
Porting the lines from |
Hello, Just made some checks on this topic and putting those instructions in I can draft something to test if it works as expected 😄 Here are very interesting posts on this topic: |
It is my understand that if we would not override /home/jovyan we probably would end up with a default .bashrc copied from /etc/skel/.bashrc, but that this is wiped in general due to mounting of storage in /home/jovyan.
Perhaps we could try to retain it somehow, for example by doing...
Resulting changes from unmodified /etc/skel/.bashrc usage
force_color_prompt=yes
is un-commented!) We get colors on the prompt, like...We get colors on the
ls
commands output(untested) We get a custom title that isn't Terminal 1 Terminal 2 etc on the terminal tabs, but instead the username and hostname and the path following that... It comes from the following section of the .bashrc and the first part of the PS1 variable. It is too messy though...
Resulting changes from modifying the /etc/skel/.bashrc before using
Assuming we do the following on the /etc/skel/.bashrc before we utilize it by for example augmenting /etc/bash.bashrc, we end up with a result that I consider pleasing.
/etc/skel/.bashrc from Ubuntu 18.04
/etc/bash.bashrc from Ubuntu 18.04
The text was updated successfully, but these errors were encountered: