community/gdm - .profile is not sourced
Hello,
i had a longer conversation on IRC with uniqNuuid
and vkrishn
about
a problem of mine wherein my .profile would not load when i wanted to.
I found a simple and nice "workaround" / "fix" that could be of use for a wider audience of GDM users here:
GDM needs to be told explicitly to source ~/.profile
$: cat /etc/gdm/PostLogin/Default
#!/bin/sh
#
# Note: this is a sample and will not be run as is. Change the name of this
# file to <gdmconfdir>/PostLogin/Default for this script to be run. This
# script will be run before any setup is run on behalf of the user and is
# useful if you for example need to do some setup to create a home directory
# for the user or something like that. $HOME, $LOGIN and such will all be
# set appropriately and this script is run as root.
if [ -e ${HOME}/.profile ]
then
. ${HOME}/.profile
fi
Then the .profile that sets the environment (not in scope of GDM package)
$: cat ~/.profile
export ENV='${HOME}/.ashrc'
After that the .ashrc file to set shell variables (not in scope of GDM package)
$: cat ~/.ashrc
PS1='\h:\w\$ '
Best wishes
P.S. IRC user uniqNuuid
suggested creating ~/.bash_profile. This did not work
at all for me.