Konsole in English
Kevin Krammer
kevin.krammer at gmx.at
Tue Oct 27 09:30:33 GMT 2009
On Tuesday, 2009-10-27, James Tyrer wrote:
> "When bash is invoked as an interactive login shell, or as a
> non-interactive shell with the --login option, it first reads and
> executes commands from the file /etc/profile, if that file exists. After
> reading that file, it looks for ~/.bash_profile, ~/.bash_login, and
> ~/.profile, in that order, and reads and executes commands from the
> first one that exists and is readable."
>
> "When an interactive shell that is not a login shell is started, bash
> reads and executes commands from ~/.bashrc, if that file exists."
>
> You would think that it should work. However, it is also common
> practice for ".bash_profile" to change that.
>
> Fedora 10 "/etc/skel/.bash_profile" (the default):
>
> ------8<------8<------8<------8<------8<------8<------8<------8<------
>
> # .bash_profile
>
> # Get the aliases and functions
> if [ -f ~/.bashrc ]; then
> . ~/.bashrc
> fi
>
> # User specific environment and startup programs
>
> PATH=$PATH:$HOME/bin
>
> export PATH
>
> ------8<------8<------8<------8<------8<------8<------8<------8<------
>
> It is this that would make it not work. Now it is possible that your
> distro doesn't have the code that sources ".bashrc" from
> ".bash_profile", but I don't like to suggest that people should make
> such changes to their distros. The script will work for everyone, and
> it is really the better way to do it since changing environment
> variables in ".bashrc" can cause problems whether or not your distro
> does this.
Unfortunately this seems to be very common across distributions.
A different approach could be to set the overall environment to what you want
in shells and specifically set the one for KDE and all applications started
from within it, e.g. by using KDE's environment extender mechanism
($HOME/.kde/env), or in the X session setup scripts if other desktop shells
than KDE might be used.
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20091027/709f7778/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list