Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm having difficulty setting custom ls colors in xterm. If I understand it right one can edit the system-wide file located in /etc/DIR_COLORS to modify every terminal or customize xterm; I chose xterm mostly because the other terminals I never use. Here is my .bash_profile and .bashrc respectively:
if [ -f ~/.bashrc ]; then
if [ -f /etc/bashrc ]; then
alias ls='ls --color -F'
When I use the login shell, the colors are different than xterm in that they are not as bright; furthermore, I marked out bold fonts in .Xresources:
So, there must be a file around somewhere that is changing the colors between the interactive and login shells...
color6 (class Color6)
color7 (class Color7)
These specify the colors for the ISO-6429 extension. The defaults are, respectively, black, red3, green3, yellow3, a customizable dark blue, magenta3, cyan3, and gray90. The default shades of color are chosen to allow the colors 8-15 tobe used as brighter versions.
How does that get anyone anywhere with setting the color? It doesn't say what color (class) is assigned to which file specifically, thus adhering to the distribution-wide color codes. Perhaps I am making this more difficult than it should be.
the .bashrc file in your home-directory is only sourced if bash runs not as a login-shell. If it is a login-shell the file /etc/profile is sourced and (if it exists) the .profile in you home-directory. You should read in the manpage of bash about which files are sourced.
Note that the manpage-reader is less, less comes with vi-keybindigs and you can search within the manpage for example with the command
for the occurence of ".bashrc".
BTW, normally with a stock Slackware install all colors are set properly for any terminal.
search for "login" in xterm's man page.
the description of the "-ls" option may be useful for you.
-ls This option indicates that the shell that is started in the
xterm window will be a login shell (i.e., the first character
of argv will be a dash, indicating to the shell that it
should read the user's .login or .profile).
The -ls flag and the loginShell resource are ignored if -e is
also given, because xterm does not know how to make the shell
start the given command after whatever it does when it is a
login shell - the user's shell of choice need not be a Bourne
shell after all. Also, xterm -e is supposed to provide a con-
sistent functionality for other applications that need to start
text-mode programs in a window, and if loginShell were not
ignored, the result of ~/.profile might interfere with that.
If you do want the effect of -ls and -e simultaneously, you may
get away with something like
xterm -e /bin/bash -l -c "my command here"
Finally, -ls is not completely ignored, because xterm -ls -e
does write a /var/adm/wtmp entry (if configured to do so),
whereas xterm -e does not.