No .bashrc, I need colours in the terminal!!
Hi,
I'm using slack 9.1. I usually use gnome 2.4 as my window manager. In the gnome-terminal, when I do "ls", the dirs and files are not color coded. But I can see the colors in the other terminals (CTRL+ALT+F1 and all). So I did a little research and found that I have to add the line alias ls='ls --color=tty' in the .bashrc file in my home directory. But there is no such file. Further searching revealed that there IS no .bashrc in slack. So I had to edit the /etc/profile file instead. I added the line there, but it makes no difference. Now I'm stuck!! btw.."ls --color=always" works, but I want the colors to come by default. Can anyone help?? |
if your ~/.bashrc does not exist than create it. But in slackware ls color is the default, I guess you would call your gnome-terminal with the good switch,
for kde Konsole and xterm the switch is : -ls try gnome-terminal -ls and see if it works |
Thanks keefaz. I just created a .bashrc file in my home directory with one line in it: alias ls='ls --color=tty' and it started working. :D
Thanks. |
ls="ls --color" should do your wish, why add tty ?
|
er...no idea actually!! I just read it on some forum :p Whats imp for me is that it works. But given it a thought, probably "tty" coz then it uses the default settings of all the terminals, and slackware by default HAS colors in the terminal (in the text-mode runlevel that is)
If anyone knows, post it here |
Quote:
I have the strange condition of bash not recognizing my .bashrc but it does recognize the .bash_login. I think this is the way it was compiled...(Slack 9.1 default?) hmmm Oh well- bc |
as I said it is just a switch to add to start the gnome-terminal.
Exemple : from fluxbox (in X so...), I start xterm in a terminal with no option...when I 'ls' in the terminal, it has no colors...BUT when I start xterm like : 'xterm -ls' and then I 'ls', it has color, the same with the Konsole terminal gui from kde (-ls). |
|
When I was trying to get aliases etc sorted out in bash, .bashrc didn't work - I had to put it in .bash_profile instead. An oddity of Slack 9.1?
|
Here is the content of my ~/.bash_profile
Code:
if [ -f ~/.bashrc ]; then |
All times are GMT -5. The time now is 11:33 PM. |