View previous topic :: View next topic |
Author |
Message |
blaksaga Guru
Joined: 19 May 2003 Posts: 461 Location: Omaha, NE, USA
|
Posted: Sun Aug 15, 2004 8:39 am Post subject: My console won't come back from the world of black and white |
|
|
So there I was beating this check over the head with a sock full of quarters when I decided it was time to clean up some old apps that I don't use anymore. After extensive "emerge -C"ing, I had about 50 config files that needed updated so I did etc-update. And, guess what happened.
I lost my rc.conf completely (which I fixed) and now my console is colorless and my prompt has changed for the worse. I'm guessing I lost a bash config file that I need...but I have no idea what I need or how to get it back.
Can anybody help my console come back into the realm of color? _________________ [ blaksaga.com ] |
|
Back to top |
|
|
blaster999 l33t
Joined: 09 May 2004 Posts: 902 Location: Between keyboard and chair
|
Posted: Sun Aug 15, 2004 9:42 am Post subject: |
|
|
The easiest way is to add Code: | source /etc/profile | to your /etc/bashrc. The colors are added by setting PS1 variable. To make ls and others have color output, you have to use aliases, i.e. add
alias ls="ls --color"
to /etc/bashrc.
There are more posts about this (I don't remember where, so you'll have to do search). _________________ 60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
https://forums.gentoo.org/viewtopic.php?p=1896734#1896734 |
|
Back to top |
|
|
blaksaga Guru
Joined: 19 May 2003 Posts: 461 Location: Omaha, NE, USA
|
Posted: Sun Aug 15, 2004 12:14 pm Post subject: |
|
|
blaster999 wrote: | The easiest way is to add Code: | source /etc/profile | to your /etc/bashrc. The colors are added by setting PS1 variable. To make ls and others have color output, you have to use aliases, i.e. add
alias ls="ls --color"
to /etc/bashrc.
There are more posts about this (I don't remember where, so you'll have to do search). |
Hmmm...I do not have an etc/bashrc. I googled it and stole somebody elses but it didn't seem to make a difference whether I have bashrc or not. *sigh
PS: Would you mind tossing me your /etc/bashrc??? I'd like to get back to default settings if I could. _________________ [ blaksaga.com ] |
|
Back to top |
|
|
blaksaga Guru
Joined: 19 May 2003 Posts: 461 Location: Omaha, NE, USA
|
Posted: Sun Aug 15, 2004 12:39 pm Post subject: |
|
|
Putting anything in ~/.bashrc doesn't change anything either. I think one of the scripts that loads these files got fucked up. _________________ [ blaksaga.com ] |
|
Back to top |
|
|
blaster999 l33t
Joined: 09 May 2004 Posts: 902 Location: Between keyboard and chair
|
Posted: Sun Aug 15, 2004 1:00 pm Post subject: |
|
|
My bashrc (I don't remember where is it from - probably stolen from mandrake):
Code: |
# /etc/bashrc
# System wide functions and aliases
# Environment stuff goes in /etc/profile
# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
umask 002
else
umask 022
fi
# are we an interactive shell?
if [ "$PS1" ]; then
case $TERM in
xterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
if [ -z "$loginsh" ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -x $i ]; then
. $i
fi
done
fi
fi
unset loginsh
if [ $TERM != "emacs" ];then
LS_OPTIONS="$LS_OPTIONS --color=auto"
fi
alias ls="ls $LS_OPTIONS"
alias d="ls"
alias l="ls" # classical listing.
alias ll="ls -l" # List detailled.
alias la='ls -all' # List all.
alias lsd="ls -d */" # List only the directory.
alias cd..="cd .."
alias s="cd .."
alias p="cd -"
alias md="mkdir"
alias rd="rmdir"
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
# Make a filter for less
if [ -x /usr/bin/lesspipe.sh ];then
export LESSOPEN="|/usr/bin/lesspipe.sh %s"
fi
if [ -n "$CLASS" -a "$CLASS" = "beginner" ];then
# Size of a directory (by default Human Readable).
alias du='du -h'
# Size of a disk (by default Human Readable).
# and don't probe supermount
alias df='df -h -x supermount'
fi
#HERE ARE THE COLORS:
if [ `/usr/bin/whoami` = 'root' ]
then
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/usr/bin:${PATH}"
fi
|
_________________ 60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
https://forums.gentoo.org/viewtopic.php?p=1896734#1896734 |
|
Back to top |
|
|
blaksaga Guru
Joined: 19 May 2003 Posts: 461 Location: Omaha, NE, USA
|
Posted: Sun Aug 15, 2004 1:30 pm Post subject: |
|
|
Searching through my /etc/profile I stumbled upon this:
Code: |
if [ -f /etc/bash/bashrc ]; then
. /etc/bash/bashrc
else
export PS1='\u@\h \w \$ '
fi
|
So, I moved my own bashrc into /etc/bash, did a "source /etc/profile" and bam...worked like a charm.
I still don't think things are how they are supposed to be but at least it works. _________________ [ blaksaga.com ] |
|
Back to top |
|
|
dreadhead Guru
Joined: 09 Jul 2004 Posts: 470 Location: Ulm - Germany
|
Posted: Thu Oct 07, 2004 4:44 pm Post subject: |
|
|
Hi.
I had all the colors working with Code: | source /etc/profile | in my ~/.bashrc. But today I made emerge -uD world and etc-update and all the colors are gone. I think I changed my /etc/profile with etc-update since Code: | source /etc/profile | doesn't work any more. I tried to find out what has been changed but I can't figure it out. Does anyone know what to do in this case?
Thanks!!! _________________ Kopete OTR Plugin |
|
Back to top |
|
|
Trevoke Advocate
Joined: 04 Sep 2004 Posts: 4099 Location: NY, NY
|
Posted: Thu Oct 07, 2004 7:50 pm Post subject: |
|
|
It's DOT bashrc!
.bashrc ! _________________ Votre moment detente
What is the nature of conflict? |
|
Back to top |
|
|
dreadhead Guru
Joined: 09 Jul 2004 Posts: 470 Location: Ulm - Germany
|
Posted: Fri Oct 08, 2004 5:37 am Post subject: |
|
|
Trevoke wrote: | It's DOT bashrc!
.bashrc ! |
All the other commands such as aliases in my ~/.bashrc work fine. Only the source /etc/profile doesn't change the colors.
EDIT: Also my Del-key and my Insert-key doesn't work any more after this. They write a ~ to the console instead of erasing caracters or changing the cursor mode. _________________ Kopete OTR Plugin |
|
Back to top |
|
|
blaster999 l33t
Joined: 09 May 2004 Posts: 902 Location: Between keyboard and chair
|
Posted: Fri Oct 08, 2004 6:53 am Post subject: |
|
|
Did you install the new baselayout (1.10.x)? If yes, then you need bash-3.0. If you installed bash-3.0, you need the newest baselayout. I thought they both are marked ~x86, but still check them. This problem (with ~ instead of Del) has been reported already, so check the baselayout and bash versions (and look at ~/.inputrc and /etc/inputrc). Hope it helps. _________________ 60s: sex, drugs, rock'n'roll
90s: sux, bugs, drag'n'drop
---
Some multimedia keys refuse to work? See my mini-howto:
https://forums.gentoo.org/viewtopic.php?p=1896734#1896734 |
|
Back to top |
|
|
dreadhead Guru
Joined: 09 Jul 2004 Posts: 470 Location: Ulm - Germany
|
Posted: Fri Oct 08, 2004 5:19 pm Post subject: |
|
|
It works!
I had to update bash to 3.0-r6 and colors and Del-key are back.
Thank you!!! _________________ Kopete OTR Plugin |
|
Back to top |
|
|
|