Public bug reported: The gdm3 package comes with a session launcher script /etc/gdm3/Xsession which starts everything up. In that script it unconditionally executes $HOME/.profile (if it exists). But this is not necessarily the correct shell startup file.
If your shell is bash and you have a .bash_login file, tty logins will use that and never touch .profile; but logins via /etc/gdm3/Xsession won't execute .bash_login and therefore will not set up your correct environment. If your shell is csh then .profile was never in the picture and you need to instead execute .login and .cshrc (which of course are in a different syntax that the /bin/bash which executes Xsession won't understand). I understand this file comes from upstream, so the bug should probably be filed upstream as well. But Ubuntu doesn't have to include this Xsession in the gdm3 package and could supply its own. (Red Hat have written their own and supply it in their xorg-x11-xinit package; their gdm package simply symlinks that from /etc/gdm. They've solved the profile problem by making the script execute: exec -l $SHELL -c "[command]" where [command] is a shell command that starts up the session.) In fact Ubuntu already does have a more comprehensive Xsession system included as part of the x11-common package. So the Xsession supplied with gdm3 is redundant. (Unfortunately that other Xsession also does not set up your environment correctly; it doesn't seem to call any profile at all.) ** Affects: gdm3 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1903334 Title: Xsession does not invoke the correct shell profile script To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1903334/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs