Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-06-2004, 11:45 AM
|
#1
|
|
Member
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364
Rep:
|
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??
|
|
|
|
06-06-2004, 11:57 AM
|
#2
|
|
Senior Member
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Rep:
|
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
|
|
|
|
06-06-2004, 12:30 PM
|
#3
|
|
Member
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364
Original Poster
Rep:
|
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.
Thanks.
|
|
|
|
06-06-2004, 12:37 PM
|
#4
|
|
Senior Member
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Rep:
|
ls="ls --color" should do your wish, why add tty ?
|
|
|
|
06-07-2004, 07:37 AM
|
#5
|
|
Member
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364
Original Poster
Rep:
|
er...no idea actually!! I just read it on some forum  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
Last edited by akudewan; 06-07-2004 at 07:39 AM.
|
|
|
|
06-07-2004, 10:22 AM
|
#6
|
|
Member
Registered: Mar 2004
Location: St. Louis, MO
Distribution: Slackware-current, Ubuntu Server, Gentoo
Posts: 207
Rep:
|
Quote:
Originally posted by akudewan
er...no idea actually!! I just read it on some forum 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
|
You could even add your alias's to your /etc/profile (if using bash/etc -Bourne shells) so it will be system wide-ie: effect all users
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
|
|
|
|
06-07-2004, 12:17 PM
|
#7
|
|
Senior Member
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Rep:
|
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).
|
|
|
|
06-07-2004, 01:30 PM
|
#8
|
|
Member
Registered: May 2004
Location: USA
Distribution: Slackware-Current
Posts: 74
Rep:
|
FYI
There are some nice bashrc files (as well as others) here:
http://dotfiles.com/
9
|
|
|
|
06-07-2004, 03:41 PM
|
#9
|
|
Senior Member
Registered: Nov 2003
Location: West Sussex, England
Distribution: Gentoo
Posts: 1,457
Rep:
|
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?
|
|
|
|
06-07-2004, 04:16 PM
|
#10
|
|
Senior Member
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Rep:
|
Here is the content of my ~/.bash_profile
Code:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:28 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|