Unix Console & X11 Tips & Configs

Initially, I started with the premise to change my Console/Terminals to UTF-8. However, as it turned out, they behave rather weird, some things don’t work right, characters are sometimes not visible, they tend to make a mess in displaying special chars (as used in mc), some control-commands don’t work anymore and so on. My light-weight-terminal aterm does not support UTF8 (but JIS and whatnot, what the heck?) So I postponed this to some later date, when there’s at least a fixed mlterm available.

However, there are some interesting things to mention, in regard to the console:

mc clogs up the history
If Midnight Commander writes funny things like cd "`printf "%b" '\0057'`" into the shell-history, then HISTIGNORE is not set, or does not contain a space.

export HISTIGNORE="&:[ ]*:exit"

Umlauts appear as ? when doing an ls
This is due to the really relevant variable regarding the charset: LC_CTYPE. Set it to something other than “C”:

export LC_CTYPE=en_GB.ISO-8859-1

English system in Switzerland
If you want the system in english (and not necessarily the data), but are otherwise not english speaking, and sure as hell do not want screwed-up data formats or medieval measurement units, you want to set up your locales like this:

export CHARSET=ISO-8859-1
export LANG=en_GB.ISO-8859-1
export LC_CTYPE=en_GB.ISO-8859-1
export LC_MESSAGE=en_GB.ISO-8859-1
export LC_MESSAGES=en_GB.ISO-8859-1
export LC_NUMERIC=de_CH.ISO-8859-1
export LC_TIME=de_CH.ISO-8859-1
export LC_COLLATE=de_CH.ISO-8859-1
export LC_MONETARY=de_CH.ISO-8859-1
export LC_NAME=de_CH.ISO-8859-1
export LC_ADDRESS=de_CH.ISO-8859-1
export LC_TELEPHONE=de_CH.ISO-8859-1
export LC_MEASUREMENT=de_CH.ISO-8859-1
export LANGUAGE=en_GB

Setting LC_PAPER can lead to problems with things you do not send to a printer (pdf-generation for instance), and setting LC_ALL makes it impossible to use different locales for different uses.

Of course, you can replace ISO-8859-15 with UTF-8 if you like.

make mlterm look decent
These are the contents of .mlterm/main:

scrollbar_mode = right
scrollbar_view_name = next
fontsize = 16
fg_color = white
bg_color = black
use_transbg = true
brightness = 60
fade_ratio = 75
geometry = 80x25
use_anti_alias = true
logsize = 4096
word_separators = " ,;=:"

Well, yes, it now looks quite NeXTy ;).

A better cursor
Not really console-related, but anyway: Get an Icon-theme like Shere Khan X (why, it looks like the one from NeXT of course), and put the unpacked directory into ~/.icons/ Now change your .Xresources to read:

Xcursor.theme: Shere_Khan_X

Screenlock with DPMS
For some machines, xlock is seemingly unable to do DPMS. Don’t fret:

xset dpms force off && xlock -mode blank -resetsaver

See Also
An earlier post in Blog: Useful Shell Oneliners

Comments are closed.