Gnome 3.22 uses wayland by default. Gnome on wayland does not read
/etc/profile). See https://bugzilla.gnome.org/show_bug.cgi?id=736660.
I have my initialization files set up as following:
.bash_profiledoes nothing but source
.profileonly sets environment variables like
.bashrcsets some bash specific settings and aliases and environment variables for applications like
The effect (before wayland) was following:
- when I login graphically
.profilewas read and environment variables like
LC_MESSAGESwere set. when I open bash inside a terminal emulator then
- when I login under a virtual terminal then
.bash_profilewas read which in turn reads
- when I login using ssh then behaviour is similar to virtual terminal.
In all cases
.bashrc were read and my environment was set up.
So now gnome 3.22 uses wayland and wayland does not read
.profile. How can I set up my initialization files so that I again have the effects as described above?
Note that I do not insist that certain files (like
.profile) are read. What I want is to have my environment set up in a sensible way. That means I want to keep bash specific settings to the bash initialization files and other settings to other initialization files. Also I would like to not copy the settings over different files.
I use arch linux. Answers for all distributions are welcome. When suggesting a workaround please also describe the side effects and the advantages and disadvantages.
update november 2017: as far as i understand the gnome developers have acknowledged that people expect their login shell config files (
.bash_profile in case of bash) are sourced after login. regardless of text or graphical login. so my use case outlined above works again.
still the gnome developers want to move away from starting a login shell. it seems that the direction they are going is to use environmentd from systemd:
it seems that it will take a while until all login methods are adapted to environmentd.