color-ls not working in Konsole
Using the same /etc/profile I used in slack9,9.1,10.0,10.1 and 10.2 without problem I do not get color-ls working in slackware 11.0. Otherwise installed flawlessly on three different machines.
Is this a slackware problem or KDE 3.5 deficiency? davidVK Thank you tobyl. I had saved profile to profile.orig then imported slackware 10.2 /etc/profile. Returning to profile that came with slackware 11.0 allowed color-ls to work, but I needed aliases and PS1 from before so I added them to the file one at a time. There was a line "alias ls='ls -F'" which dated back to the 9.0 installation and when added killed color-ls. Interestingly, it can be used from the command line without killing the color but the option adds '/', '@' and '*' after filename which ls without option does anyway. My old profile had the same "# Set up the LS_COLORS . . . " as you mentioned and it works with or without that 'if' clause. davidVK |
If you upgraded, have you got a profile.new in /etc?
If so, try saving your old profile and renaming the profile.new to profile I think you can test without restarting your session with # source /etc/profile If it is a fresh install, I guess you will need to trawl through /etc/profile, /etc/DIR_COLORS and /etc/profile.d/coreutils-dircolors.sh and figure out what needs to be altered. my old /etc/profile contained # Set up the LS_COLORS and LS_OPTIONS environment variables for color ls: if [ "$SHELL" = "/bin/zsh" ]; then eval `dircolors -z` elif [ "$SHELL" = "/bin/ash" ]; then eval `dircolors -s` else eval `dircolors -b` fi but I cant remember if I added those lines, or if they were already there, in any case they do not appear in the later version of the file. files in your home directory will of course override system-wide settings in /etc, so you may also need to visit ~/.bashrc, ~/.bash_profile ~/.dircolors - but then you would know if you had modified them... tobyl |
I think konsole and other terminals read the ~/.bashrc file. What I did is replace the .bashrc with a symlink to profile.
|
Quote:
Code:
alias ls='ls -F' The alias set up by /etc/profile.d/coreutils-dircolors.sh is set to include the -F and --colors options (among others) through the use of the $LS_OPTIONS environment variable. When you do ls -F only from the command line, it uses the alias with the $LS_OPTIONS options and just appends -F on the end so it doesn't erase the other options. Not sure why it worked before with alias ls='ls -F' in /etc/profile other than maybe the order things were done in the scripts. If your alias ls='ls -F' appeared before /etc/profile set up it's own alias, then it would have been overwritten but the default alias includes -F so you wouldn't have noticed. Hope that helps. Dave |
I actually noticed this to be an issue on any distribution that I'm using KDE 3.5 on. I just created/modified .bashrc and added
Code:
alias ls="ls --color" |
All times are GMT -5. The time now is 05:35 AM. |