Expunging RedHat Annoyances

 


Overview

This page refers to shell rc files. These are configuration files for your shell. A few come into play. For tcsh and csh, they may include:

For bash and sh they may include:

Comments made about shell rc files may refer to one or more of the above files, or files that are sourced from the above files. For an explanation of the roles these files play, see your shell man page.

 


 

Default Locale

"Locales" affect the way a computer displays its data. It is a customization that permits an internationalization of the system by affecting character sets, what words a program displays, and other things.

The traditional locale (the one used before the concept of locales was introduced into computing) is known as the "C" locale, since it has its origins in the C programming language.

Red Hat is good for its support of locales. It has selected en_US as its default locale which, while being self-centered, can be excused. After all, if someone prefers a different locale they can always select it during the installation process or change it later.

My complaint with Red Hat in this matter is that there is no way to select the C locale during the installation process; it is just not an option. (I would also contend that the C locale should be the "default" default locale ...)

RedHat 9 has default locale of UTF-8, which is much slower than the C locale.

# echo $LANG
en_US.UTF-8
# time bash -c 'grep xyz *.html | wc -l'
     99

real    0m0.484s
user    0m0.370s
sys     0m0.010s

# LANG=C
# time bash -c 'grep xyz *.html | wc -l'
     99

real    0m0.017s
user    0m0.000s
sys     0m0.010s

To fix, change your default locale and add "C" language support in:

/etc/sysconfig/i18n

For example:

$ cat /etc/sysconfig/i18n
#LANG="en_US.UTF-8"
LANG="C"
SUPPORTED="C:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"

The change will be effective for all new logins. If your users want to use a different locale, let them set it in their own environments.

 


 

Getting Rid of Colourized Listings

Edit the file /etc/DIR_COLORS and change the line

        COLOR tty

to

        COLOR none

This won't effect any existing shell sessions, but you should see the difference in any new ones.

 


 

Getting Rid of Colourized Source (emacs)

In your $HOME/.emacs file, you probably have something like the following:

        ; Turn on font-lock mode for Emacs
        (cond ((not running-xemacs)
               (global-font-lock-mode t)
        ))

Comment it out using semicolons.

 


 

Getting Rid of Colourized Source (vi)

This is actually caused by the files /etc/profile.d/vim.* setting an alias for the command vi to point at vim. Just comment the alias lines in those files.

Commenting them out is better than deleting the files because the next time you do an update, you should wind up with either an .rpmnew or .rpmsave file. If you're smart, you've got a cron job looking for the existence of such files, and thus will be notified when the upgrade decides to reenable your vim aliases.

(Rant: If people want to run vim, let them run vim, but don't foist it on the rest of us.)

 


 

Getting Rid of the Bell

For tcsh and csh, this is controlled by the shell rc files. In a suitable spot, add in the line

        set nobeep

For bash, this is controlled by the readline routines, and therefore by the files /etc/inputrc (globally) and $HOME/.inputrc (on a user-by-user basis). You want to add the following line:

        set bell-style none

 


 

Allowing CTRL-D to Exit the Shell

This (I believe) is primarily a csh/tcsh problem. In the shell rc files, look for a line of the form:

        set ignoreeof
change this to the following, adding it if necessary:
        unset ignoreeof

 


 

Killing Klipper

Klipper is that annoying clipboard tool that, ever time you click on a URL, will bring up a dialog asking which asks you what browser you want to run it in. Which means that you cannot cut and paste URLs. (Or if you can, it is certainly nonintuitive.)

Another web page on the Internet mentioned that you can turn this off globally by renaming the autostart klipper.desktop file (found, on RH systems, in /usr/share/autostart). However, when I did this I found that something in KDE would lock up the machine when KDE first starts up. This is definitely rude behavior, and not something that a non-privaleged user should be able to do (*grumble*). This was true even if the klipper.desktop file was moved to another directory. (Afterthought: Was this because I had klipper-related config files left over in my $HOME/.kde directory hierarchy? I don't know.)

Therefore, the mechanism that I used to disable this mis-feature was to edit $HOME/.kde/share/config/klipperrc and set the following line thus:

    URLGrabberEnabled=false

Note that this is effective only for the current user.

You can also disable it globally by setting the same value in the /usr/share/config/klipperrc file. Note, though, that this won't affect users who already have an overriding value in their personal klipperrc file.

 


 

Dumping the Graphical Splash Screen

That's the graphical screen that comes up on the initial boot. I find it annoying (obviously :) and worse, it is a problem if you've got a serial console.

If you use the LILO boot loader, you can disable it by editing the file /etc/lilo.conf and commenting out the line:

	message=/boot/message

After you edit that file, run the command lilo for it to take effect.

If you use GRUB, you can apparently disable the splash screen by editing /etc/grub.conf and commenting out the line containing the word "splashimage". (Thanks to Magnus Naeslund for this information.)

Note that you may have to redo this procedure after performing a system upgrade; Red Hat seems to like to add this "feature" back in.

 


Devin Reade <gdr@gno.org>
http://www.gno.org/~gdr/