[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

environment (/etc/profile) and X



Dear All,

Firstly apologies if there is already perceived wisdom on this matter, and I've missed it despite googling fairly extensively.

I recently noticed that in FC3 in a gnome-terminal or xterm that the delete key didn't work and just produced a tilde. Having checked that the correct escape string was being returned, I realised that it was because /etc/inputrc was not being read and so readline wasn't set up correctly in bash, and that the reason for this is because INPUTRC is set in /etc/profile which is never read one one launches a terminal from within X as these start a non login shell ... it's really a manifestation of the fact that logging in via xdm/gdm/kdm starts a session which never invokes a login shell, and so /etc/profile is never read - opening a terminal in Gnome etc starts an interactive non-login shell and so /etc/bashrc and $HOME/.bashrc are read but not /etc/profile or $HOME/.bash_profile. At least that's my understanding.

Googling around a bit, this situation has quite a history, and there was even a time when /etc/profile was even sourced twice at login. This has been discussed at length lately by debian people here:

http://tinyurl.com/6mlw8

http://groups.google.co.uk/groups?hl=en&lr=&client=firefox-a&threadm=27SaO-2Hu-43%40gated-at.bofh.it&rnum=7&prev=/groups%3Fq%3Dshell%2Binitialization%2BX%2B/etc/profile%26hl%3Den%26lr%3D%26client%3Dfirefox-a%26selm%3D27SaO-2Hu-43%2540gated-at.bofh.it%26rnum%3D7

I myself am unsure about what the right way to deal with this is, but my feeling is that at somepoint during login, the appropriate shell login file should be read i.e. /etc/profile for bash.

Thoughts?

Jonathan.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]