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

KRunner, $PATH, Kubuntu 15.10

Tags: None
(comma "," separated)
qadeo
Registered Member
Posts
12
Karma
0

KRunner, $PATH, Kubuntu 15.10

Mon Nov 09, 2015 1:39 pm
KRunner doesn’t see my $PATH.
I have an executable file in ~/.config/plasma-workspace/env with the line
Code: Select all
export PATH=/myPath:$PATH
which did the job in Kubuntu 15.04.
After upgrading Kubuntu 15.10, KDE 5.4.2, this doesn’t work anymore.
Is there a new way to configure it?
luebking
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Mon Nov 09, 2015 3:03 pm
Did you try extending /etc/profile (to check whether krunner simply ignores $PATH or the env script is just not picked up)?
qadeo
Registered Member
Posts
12
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Mon Nov 09, 2015 9:05 pm
Great! If I set $PATH in /etc/profile or ~/.profile KRunner uses it.
Thanks a lot. This solves my problem.

Still I wonder, always for KRunner:
openSUSE 13.1, KDE 3.5: Is was “enough” to set $PATH in /etc/bash.bashrc.local.
Kubuntu 15.04, Plasma 5: It is possible to set $PATH in ~/.config/plasma-workspace/env/myConfig.
Kubuntu 15.10, Plasma 5: It is possible to set $PATH in ~/.profile.

Why the difference?
What else can you with the env script?

And: ~/.config/plasma-workspace is a path far way from ~/.kde.
Why there? Is this path used for anything else?
luebking
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Mon Nov 09, 2015 9:25 pm
/etc/bash.bashrc.local is for bash - I guess other shells just read it
~/.config/* is just XDG conform, you could add ~/.kde/config to $XDG_CONFIG_HOME, so this is just alignment to standards that didn't exist when KDE introduced ~/.kde

Now, the actual and $60.000 question is why krunner ignores your ~/.config/plasma-workspace/env config scripts.

Are they generally sourced?

Try a script that
Code: Select all
export FOO=bar


re-login and "echo $FOO > /tmp/foo.test" from krunner and eg. konsole (and check /tmp/foo.test each time)
qadeo
Registered Member
Posts
12
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Mon Nov 09, 2015 10:49 pm
Neither KRunner nor Konsole know about $FOO. So the script isn’t run.
Could it be the permissions of the script? I tested 775 and 700, both with the same effect.
luebking
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Tue Nov 10, 2015 8:45 am
No, that's fine. They're supposed to be sourced by /usr/bin/startkde which looks in
Code: Select all
qtpaths-qt5 --paths ConfigLocation | tr ':' '\n' | sed 's,$,/plasma-workspace,g'

here - the script however needs to be suffixed *.sh
qadeo
Registered Member
Posts
12
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Tue Nov 10, 2015 11:19 am
Sorry luebking, I am not sure if I understand that correctly. I’m not (yet :-) a KDE developer.

1. What is qtpaths-qt5? Part of qt5-devel-tools? Neither found on my computer nor in my Kubuntu repositories.
When I search for it I find ... cygwin!? MS Windows?
2. Has my script in ~/.config/plasma-workspace/env to be suffixed *.sh?
It always was.
luebking
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Tue Nov 10, 2015 3:38 pm
It's only named qtpaths in ubuntu, comes with qttools5-dev-tools and qtchooser proviodes a symlink (in /usr/bin)
If it's used in
Code: Select all
grep qtpaths /usr/bin/startkde
and not available, that explains it (ubuntu then misses a dependency here, i'd say)
qadeo
Registered Member
Posts
12
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Tue Nov 10, 2015 4:31 pm
Alright, I have qtpaths
Code: Select all
$ grep qtpaths /usr/bin/startkde
QTPATHS=/usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths
# directories, as identified by Qt's qtpaths,  e.g.  $HOME/.config
and it shows us
Code: Select all
$ qtpaths --paths ConfigLocation | tr ':' '\n' | sed 's,$,/plasma-workspace,g'
/home/myUser/.config/plasma-workspace
/etc/xdg/xdg-plasma/plasma-workspace
/etc/xdg/plasma-workspace
/usr/share/kubuntu-default-settings/kf5-settings/plasma-workspace
The path to ~/.config is there. But not used?
luebking
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Tue Nov 10, 2015 10:00 pm
The startkde script seems to differ from mine, can you please paste it somewhere (eg. paste.kde.org)?
Also check
Code: Select all
stat /usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths


on whether that file actually exists.
qadeo
Registered Member
Posts
12
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Wed Nov 11, 2015 12:32 pm
Here you are: https://paste.kde.org/pwbrxsy1q
Code: Select all
$ stat /usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths
  File: '/usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths'
  Size: 23168           Blocks: 48         IO Block: 4096   regular file
Device: 802h/2050d      Inode: 787459      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2015-11-10 16:52:44.117263088 +0100
Modify: 2015-08-13 12:39:20.000000000 +0200
Change: 2015-10-27 18:30:13.665179059 +0100
 Birth: -
luebking
Karma
0

Re: KRunner, $PATH, Kubuntu 15.10

Wed Nov 11, 2015 4:13 pm
D'oohhh.

Replace line 211 by
Code: Select all
test -r "$file" && . "$file" || true


Looked up history: Broke with https://git.reviewboard.kde.org/r/125323/ fixing commit should be linked there as well.


Bookmarks



Who is online

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