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

KDE4 KRunner path

Tags: None
(comma "," separated)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KDE4 KRunner path

Tue Jun 28, 2011 11:44 pm
The *.desktop files given by distributions usually have the paths hardcoded unfortunately, so you will need to edit it.

The "Run firefox" option given by KRunner should work perfectly though given that output.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Darkmind
Registered Member
Posts
30
Karma
0
OS

Re: KDE4 KRunner path

Wed Jun 29, 2011 4:17 am
bcooksley wrote:The *.desktop files given by distributions usually have the paths hardcoded unfortunately, so you will need to edit it.

The "Run firefox" option given by KRunner should work perfectly though given that output.

All of the *.desktop files were created by me and they don't contain hardcoded paths. Here is the contents of "Command" field for my desktop icon:
firefox %u

Still, KRunner executes '/usr/bin' version of Firefox. I have 3 options there when I type 'firefox'. 2 of them with the web-browser icon and 1 'Run firefox'. All of them execute the same version from '/usr/bin'

As I said before, from command line, from BASH, another version from my home directory is executed. I double checked, '/usr/bin' and '/home/darkmind/firefox' contain really different versions of the browser.
Darkmind
Registered Member
Posts
30
Karma
0
OS

Re: KDE4 KRunner path

Wed Jun 29, 2011 4:39 am
By the way, I was able to reproduce this also on another computer running Mandriva 2010.2 and KDE4, with my own script.

This script just calls 'zenity' to display a message and is called 'myscript':
Code: Select all
#!/bin/bash

zenity --info --text="/usr/bin version";

exit 0;

I placed it into '/usr/bin/myscript'. The same copy, but with changed text "$home version" I placed into '/home/darkmind/bin/myscript'.

I updated '.bashrc' and '/home/darkmind/.kde4/env/profile.sh' with PATH updating:
Code: Select all
PATH="/home/darkmind/bin:$PATH";
export PATH;

Logged out and logged in again. The same situation:

- typing 'myscript' in BASH shows zenity window with '$home version' text
- typing 'myscript' in KRunner show zenity window with '/usr/bin version' text

To be sure, I copied this script into '/home/darkmind/bin/myscript_ver2' and typed 'myscript_ver2' in KRunner. It found the script and executed it.

So, KRunner really looks into the PATH I provided, but for some reason this path has less priority then '/usr/bin'. The question is how to change path search order for KDE4?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KDE4 KRunner path

Sun Jul 03, 2011 8:10 am
Very interesting discovery with regard to the search order for paths. You may wish to file a bug, as this behaviour certainly seems to be deliberate.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Darkmind
Registered Member
Posts
30
Karma
0
OS

Re: KDE4 KRunner path

Mon Jul 04, 2011 3:26 pm
Ok, seems like it's a known bug and it's already fixed in one of 4.6.* versions (exact version is not specified here: https://bugs.kde.org/show_bug.cgi?id=241763)

My Mandriva 2010.2 still runs 4.4.5, OpenSUSE uses 4.6.0. Seems like I have to wait for my distribs update or go compile KDE4 from the latest sources


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]