Created attachment 402986 [details, diff] Patch to dotfiles in FILESDIR With dash as /bin/sh GNOME records the following warning on login: /etc/gdm/Xsession[879]: /etc/gdm/Xsession: 5: /home/<user>/.bash_profile: [[: not found Patch to /etc/skel dotfiles in FILESDIR attached using recommendations from the Bash Reference Manual http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html http://www.gnu.org/software/bash/manual/html_node/Is-this-Shell-Interactive_003f.html
I wonder if this is a GDM bug, where it tries to have sh source .bash_profile, regardless of whether sh is bash (or something like that). To me, at least, that seems the appropriate line of investigation. Bash files should be able to use bash(isms), so I don't think I agree with the proposed solution/course of action. CC'ing both the bash and gnome teams, in case they have any input to add at this stage in the game
Comment on attachment 402986 [details, diff] Patch to dotfiles in FILESDIR sounds like a gdm bug. the whole point of naming files .bash_xxx is so that you can do bash-specific things in them. fixing the dot files won't help when users are putting bash code in there themselves.
Looks like the the final step is /etc/X11/xinit/xinitrc.d/49-keychain (belonging to gdm) being sourced by /etc/gdm/Xsession. #!/bin/bash # source keychain variables keychain="`which keychain 2>/dev/null`" if [ -n "$keychain" ] && [ -x "$keychain" ] && [ -f "$HOME/.bash_profile" ] then . "${HOME}/.bash_profile" fi
(In reply to Chris Mayo from comment #3) > Looks like the the final step is /etc/X11/xinit/xinitrc.d/49-keychain > (belonging to gdm) being sourced by /etc/gdm/Xsession. > > #!/bin/bash > > # source keychain variables > > keychain="`which keychain 2>/dev/null`" > if [ -n "$keychain" ] && [ -x "$keychain" ] && [ -f "$HOME/.bash_profile" ] > then > . "${HOME}/.bash_profile" > fi Then... the solution would be to make this compatible with #!/bin/sh ?
(In reply to Pacho Ramos from comment #4) you can drop 49-keychain entirely, or make gdm execute the session code using /bin/bash explicitly
Can we just drop 50-ssh-agent and 49-keychain? People who use gdm likely also run desktop environment that can handle ssh and gpg agents. The others can customise their xsession.
(In reply to Alexander Tsoy from comment #6) > Can we just drop 50-ssh-agent and 49-keychain? And they shouldn't be installed by gdm in the first place.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7cbef6cf8bcca85cbb0594e62226c8a6a262b69 commit b7cbef6cf8bcca85cbb0594e62226c8a6a262b69 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2021-04-30 02:27:41 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2021-04-30 16:08:16 +0000 gnome-base/gdm: Version bump to 40.0 * Drop 49-keychain and 50-ssh-agent files (bugs #549102, #692648) * Switch to Meson (resolves bug #585976) ** Remove unnecessary fontconfig, libXext, iso-codes, libgudev, libXinerama dependencies * Remove unused introspection, smartcard, xinerama USE flags * Depend on xorg-server[-minimal] (bug #660546) * Resolve bug #613222, resolved upstream in v40.0 * Resolve bug #733708, resolved upstream in v3.38 Bug: https://bugs.gentoo.org/762460 Closes: https://bugs.gentoo.org/549102 Closes: https://bugs.gentoo.org/585976 Closes: https://bugs.gentoo.org/613222 Closes: https://bugs.gentoo.org/660546 Closes: https://bugs.gentoo.org/692648 Closes: https://bugs.gentoo.org/733708 Signed-off-by: Matt Turner <mattst88@gentoo.org> gnome-base/gdm/Manifest | 1 + ...dm-40.0-meson-allow-building-with-elogind.patch | 211 +++++++++++++++++++++ gnome-base/gdm/gdm-40.0.ebuild | 207 ++++++++++++++++++++ 3 files changed, 419 insertions(+)