Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1579 - /etc/profile is not sourced by bash when logging in from a X display manager
Summary: /etc/profile is not sourced by bash when logging in from a X display manager
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-06 17:52 UTC by Martin Blix Grydeland
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to configure bash to enable non-interactive shell to be login-shell (nonint-login-shell.patch,486 bytes, patch)
2002-04-06 19:21 UTC, Martin Blix Grydeland
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Blix Grydeland 2002-04-06 17:52:03 UTC
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
Comment 1 Martin Blix Grydeland 2002-04-06 18:03:59 UTC
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.
Comment 2 Martin Blix Grydeland 2002-04-06 19:21:27 UTC
Created attachment 505 [details, diff]
Patch to configure bash to enable non-interactive shell to be login-shell
Comment 3 Martin Blix Grydeland 2002-04-06 19:22:21 UTC
After following the instructions on bug #71 I managed to create the attachment.
Comment 4 Daniel Robbins (RETIRED) gentoo-dev 2002-04-06 19:40:30 UTC
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.
Comment 5 Martin Blix Grydeland 2002-04-07 04:57:02 UTC
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.
Comment 6 Martin Blix Grydeland 2002-04-09 10:03:01 UTC
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
Comment 7 Daniel Robbins (RETIRED) gentoo-dev 2002-04-09 20:37:23 UTC
ok, added to bash-2.05a-r2.  Thanks! :)