Color ls does not work in xterm/xfce-Terminal

I am trying to get colorized output from ls in my Terminal sessions. I have the necessary
Code:
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.
 
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.
 
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.
 
% 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.
 
Code:
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.
 
...the kicker is that this function works fine for "root", and the profiles are pretty much the same.
 
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.
 
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.
 
Back
Top