In it's present configuration, bash will not source /etc/profile when not logging in with an non-interactive shell (not connected to a terminal device). This means that applications started from the windowing system and inherit their environment from the X session does not have custum PATHs etc. set from /etc/profile. The common remedy for this (as seen on the mailing lists) is to make sure the terminal client run in X uses --login, but this does not help for the applications run by the windowing system. Attached patch turns on a configuration setting which allows bash to do login shell on non-iteractive login. Best regards Martin Blix Grydeland
Hmm, I only get an error message from bugzilla saying "no file provided, or file empty". Tried it with mozilla, galeon and netscape (v4 series) and giving up. Posting patch on gentoo-dev@gentoo.org with reference to this bug number.
Created attachment 505 [details, diff] Patch to configure bash to enable non-interactive shell to be login-shell
After following the instructions on bug #71 I managed to create the attachment.
Do you know who else (what distros) use this patch? My concern is that while it could be great for X, it could cause problems with other applications, particularly ssh and scp.
At least RedHat uses it, that's where I looked to what was done when I saw the behaviour of bash on my gentoo and redhat box were quite different. What is more, it is really a configuration option not a patch, the thing being you have to edit a header file to change some options. I'll try to do some tests on ssh, scp and rsh like programs, and report what I find out.
I have done tests on these remote login/execution programs: rsh, rlogin, rcp, rexec, telnet, ssh and scp. All of these appears do use the same semantics regarding sourcing of profile and bashrc files with or without the patch. The only difference I have found is that profile and bashrc are read when loging into X with the patch, neither are read without it. Conclusion: I can't see any reason why not fix this issue by enabling that compile-time configuration option for bash. Best reagards Martin Blix Grydeland
ok, added to bash-2.05a-r2. Thanks! :)