I've had a few issues with environmental variables not set correctly in my Raspbmc Raspberry Pi. Specifically, I've had to manually specify the following in ~/.bashrc.export LANG='en_AU.UTF-8export LANGUAGE='en_AU:en'export MAIL='/var/mail/pi'However, in another Pi running vanilla Raspbian, these environmental variables are set correctly. I wanted to see what file specified these, but couldn't find it. I tested the files that I know of that run when logging in to a terminal. These gave no hits.grep LANG -r /etc/profile /etc/profile.d/ /etc/bash.bashrc ~/.profile ~/.bashrc /etc/environmentgrep MAIL -r /etc/profile /etc/profile.d/ /etc/bash.bashrc ~/.profile ~/.bashrc /etc/environmentConversely, on my laptop running Arch, /etc/profile.d/locale.sh appears to set LANG, and ~/.profile specifies LANGUAGE. However, I could find no mention of MAIL.How can  I find where these environmental variables are set?EDITI searched the whole of /etc and ~ for these strings in the working system (Raspbian).grep \bMAIL= -r /etc 2>/dev/nullgrep \bMAIL= -r ~ 2>/dev/nullSearching for MAIL gave no hits.grep \bLANG= -r /etc 2>/dev/nullgrep \bLANG= -r ~ 2>/dev/nullThis strategy gave only a few hits for LANG in /etc, and none for LANGUAGE. There were a few false hits in /etc with LANG=C, and one true hit (as mentioned by vinc17) at /etc/default/locale:LANG=en_AU.UTF-8. However (as per a previous question by me), this file at /etc/default/locale is not sourced on my Raspbmc machine, so I presume that the situation is a bit more complicated than the mere presence of this file.
How can I find where LANG, LANGUAGE and MAIL environmental variables are set?
bash;login;environment variables