This forum has been archived. All content is frozen. Please use KDE Discuss instead.

krunner PATH

Tags: None
(comma "," separated)
User avatar
flying sheep
Registered Member
Posts
56
Karma
0
OS

krunner PATH

Wed Jul 06, 2011 11:02 pm
hi,
i have a silly problem. my default shell, – the one i set with chsh and in konsole – is /bin/zsh.
my “~/.profile” as well as my “~/.zshrc” prepend “/home/myname/bin:” to my path. the .zshrc manually, and the .profile via:

Code: Select all
if [ -d "$HOME/bin" ] ; then
   PATH="$HOME/bin:$PATH"
fi


yet krunner fails to realize that. i have to type ../bin/commandname* to run commands living in my bin directory.

can anybody tell me how to change that?

*that’s another silly bug: krunner is run in ~/Documents. i don’t know how much windows overdose caused this behavior in the responsible dev :)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: krunner PATH

Thu Jul 07, 2011 10:59 pm
It is possible that the KDE startup process does not source either of those configuration files. The fully reliable method in this case is a executable script under ~/.kde4/env/ which alters the environment variables.

It has been noted in another thread that KRunner does place other paths such as /usr ahead of the priority order of $PATH however.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
flying sheep
Registered Member
Posts
56
Karma
0
OS

Re: krunner PATH

Fri Jul 08, 2011 10:31 am
bcooksley wrote:It is possible that the KDE startup process does not source either of those configuration files. The fully reliable method in this case is a executable script under ~/.kde4/env/ which alters the environment variables.

It has been noted in another thread that KRunner does place other paths such as /usr ahead of the priority order of $PATH however.
thanks.

imo both things (the prepending and the not-sourcing) are bugs. ise there any rationale for these kinds of behavior?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: krunner PATH

Wed Jul 13, 2011 10:52 am
Whilst I do not know about the prepending, the not-sourcing is probably expected behaviour, as startkde specifies that it should be executed using /bin/sh. As a result, it depends upon the behaviour of /bin/sh as to whether those files are sourced or not. This behaviour is not dictated by KDE, and is generally dependent upon the distribution or shell in use.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
viengelm
Registered Member
Posts
1
Karma
0
OS

Re: krunner PATH

Tue Aug 16, 2016 9:57 am
On Linux Mint 17.3, ~/.kde4 doesn't exist anymore. It is ~/.kde again and adding PATHs via scripts in ~/.kde/env/ does not work here!
There appears to be no environment variable for the kde directory (!?)
However, since krunner uses sh instead of bash, adding PATHs within the sh configuration ~/.profile works FOR NOW, but the location ~/.profile is not even standard, it might as well be .shrc or anything else. You'd have to set the variable ENV to your location, so in order to be able to set an environment variable, you first need to be able to set an environment variable. >:(


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]