After 2024-02-21 Stable Update ~/.profile file is no longer sourced

Could be due to this patch to LightDM:

https://gitlab.archlinux.org/archlinux/packaging/packages/lightdm/-/commit/75c048cabfe9693749f5f363ab6257400d954ffa

So for Bash, /etc/lightdm/Xsession does not directly source /etc/profile and ~/.profile any more, but instead spawns a shell in --login mode. According to the Bash reference manual:

When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.

In other words, /etc/profile is still sourced as usual, but ~/.profile is only sourced if neither ~/.bash_profile nor ~/.bash_login exist.

On a fresh Manjaro Xfce, the bash package provides /etc/skel/.bash_profile, which takes precedence over /etc/skel/.profile from the manjaro-xfce-settings package. Thus, anything in ~/.profile will not see the light of day.

By the way: The above breaks theming of Qt5/6 apps, because QT_QPA_PLATFORMTHEME is exported from ~/.profile.

My workaround:

cd $HOME
ln -s .profile .xprofile

This works because /etc/lightdm/Xsession still unconditionally sources ~/.xprofile.

2 Likes