SOLVED: Where does terminal color scheme in 17.3 come from?

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
pccobbler
Level 3
Level 3
Posts: 109
Joined: Sun Jan 08, 2017 11:44 am

SOLVED: Where does terminal color scheme in 17.3 come from?

Post by pccobbler »

In 18 and later, I can comment-out the 30 or so lines following "uncomment for a colored prompt" to eliminate the avocado green color in a terminal. But in 17.3, there is no .bashrc file. Where does 17.3 get its color scheme from? I assume there's a .bashrc in a system directory that users use, but where is that?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Where does terminal color scheme in 17.3 come from?

Post by rene »

The defaults are actually internal to the program dircolors and can be viewed with dircolors -p. To customize per user resp. system wide do

Code: Select all

dircolors -p >~/.dir_colors
resp.

Code: Select all

dircolors -p | sudo tee /etc/DIR_COLORS
and edit the created file. The global /etc/bash.bashrc uses it through on startup eval $(dircolors -b ~/.dir_colors) or same with /etc/DIR_COLORS if ~/.dir_colors does not exist; you can do as well so to test changes immediately without the need to restart bash.
pccobbler
Level 3
Level 3
Posts: 109
Joined: Sun Jan 08, 2017 11:44 am

Re: Where does terminal color scheme in 17.3 come from?

Post by pccobbler »

Verrrrrry interesting, lots of things to play with in that file. Thanks!
Locked

Return to “Scripts & Bash”