KDE menus (Lancelot, Kmenu, Krunner) not respecting PATH?

James Richard Tyrer tyrerj at acm.org
Thu May 7 19:50:15 BST 2009


Boyd Stephen Smith Jr. wrote:
> In <gtpvjh$pls$2 at ger.gmane.org>, Matthew Woehlke wrote:
>> Boyd Stephen Smith Jr. wrote:
>>> Dotan Cohen wrote:
>>>> I have a $HOME/.bin (yes, with the dot) in my PATH:
>>>> $ cat .bash_profile
>>>> PATH=$HOME/.bin:$PATH
>>>> export PATH
>>> Why would a .bash_profile affect KDE *at all*?  .bash_profile is used by
>>> *bash* to configure the environment for login runs.  If you are starting
>>> a KDE session from KDM/XDM/GDM there's no login bash runs involved in
>>> the startup.
>> I don't think that's universally true, though it probably depends on
>> distro and DM.
> 
> Yes, I think some distributions misguidedly source .bash_profile and/or 
> .bashrc at odd times.
> 
The "Xsession" script needs to source the proper profile script for the 
shell that you are using (.bash_profile for Bash).  It can do this 
either explicitly or implicitly by being a login script.

> Sourcing .bash_profile (or .profile) is a bit dangerous, as they are allowed 
> to be fully interactive.  On some systems, I have my .bash_profile prompt me 
> and depending on my response possibly 'exec screen'.
> 
If you read the fine man page for BASH, you will see that 
".bash_profile" is the script for login.  It should not be interactive.

> Sourcing .bashrc is less dangerous, since (because of historical problems) 
> it shouldn't consume input or produce output most of the time.

But, that isn't relevant since it isn't what is sourced for login.  IAC, 
that would be wrong.  The environment should be set in the profile 
script, not the resource script.

-- 
JRT

Linux (mostly) From Scratch

___________________________________________________
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