<SOLVED> terminal prompt colour change after bash update

Archived topics about LMDE 1 and LMDE 2
Locked
dankini

<SOLVED> terminal prompt colour change after bash update

Post by dankini »

Hi All,

LMDE novice user.

Received prompt from update manager to update bash from 4.2+dfsg-1 to 4.3-9.2 which I duly did.

However now when I open terminal I have lost text colour schemes for prompts. Used to be "user@host:" in bold neon green followed by "~$" in bold sky blue. Folder path navigation was always in light blue too. Found it very useful and aesthetically pleasing but now its just white text and hard to eyescan.

Did a search and have found various articles on how to customise colour schemes in .bashrc but I can't get it to work properly. The unedited line since update is:

PS1="\[\e]0;\${debian_chroot:+($debian_chroot)}\u@\h: \w\a\] $PS1

Also wondering why this has changed after update. I believe my colour scheme was always default. The only thing I set away from default was the background colour.

Can anyone shed some light?
Thanks
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.
killer de bug

Re: lost terminal prompt colour scheme after bash 4.3-9.2 up

Post by killer de bug »

It changed because during the upgrade you were offered to modify a config file and you said yes. But the answer was no. As always.
Last edited by killer de bug on Wed Oct 01, 2014 5:08 am, edited 1 time in total.
dankini

Re: lost terminal prompt colour scheme after bash 4.3-9.2 up

Post by dankini »

OK, so is there anyway to revert back?
I have a back up from a couple of weeks ago. Can i just overwrite said 'config' file or portion/lines from that config file into current. If so, what config file am I looking for and where?

The PS1 line referenced below seems to be the same in backed up .bashrc and new one so I assume you are talking about a different config file.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: lost terminal prompt colour scheme after bash 4.3-9.2 up

Post by Monsta »

Code: Select all

sudo mv /etc/bash.bashrc.dpkg-old /etc/bash.bashrc
acerimusdux
Level 5
Level 5
Posts: 635
Joined: Sat Dec 26, 2009 3:36 pm

Re: lost terminal prompt colour scheme after bash 4.3-9.2 up

Post by acerimusdux »

Or maybe try

Code: Select all

sudo dpkg-reconfigure bash
dankini

Re: lost terminal prompt colour scheme after bash 4.3-9.2 up

Post by dankini »

Many thanks Monsta, colour scheme for prompts restored.
Only saw the second suggestion after successfully carrying out the first but thanks also to acerimusdux.

One last thing, see attached image. What do the red numbers in square brackets refer to? How should I interpret them for future reference?
Image
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: lost terminal prompt colour scheme after bash 4.3-9.2 up

Post by Monsta »

dankini wrote:What do the red numbers in square brackets refer to? How should I interpret them for future reference?
That's the return code from the last command. I don't know why it has been added, but the only purpose I can think of is to confuse the majority of the users. Oh, and make the command line look uglier, too.
fgiusti

Re: lost terminal prompt colour scheme after bash 4.3-9.2 up

Post by fgiusti »

I lost the bash completion after the update, that was expected. I had to uncomment a few lines in /etc/bash.bashrc

However I lost the

Code: Select all

alias grep = grep --color
, that was unexpected.
kurotsugi

Re: <SOLVED> terminal prompt colour change after bash update

Post by kurotsugi »

you can also move your old bash config file to your home directory so that it will never rewritten when you update bash. instead of using this command

Code: Select all

    sudo mv /etc/bash.bashrc.dpkg-old /etc/bash.bashrc
#you can replace it with 
    sudo mv /etc/bash.bashrc.dpkg-old ~/.bashrc
this trick should also work with other bash related config files.
Locked

Return to “LMDE Archive”