Alexander Gottwald wrote:
On Wed, 27 Apr 2005, Carlo Florendo wrote:
Hello,
Does anyone know a way to set xterm colors without using the -bg and -fg options all the time? I know one way to do it would be to alias xterm in bash_profile such that the command always includes the bg and fg options every time it is invoked. Aliasing works for me but this is not what I want.
man xterm lists a huge number of commandline options and their respective
resources. -bg => background
-fg => foreground
These resources can either be set in /usr/lib/X11/app-defaults/XTerm* but these changes will get lost with the next xterm update or in ~/.Xdefaults
You may also create a global file /usr/X11R6/lib/X11/xinit/.Xresources and import tzhe settings with
xrdb -merge /usr/X11R6/lib/X11/xinit/.Xresources
If you're using startx to start the xserver, it will automaticly read the settings from these files (in this order)
/usr/X11R6/lib/X11/xinit/.Xresources
$HOME/.Xdefaults
The syntax of these files is the same as in /usr/lib/X11/app-defaults/XTerm*
bye
ago
Thank you very much Alexander. I have been very enlightened with your posting. :)
I've got a follow-up question: I run startx and an xterm fires up. That's no problem. When I invoke another xterm from the xterm that just started, I now get the proper background and foreground colors but `ls -l' does not display color coded directory entries anymore on the newly invoked xterm (It does display the colors from the xterm invoked by startx, though). Everything would work fine if I invoke `xterm -e /bin/bash --login -i' since I've aliased ls to `ls --color=auto' in my bash configuration file. Is there any way to make my xterm understand `ls --color-auto' without loading the shell configuration files (since it's from my bash configuration that I set `ls --color-auto')?
Thank you so much for your prompt reply!
Best Regards
Carlo
-- Carlo Florendo Astra Philippines Inc. www.astra.ph