Thursday, August 20, 2009

Change dark blue directory color in Terminal 10.5 Leopard

The following will rid your Terminal of blue directory listings:

1. Add the following to ~/.profile :

alias ls='/bin/ls -G'
export LSCOLORS=exfxcxdxbxegedabagacad

2. Change the color(s) displayed by `ls` considering the following:

For each pair of characters in the string 'exfxcxdxbxegedabagacad', the first character in the pair represents the foreground color, the second character in the pair represents the background color. Changing the character changes the color; see the following chart:

a black
b red
c green
d brown
e blue
f magenta
g cyan
h light grey
A bold black, usually shows up as dark grey
B bold red
C bold green
D bold brown, usually shows up as yellow
E bold blue
F bold magenta
G bold cyan
H bold light grey; looks like bright white
x default foreground or background

Each character pair in the string 'exfxcxdxbxegedabagacad' represents a type of file displayed by `ls`. The breakdown of character pairs follows:

Pair 1 (ex) - directories
Pair 2 (fx) - symbolic links
Pair 3 (cx) - sockets
Pair 4 (dx) - pipes
Pair 5 (bx) - executable files
Pair 6 (eg) - block special
Pair 7 (ed) - character special
Pair 8 (ab) - executable with setuid bit set
Pair 9 (ag) - executable with setgid bit set
Pair 10 (ac) - directory writable to others, with sticky bit
Pair 11 (ad) - directory writable to others, without sticky bit

So, following this through to conclusion, the following is the list of default color pairs:

ex - blue/default - directories
fx - magenta/default - symbolic links
cx - green/default - sockets
dx - brown/default - pipes
bx - red/default - executable files
eg - blue/cyan - block special
ed - blue/brown - character special
ab - black/red - executable with setuid bit set
ag - black/cyan - executable with setgid bit set
ac - black/green - directory writable to others, with sticky bit
ad - black/brown - directory writable to others, without sticky bit

Finally, to change the listing of directories from blue to cyan, change the first character pair (ex) to (gx) in .profile :

export LSCOLORS=gxfxcxdxbxegedabagacad

3. To have the color change take effect, quit and restart Terminal, or run the following command:

. ~/.profile

Wednesday, August 19, 2009

Install RPy 1.0.3 with R 2.9

Substitute line 77 of src/RPy.h

#include /* must follow Graphics.h */

with

#include /* must follow Graphics.h */

it builds and seems to work

from David Citarro