If you want to change background color or whatever other settings of one application under X windows, for example, xdvi, you could set it in your file: ~/.Xdefaults by
xdvi*background: white
xdvi*foreground: black
.
Note: your changes will be starting after you log out and in.
Monday, April 20, 2009
Linux: how to change background color of xdvi
Thursday, December 18, 2008
Linux:shell:Bash: How to change color of your shell printout

You could use 'echo -e' to change your printout text and background color by some color variables. One of the easiest ways to use them is to define shell variable, for example, define those variables in your shell script:
red='\e[0;31m'
RED='\e[1;31m'
blue='\e[0;34m'
BLUE='\e[1;34m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
NC='\e[0m' # No Color
. '\e[0;36m': 0's place is the color of background (0, no effect, 1, bold, 4, underline) and 36 is the text color. You also can change background colors due to color values in the color table. For example, '\e[41;34m' changes background color to red and text color to blue.
How to print?
echo -e "$red These texts are in red$NC" #you must use '-e' to enable interpretation of the backslash-escaped characters, see echo's help.
or if you want to use it in 'printf':
printf "%s\n" "`echo -e $red`These texts are in red`echo -e $NC`"
There is a table of color values attached (this table is from the link). You can find color values what you want.
Saturday, August 25, 2007
Linux:commands: how to kill jobs in background
If you have jobs running in background, you could kill them by the easier way than finding their PID and kill them. Just use the command jobs to find which job is running in background, and then pick up the job you want to kill, use kill %1 (here 1 is the job number)
