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

James Richard Tyrer tyrerj at acm.org
Sat May 9 16:13:58 BST 2009


Dotan Cohen wrote:
> 2009/5/8 James Richard Tyrer <tyrerj at acm.org>:
>> Dotan Cohen wrote:
>>>> "Files ending in ".sh" are read and executed..."
>>>> ...so it would be 'profile.sh'.
>>>>
>>>> Otherwise I think yes (but I haven't tried it).
>>>>
>>> Thanks, this got me on my way:
>>>
>>> $ cat .kde/env/profile.sh
>>> PATH=$HOME/.bin:$PATH
>>> export PATH
>>>
>>> Of course, the file needs to be made executable.
>>>
>> This will work for starting KDE, but you need to keep in mind that if
>> you do anything other than starting KDE with KDM that your $HOME/.bin
>> directory might not be added to your PATH.
>>
>> While debugging startup/login scripts can be a real bitch, it would be
>> better to find out why your $HOME/.bash_profile script isn't modifying
>> your PATH as expected.  It is best to do things correctly and the
>> .kde/env directory should be used only for things that are KDE specific.
>>
> 
> How would one go about that? It might be a *buntu thing?
> 
I would start with the Xsession script.  KDM has its own Xsession script 
which is normally in:

	/usr/share/config/kdm

if KDE was installed with prefix=/usr.  This is where the 'profile' 
scripts are sourced (called).  These are:

	/etc/profile
	$HOME/.bash_profile
	/etc/xprofile
	$HOME/.xprofile

NOTES:

"/etc/profile" will source all the scripts:	
	
	/etc/profile.d/*.sh

The standard user profile script on Linux is "$HOME/.bash_profile" if 
you are using the Bash shell (which is the default) however, other 
systems or other shells may/will have a different file name.

The stock KDE/KDM Xsession file is designed to work with all systems and 
  *buntu may have modified it but it should still contain lines similar to:

     [ -f /etc/profile ] && . /etc/profile
     if [ -f $HOME/.bash_profile ]; then
       . $HOME/.bash_profile

     [ -f /etc/profile ] && . /etc/profile
     [ -f $HOME/.profile ] && . $HOME/.profile

If there is no reference to:

	/etc/profile
	$HOME/.bash_profile

it is possible that the script was changed to a login script in which 
case the first line would be either:

	#! /bin/sh -

or

	#! /bin/bash -

The "-" is sufficient to indicate a login shell, but it could also be: 
"-l", "--"' or "--login"

Or, just post the script and I will look at it.

-- 
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