# Color ls does not work in xterm/xfce-Terminal



## gnutz (May 30, 2010)

I am trying to get colorized output from ls in my Terminal sessions. I have the necessary 
	
	



```
alias ls="ls -G"
```
 in my .profile and even tried creating a .bashrc but this does not fix the problem.

In my console vt's the feature works normally. I'm kind of at a loss here. Any help would be appreciated.


----------



## wblock@ (May 30, 2010)

Are you sure your shell is bash?

The alias isn't required, and if you're in tcsh or csh it won't work; different alias syntax.  Try just `% ls -G` without the alias.  It works here in csh and bash.


----------



## gnutz (May 30, 2010)

I set my user account to use bash at login, so it should be the default.

ls -G works fine when I enter it into the command-line, both in the ttys and in xterm. I just want this to be the default behavior.

I don't know if this has anything to do with it, but when I open an xterm it uses /usr/home/ as the home directory instead of /home/. It seems as if one is a link to the other, but I'm not sure how to break the link or direct the xterm to the correct directory...if this is even needed.


----------



## wblock@ (May 30, 2010)

`% alias ls ls -G` is the csh variant.

`% pw usershow [b][i]myusername[/i][/b]`
will show your shell at the end of the line.  bash is not installed by default.

/home is a link to /usr/home.  That's normal.


----------



## gnutz (May 30, 2010)

```
nick:*:1001:1001::0:0:Nick:/home/nick:/usr/local/bin/bash
```
I installed bash when I set up my system, so it's there. 'echo $SHELL' shows it's running when I have a terminal up.


----------



## gnutz (May 30, 2010)

...the kicker is that this function works fine for "root", and the profiles are pretty much the same.


----------



## mickey (May 30, 2010)

`$ export CLICOLOR=`

... and forget about the -G commandline switch.


----------



## wblock@ (May 30, 2010)

gnutz said:
			
		

> ...the kicker is that this function works fine for "root", and the profiles are pretty much the same.



That suggests either a misnamed or misplaced .profile file or an error in the contents.


----------



## gnutz (May 31, 2010)

I think I've gotten it worked out. Xterm is reported as xterm, but the VGA console is -cons25. For some reason, Bash wants to use .bashrc in one and .profile in the other.

I've now got a .bashrc hardlinked to my .profile and both terminals work correctly.


----------

