Registered Member
|
Greetings, fellow forum members!
I have encountered interesting issue while playing with kgtk -- it is a wrapper to use KDE open/save dialogs within GTK and QT4 applications. I install kgtk, and link the wrapper to /usr/local/bin/program_name as suggested in the manual, e.g.
My PATH is:
So /usr/local/bin/firefox should now start first. It works if I start firefox from a terminal -- I get KDE4 open/save dialogs. However, if I start firefox via KDE -- Alt+F2 dialog, Kickoff-menu or desktop icon, I still get GTK menus. A workaround is to edit firefox.desktop to /usr/local/bin/firefox, but it can't be the right way. So the question is -- where does KDE4 store its path and why it overrides mine? How do I make /usr/local/bin/ my first path in KDE4? It is a 32-bit system with KDE compiled witout kdeprefix flag.
Erik, proud to be a member of KDE forums since the very beginning.
|
Administrator
|
Where do you set $PATH? It needs to be done before startkde is run. Alternately, you can use a script in $(kde4-config --localprefix)/env/ to set it appropriately...
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I've tried just that, no luck.
It seems to me that it is xdg-open who opens wrong path -- it is xdg-open who interprets .desktop files. Have to read how do I configure its behavior. EDIT: Yes, the root of the problem is xdg-open: if I have "Exec=firefox %U" in firefox.desktop file and execute "xdg-open ./firefox.desktop" it starts /usr/bin/firefox and not /usr/local/bin/firefox. Of course, I can create .desktop entries in ~/.local/share/applications/ and place "Exec=/usr/local/bin/program" for each program I intend to launch via /usr/local/bin, but it is to bothersome. There should be another way to configure xdg-open-
Erik, proud to be a member of KDE forums since the very beginning.
|
Administrator
|
Interestingly, I can't reproduce although my situation is slightly different....
Self compiled trunk, used xdg-open to run System Settings.
The application opened wasn't /usr/bin/systemsettings but /opt/trunk-kde/kde/bin/systemsettings as expected ( ie. PATH was respected ) When I added an executable script named "firefox" to /opt/trunk-kde/kde/bin/ that worked too. You may wish to check that your script is executable...
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Steps to reproduce for me:
Create firefox.desktop with following:
"firefox" from terminal starts Konqueror, "xdg-open firefox.desktop" starts Firefox (it asks whether I trust the script to be executed on first run and sets it to executable if I agree). "kfmclient exec mozilla-firefox-3.6.desktop" starts Firefox as well. If it works for you correct then it might be gentoo-related issue.
Erik, proud to be a member of KDE forums since the very beginning.
|
Administrator
|
It may be possible that the XDG standard requires that symlinks are ignored. I used actual executable files... additionally, did you logoff after placing the file in ~/.kde4/env? it is needed to take any changes in that directory into effect.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I am experiencing the same issue as Erik in Kubuntu 10.04 as well as openSuSE 11.2 for the short time i had it installed, both KDE 4.4.4. The only difference is that my specific case is I need stuff to run from $HOME/bin.
I have tried adding $HOME/bin to the beginning of my path in ~/.profile, ~/.bashrc, ~/.kde/env/path.sh, and /etc/environment. ALL of them run executables from $HOME/bin when in a terminal, as it should, and ALL seem to ignore that PATH from ANYWHERE within kde or xdg-open. Anyone have any further ideas on a fix? |
Administrator
|
Is the script you placed in ~/.kde/env/path.sh executable? Also, please verify using the output of "kde4-config --localprefix" that ~/.kde is that correct directory.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Yes it is executable, and kde-config --localprefix does return ~/.kde
|
Administrator
|
Please check the content of the *.desktop files whose behaviour you are trying to modify. They may reference the executables in question by unexpected names or directly on the file system.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
This is the entire contents of the .desktop
|
Administrator
|
Unfortunately I do not know why this issue is occurring.. can you try placing a script in ~/.kde4/Autostart which echo's $PATH?
You will then be able to see this output in ~/.xsession-errors.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
The PATH echoed to .xsession-errors is identical to what is echoed from a normal terminal with $HOME/bin listed first.
|
Administrator
|
Unfortunately I don't know why this occurs. Please file a bug report at bugs.kde.org.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Just in case anyone else cares to follow it... https://bugs.kde.org/show_bug.cgi?id=242834
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]