After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741874 - In Wayland, not executing ~/.bash_profile
In Wayland, not executing ~/.bash_profile
Status: RESOLVED NOTGNOME
Product: gnome-terminal
Classification: Core
Component: general
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-22 18:55 UTC by Martin Meyer
Modified: 2014-12-30 21:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Meyer 2014-12-22 18:55:14 UTC
I've got some stuff in my ~/.bash_profile that doesn't seem to happen when I run gnome-terminal in a GNOME Wayland session (in Fedora 21). It seems to work if I select "Run command as a login shell" in preferences, but the behavior should not be different between a Wayland session and a traditional X session.

My gnome-terminal package is gnome-terminal-3.14.2-1.fc21.x86_64. vte pacakge is vte3-0.36.3-3.fc21.x86_64.
Comment 1 Egmont Koblinger 2014-12-22 20:09:56 UTC
I suspect it's not because of gnome-terminal, but because of Fedora's wayland vs. legacy X startup scripts.  Sure you can choose to launch a login shell in gnome-terminal, in which case it sources .bash_profile (again), but here I guess the difference is whether its contents are sourced before starting gnome-terminal.

You could try to put
export TIMESTAMP=`date`
in .bash_profile, and then execute
echo $TIMESTAMP
in your shell, and see which timestamp it prints.

My assumption:

g-t is set to "Run command as login shell" (both X and Wayland) -> the time when that terminal window is opened

"Run command as login shell" disabled -> in X I assume it's the timestamp of your login to the window environment (could you please confirm?), and with Wayland it'll be unset.
Comment 2 Martin Meyer 2014-12-30 21:10:45 UTC
Ok, so I reset (via dconf) all gnome-terminal preferences to defaults, just to be sure I hadn't messed with anything.

I load a traditional X session, and I see $PATH is set to indicate that ~/.bash_profile was invoked. I load a Wayland GNOME session, and I see that $PATH is not correct.

I figured out that this is NOT gnome-shell's fault. The bash profile is being started by xinitrc-common.

[mmeyer@timmah ~]$ grep profile /etc/X11/ -R
/etc/X11/xinit/xinitrc-common:if [ -r /etc/profile.d/lang.sh ]; then
/etc/X11/xinit/xinitrc-common:  . /etc/profile.d/lang.sh
/etc/X11/xinit/xinitrc-common:[ -r $HOME/.profile ] && . $HOME/.profile
[mmeyer@timmah ~]$ rpm -qf /etc/X11/xinit/xinitrc-common 
xorg-x11-xinit-1.3.4-2.fc21.x86_64

That's a bug in the Wayland init scripts, but do I report it to Wayland or to Fedora? Either way, marking as RESOLVED => NOTGNOME since it's something to do with packaging in Fedora.