Thursday, March 18, 2010

Customizing X Session

X is the default X server, xinit is the initialization tool to ease the configuration of X session if you are not using display manager (you can specify nicely which client to run, client options, '--' separator for server related part, server to use, server options). Anyway if you run it without any parameters, it will search for client startup script $HOME/.xinitrc (if it doesn't exists it uses default xterm), in similar way it will search for X server startup script $HOME/.xserverrc (if it doesn't exists it uses default X executable). For ultimate source of information see man page.

Friday, March 12, 2010

Colorizing Less

I was playing with colorizing the less for making man nicely readable.


# Start bold mode
export LESS_TERMCAP_md=$'\e[1;37m'
# Start standout mode
export LESS_TERMCAP_so=$'\e[1;37;41m'
# End standout mode
export LESS_TERMCAP_se=$'\e[0m'
# Start underlining
export LESS_TERMCAP_us=$'\e[4;93m'
# End underlining
export LESS_TERMCAP_ue=$'\e[0m'
# End all mode like so, us, mb, md and mr
export LESS_TERMCAP_me=$'\e[0m'

exec /usr/bin/less "$@"

See also: #1 #2.