LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   xterm, rxvt, aterm, eterm, profiles? colors? (https://www.linuxquestions.org/questions/linux-software-2/xterm-rxvt-aterm-eterm-profiles-colors-225522/)

gplacek 09-01-2004 11:22 PM

xterm, rxvt, aterm, eterm, profiles? colors?
 
Hello all.

I am using slack10 with blackbox. When I am not in X my terminal displays directories in blue and other files in different colors. When I run X and blackbox, and then open up an xterm it only displays black and white. No color difference in files listed. All files are listed in black, but when I su to root, It uses a color scheme or profile or something like that. I would like to change the profile so that my user also displays files with different colors. I am suer there has to be a profile or something that I cany edit, or copy the root profile. I have read the man page for rxvt which I have been using. (I guess its supposed to be a little faster than xterm) How can I edit the profile for my user.

I would also like rxvt or xterm to open with the above plus a different fg and bg. (something easier on the eyes than black on white...) :-)

If I can I will install aterm or eterm, for the transparency, but I have tried in the past and I could never get it to compile transparency into it. Which do you prefer and why? Aterm or Xterm?

Thanks

peace

hw-tph 09-02-2004 04:20 AM

Try opening an xterm and type alias ls='ls --color -F' and then do a regular ls command. Chances are you have colors set in your ~/.bashrc but it is not used since the terminal isn't a login shell. Open up ~/.bash_profile (create it if it doesn't exist) and add the following lines:
Code:

if [ -e ~/.bashrc ]
then
    source ~/.bashrc
fi

This will make sure your ~/.bashrc is always parsed no matter how you start the shell, and if you have listing colors set in your ~/.bashrc these will be activated when you start an xterm for instance.
An alternative would be simply adding the alias command I used above to your ~/.bash_profile.


Håkan

Skazi 09-02-2004 05:54 PM

Out-of-the-box, my Slack 10 installation was setting ls_colors from /etc/profile ...


gplacek, I found this post useful for the same problem:

http://www.linuxquestions.org/questi...74#post1148574

So, created a ~/.bashrc with this line:

alias ls='/usr/bin/ls $LS_OPTIONS'

and got colors everywhere.


My question is: where is LS_OPTIONS being set? I don't see it being set in /etc/profile, and I don't have any of the other rc files which would be run by bash according to the bash manpage.

gplacek 09-07-2004 10:08 PM

Skazi,

I created a .bashrc file with the alias line you suggested, and it worked. Just like you said "colors everywhere" :-)

Hw-tph,

I first tried creating a .bashrc file with the code you suggested, however when I did this it did not work. (might have been my fault. (by the way are there any "--> tabs" in your code? I might have typed it wrong. I used a tab in there once. After I created the .bashrc file with your code and tried to open xterm, it gave no $ and closed or killed itself right after I start typing in anything. Puzzling, but if I typed some of your code wrong then that might be the problem.

Thanks for all the help guys... :-)

Well Well Well... I SEE WHAT I HAVE DONE WRONG, Guess it pays to read things twice... HW-tph, I'm sorry It was totally my error. I tried to create a .bashrc, when if fact I should heve been creating a .bash-profile . Well thats what I get for not reading... Ok, I tried your first idea correctly this time but I had no luck, no color. however using your second Idea will most likley work just as well.

thanks

I have to ask the same question as Skazi "where is LS_OPTIONS being set?" Also can I add something to my .bashrc about using -fg and -bg colors. I know I will have to tweak it a little bit because some of the colors in the LS_OPTIONS might be hard to see on a black backround.

Once again.. You have all been LOADS of help... Thanks millions

320mb 10-24-2004 09:01 PM

Quote:

Originally posted by Skazi
My question is: where is LS_OPTIONS being set? I don't see it being set in /etc/profile, and I don't have any of the other rc files which would be run by bash according to the bash manpage.
Quote:

Originally posted by gplacek


I have to ask the same question as Skazi "where is LS_OPTIONS being set?"
man ls shows this...........
Quote:

ENVIRONMENT
The variable POSIXLY_CORRECT determines the choice of
unit. If it is not set, then the variable TABSIZE deter-
mines the number of chars per tab stop. The variable
COLUMNS (when it contains the representation of a decimal
integer) determines the output column width (for use with
the -C option). Filenames must not be truncated to make
them fit a multi-column output.

The variables LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MES-
SAGES and LC_TIME have the usual meaning. The variable TZ
gives the time zone for time strings written by ls. The
variable LS_COLORS is used to specify the colors used.
The variable LS_OPTIONS gives default options.

The variable QUOTING_STYLE is used to specify the default
value for the --quoting-style option. It currently
defaults to literal, though the authors have warned that
this default may change to shell in some future version of
ls.
the man pages are your friend...............


All times are GMT -5. The time now is 03:16 PM.