krunner and PATH
I'm desesperatly trying to have krunner to recognize commands in additional PATH entries, namely ~/bin.
I created ~/.config/plasma-workspace/env/path.sh with export PATH=$HOME/bin:$PATH
but krunner refuses to run any command that is in ~/bin. It only see commands that are in the standard PATH.
Any idea on how to fix this ?
Posted Jan 9, 2020, 5:21 PM UTC
44
Remove the extension from the script/binary you want to run: Script.sh -> Script
The command I used is this: PATH="/home/$USER/bin/:/bin" krunner
Of course this is if you want to open krunner from the terminal with those paths.
Otherwise you don't have to make any changes to the path.sh file
Yes that works, by pre-launching krunner with the proper PATH. Still does not explain how to have Plasma (without this workaround) launch krunner with Alt+F2 with proper environment variables...
It works for me(without pre launching it).
I wrote this in the plasma-workspace/env script:
Then you have to log out and login.
Maybe you didn't make it executable?
https://i.imgur.com/GQw1xoO.png
Can yuo write in a new terminal window: echo $PATH
Alternatively, try adding the command to your .bashrc, even if I don't think it works (I had already tried)
Then log out and login.
I finally found out why I was missing some env vars (specified in ~/.profile) in the Plasma session: it was caused by not using a Display Manager (eg SDDM) but login via the console and starting Xorg with
startxitself launchingstartplasma-x11. In that case, some login shell env variables (including PATH) are not transmitted to the Plasma session for some reason...