konsole colors lost when "su"
Hi again.
I've noticed that when im running Konsole in KDE the colors for different file types / folders dissapear when I su to root. After su'ing, every filetype, folder is displayed using the same color. When I exit out of the su, it returns to the normal color. Is this normal? What is the logic behind that? I guess more importantly, how do I get the cool colors back as root? Thanks! Murray |
Perhaps you just haven't set LS_COLORS - is the output of:
export | grep LS The same under both users? |
I have a similar problem.
When I'm using bash and logged in under 'john' I get colors, but when I su to root I lose them. When I just log in as root I get colors |
Quote:
Code:
root@johnp:/etc# export | grep LS Code:
john@johnp:/etc$ export | grep LS this when logging in as rooot Code:
root@johnp:/etc# export | grep LS |
What I've done to get a consistent look when su'ing is to source the /etc/profile file as the very first command in a user's and root's ~/,bashrc file.............So the very first command is:
Code:
source /etc/profile |
There's a big difference using "su" as opposed to "su -" --- the latter will receive all of the purdy colors from the root login (as well as other aliases you've set up), whereas the former is merely a little quickie step into rootville and so doesn't.
-- Poetics |
see also
http://www.linuxquestions.org/questi...100#post941100 and copy your ~/.DIR_COLORS to the root home... |
Add this line to your root .bashrc:
alias ls='ls --colors=auto -hF' |
Re: konsole colors lost when "su"
Quote:
Lyle p.s. This is the widest thread I've ever seen. |
Suggestion created strange behavior
I added "source /etc/profile" and "source ~/.bashrc" to the .bashrc file in /root and now Slackware's sayings are all scrolling down the screen when I try to su to root.
I can probably just delet /root/.bashrc and start over, but what caused this? |
Re: Suggestion created strange behavior
Quote:
slackware sayings? I guess you mean the BSD fortunes? if so, they are called from /etc/profile, which has this section by default: Quote:
|
Thanks, that makes sense.
|
All times are GMT -5. The time now is 11:04 PM. |