Your problem is most probably the display manager. XDM and lightdm see themselves not as login shell and therefore do not source /etc/profile or ~/.profile.
Other display managers as Slim, KDM or GDM do source those files. I suggest you switch to one of them.