I'm having a bit of an issue: Neither of my /etc/profile or /etc/environment are getting sourced at login!

i.e: After boot, the global variables I've got set in /etc/profile (and /etc/profile.d/*.sh consequently) or /etc/environment are not recognized neither by other GUI apps nor by bash on terminal.

Please note that I'm running Linux Mint 17 the Cinnamon edition, which, by default, does source the /etc/profile file.

File permissions are -rw-r--r-- 1 root root for all of the files in question.

What could be the problem?

  • 1
    Just in case it matters: what are the file permissions? (On my Mac, which is not Linux, /etc/profile is -r--r--r-- 1 root wheel where the wheel group holds system administrators, I think. Small chance that it might not be sourced if, for example, it's writable to others?)
    – Arjan
    Feb 22, 2015 at 15:43
  • I've just checked that out.. permissions are -rw-r--r-- 1 root root 856 Feb 22 15:55 /etc/profile (for all of the files in question) Feb 22, 2015 at 16:08

3 Answers 3


Ran into this with Debian Jessie + Cinnamon + lightdm.

Going backto wheezy, I find that /etc/profile and ~/.profile gets sourced by /etc/gdm/Xsession. This logic appears to be totally missing in "this" jessie setup. So I grabbed this code and copied to a new file in jessie:


graeme@jessie:~/Desktop$ cat /etc/X11/Xsession.d/70fix_lightdm_gpv

# GPV: 2-May-2015, lightdm + cinnamon forgets to source ANY profiles!!

# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# indent-tabs-mode: nil
# End:

# vim:set ai et sts=2 sw=2 tw=80:

I resolved this issue by adding the following bit of code to the Display Manager load script ( /etc/init.d/mdm )

if [ -f /etc/profile ]; then
    . /etc/profile

Now, I've got all my configuration loaded as soon as the Display Manager is fully loaded.
Thank you for your comments.


If you are using a display manager, you have graphical login. So neither of these files are read. Instead most of the display managers do source the ~/.profile configuration file.

You should try to configure your ~/.profile file.

If you are not using a graphical login the files that you mention are in use.

As an alternative you could try to configure your display manager.

  • Well I don't know about other DMs but what I can confirm is that my current one, which is MDM, does source the /etc/profile file. Anyway, even the ~/.profile is not being sourced. Feb 22, 2015 at 19:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .