Version: unspecified OS: Linux If a user has a local bin directory configured in his .bash_profile $PATH that overrides an application in /usr/bin, then launching from Plasma Runner opens the application in /usr/bin To reproduce: 1) Add this to .bash_profile: PATH=$HOME/.bin:$PATH 2) Create ~/.bin/firefox, chmod +x 3) In Konsole, launch "firefox". The ~/.bin/firefox application is correctly launched 4) In Plasma Runner, launch "firefox". The /usr/bin/firefox application is incorrectly launched By the way, I believe that this should be assigned to the "runner" component but I cannot find it! Reproducible: Always
bash_profile is specific to, well, bash. krunner does not reference any shell specifics such as that. the path will need to be modified somewhere else that isn't specific to a given shell, but which modifies the user log in env (e.g. .profile) "By the way, I believe that this should be assigned to the "runner" component but I cannot find it!" the correct product is "krunner", not "plasma", in this case :)
Thanks, Aaron. The issue is valid for .profile as well, as I do have this in my ~/.profile file: if [ -d "$HOME/.bin" ] ; then PATH="$HOME/.bin:$PATH" fi I am updating the title and product as needed.
> strace -o trace konsole > kwrite trace I don't see any opening of .bash_profile. Do you ? > echo $PATH (didn't change anything) ...:/home/user/bin:... > dir bin/ ...SimpleLabeler -> /opt/lightscribeApplications/SimpleLabeler/SimpleLabeler SimpleLabeler works with Alt + F2 and konsole.
krunner is not going to open up any files itself to modify the environment. the environment must be set up when the session (and krunner) starts.
> krunner is not going to open up any files itself to modify > the environment. Then maybe the problem is not in Krunner. What component is responsible for either reading from .profile or where should one configure the path for KDE? I find nothing relevant in System Settings, am I missing it? Googling the issue I only see how GDM users can change their configurations system wide. I use KDM (it's even set to autologin) and this should be a per-user setting. > the environment must be set up when the > session (and krunner) starts. > No problem, Aaron, then where does one specify the path if not in .profile?
> strace -f -o trace2 -e open konsole > kwrite trace2 Find: bashrc ?
@Hans-Rudi Denzle: konsole is a terminal emulator. it launches a _shell_, e.g. bash. which sources things like bashrc, bash_profile, etc. your example just proves the point: shells open shell specific env files. @Dotan: it is system specific, though KDE does support putting scripts in the env/ directory. this is covered in the sysadmin area on techbase.
> it is system specific, though KDE does support putting scripts in the > env/ directory. this is covered in the sysadmin area on techbase. Thanks, I just found the page: http://techbase.kde.org/KDE_System_Administration/KDE_Filesystem_Hierarchy This is a problem that a user cannot set his own path in KDE. Any other environment provides this most basic of features (bash, Gnome, Windows, etc). Therefore I am updating the title and changing this to an RFE. I will leave it WONTFIX because I don't want to step on your toes, Aaron, but if this could be considered for a feature then please reopen. Thank you!
In openSUSE 11.2 > echo $PATH can be verified in > kwrite /etc/profile Find: PATH > rpm -qf /etc/profile (which belongs to aaa_base-11.2-43.46.1.i586) If one studies the shell script, there are lines with '$HOME/.' which gives you access to your $HOME directory. In openSUSE 11.2 there is no need for such tricks because 'dir ~/bin/' is already in the 'PATH' and any executable can be linked to 'bin'. Konsole and krunner behave properly.
Hans, that does seem to be an OpenSuse feature, whereas a real KDE feature is needed for users of other distros. It is ridiculous to think that a user cannot configure his PATH. In any case, I keep my scripts in ~/.bin instead of ~/bin because I don't want to see the directory in Dolphin. So why shouldn't KDE let me open those scripts from Krunner? Actually, Krunner _will_ open scripts from that directory, but only if there is no application with the same name in /usr/bin. And no, I did not order the PATH incorrectly: when typing the script name into Konsole it does in fact use the script from ~/.bin instead of /usr/bin. See the OP.
> grep '. $HOME' /etc/bash.bashrc ... test -s $HOME/.alias && . $HOME/.alias ... Try this: > dir .alias (does not exit) > > cat .alias (create one) echo $PATH>/home/user/gaga123 Close konsole and restart Linux. Open dolphin: in 'gaga123' I see my 'PATH'. In a standard config I would assume that krunner and konsole behave similar in a plausible way. So it might be a door for your wish.
Exactly, I mentioned in the OP that Konsole behaves as expected. The strange thing is that the path specified in .profile _is_ honoured, but in the wrong order. That is, if I have ~/.bin/randomScript it will open ~/.bin/randomScript, but if I have ~/.bin/firefox it will open /usr/bin/firefox
Created attachment 56324 [details] krunner only shows (firefox is /usr/bin/firefox) You are just ridiculously right !
Dirty commands in hidden directory '.bin' in the name of firefox and started with 'krunner' would be a security issue: - it's reasonable for krunner to check for multiple commands ('type -a command') - konsole users can check 'PATH' and all locations of an executable WONTFIX isn't ridiculous.
This was resolved as WONTFIX when it was incorrectly marked as a bug (as opposed to Wishlist) and had other incorrect information (such as being applicable to .bash_profile). As all that has changed I'm reopening as a Wishlist instead of filing a separate RFE.
comment #4 still stands. there are ways to set the environment, e.g. putting scripts in ~/.kde/env/ or finding out how your particular OS sets session paths that aren't shell specific. since i'm wasting my time here, i may as well waste everyone else's too ;) (that was tongue-in-cheek, laugh. ;) this is why the feature request (aka "wishlist") is such a wasteland. it's easier to just let things fester here rather than struggle with the user who feels that they know better and can tell use what to do or somehow expect user support from a development tool. who knows how many great ideas are in the plasma wishlist. i don't because i can't be bothered to wade through the dreck that gets filed as "wishlist" just so people don't have to struggle with the sane realities that are imposed on actual bug reports. :/ very unfortunate, and i don't see a fix for it coming any time soon.
> comment #4 still stands. there are ways to set the environment, e.g. putting > scripts in ~/.kde/env/ or finding out how your particular OS sets session paths > that aren't shell specific. Then Comment #5 still stands as well. What component is responsible for either reading from .profile or where should one configure the path for KDE? I find nothing relevant in System Settings, am I missing it? Googling the issue I only see how GDM users can change their configurations system wide. I use KDM (it's even set to autologin) and this should be a per-user setting.
this is not a user support forum. forum.kde.org is, however. in the spirit of helpfulness, however: * executable script in $KDEHOME/env * ~/.xinitrc
> this is not a user support forum. forum.kde.org > is, however. You are 100% correct, I apologise for presenting the question here. At least the information is here should other people stumble upon this issue. I appreciate your helpfulness and wish you a terrific day!