<SOLVED> terminal prompt colour change after bash update

Archived topics about LMDE 1
Locked
dankini
Level 1
Level 1
Posts: 9
Joined: Tue Jul 08, 2014 9:50 am

<SOLVED> terminal prompt colour change after bash update

Post by dankini » Wed Oct 01, 2014 4:00 am

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 dankini on Thu Oct 02, 2014 11:23 am, edited 1 time in total.

User avatar
killer de bug
Level 14
Level 14
Posts: 5414
Joined: Tue Jul 08, 2008 1:49 pm
Location: Leuven, Belgium

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

Post by killer de bug » Wed Oct 01, 2014 4:53 am

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.
Image
If it ain't broke, fix it until it is.

dankini
Level 1
Level 1
Posts: 9
Joined: Tue Jul 08, 2014 9:50 am

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

Post by dankini » Wed Oct 01, 2014 5:00 am

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: 3018
Joined: Fri Aug 19, 2011 3:46 am

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

Post by Monsta » Wed Oct 01, 2014 5:06 am

Code: Select all

sudo mv /etc/bash.bashrc.dpkg-old /etc/bash.bashrc

acerimusdux
Level 4
Level 4
Posts: 338
Joined: Sat Dec 26, 2009 3:36 pm

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

Post by acerimusdux » Wed Oct 01, 2014 5:13 am

Or maybe try

Code: Select all

sudo dpkg-reconfigure bash

dankini
Level 1
Level 1
Posts: 9
Joined: Tue Jul 08, 2014 9:50 am

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

Post by dankini » Wed Oct 01, 2014 6:47 am

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
Attachments
Screenshot.png
Screenshot.png (15.63 KiB) Viewed 6898 times

Monsta
Level 10
Level 10
Posts: 3018
Joined: Fri Aug 19, 2011 3:46 am

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

Post by Monsta » Wed Oct 01, 2014 8:32 am

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
Level 1
Level 1
Posts: 4
Joined: Fri May 18, 2012 1:45 pm

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

Post by fgiusti » Wed Oct 01, 2014 1:02 pm

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
Level 6
Level 6
Posts: 1038
Joined: Fri Jan 25, 2013 3:54 am

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

Post by kurotsugi » Fri Oct 03, 2014 2:22 pm

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 1 Archive”