Use .profile instead of .pam_environment

We will wait until the wide adoption of .pam_environment.
Compute colors on the fly

When drawing window borders, we must consider the color map of the
window to compute the correct color *pixel*.