![]() Registered Member ![]()
|
I didn't succeed in googling answer for my question (did this for an hour).
I have Firefox installed in '/usr/bin' from system repository. Apart from that I've installed a newer version in '~/firefox'. Now I'd like to configure my system to launch the '~/firefox' instance every time I type "firefox" command, no matter from Shell, KRunner or clicking desktop icon. I configured PATH in ~/.bashrc and logged in again. This enabled "firefox" in shell, but KRunner still executes one from '/usr/bin'. Following advices from Google, I created '~/.kde/env' directory and 'profile.sh' script there. This script only updates PATH variable:
I logged out and logged in again. No difference. KRunner and desktop icons still prefer '/usr/bin' Does anyone know how to get rid of this? How can I affect PATH which is used by KDE4 when it looks for executable? Thanks in advance |
![]() Administrator ![]()
|
Did you make the script you placed in ~/.kde/env/ executable? Also, is ~/.kde/ the directory used by KDE? You can check with the output of "kde4-config --localprefix"
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
There should appear two Firefox results in KRunner. One has the Firefox icon and will execute the system's Firefox. The second one has a gray gear icon and should run your ~/firefox.
connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
|
![]() Registered Member ![]()
|
Yes, it's executable. 'kde4-config --localprefix' shows '<HOME>/.kde4'. I tried to place the same script into '~/.kde4/env', but result is the same |
![]() Registered Member ![]()
|
I see 2 instances there, but both of them execute the same version of Firefox (from /usr/bin). As I said, when I execute Firefox from console, correct version is picked. Nevertheless, even imagine that the second instance executed correct version, how can I put it to the first position? |
![]() Administrator ![]()
|
Given the results of "kde4-config --localprefix", it definitely needs to be placed under ~/.kde4/. After moving the file and ensuring it was executable you did logout and back in right? Those settings are only applied on KDE Startup.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Definitely, I always logout/login when doing changes in environment
|
![]() Administrator ![]()
|
What is the output of "kde4-config --path exe"?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
How can I change these paths? |
![]() KDE Developer ![]()
|
So you have the ~/firefox/bin directory with the 'firefox' executable there? If so ...
... this would be wrong, because you have to add the bin directory to PATH, not the installation prefix.
Pino Toscano
|
![]() Registered Member ![]()
|
There's no 'bin' directory under 'firefox' one. Firefox executable is located right into '/home/darkmind/firefox':
To be sure, I have the same 'export' in my .bashrc file and when I type 'firefox' from BASH, it starts correct version of Firefox (from $HOME/firefox) |
![]() Administrator ![]()
|
Please edit the script you have placed in ~/.kde4/env/ and add the following below the "export PATH=..." statement:
Once logged in, grep ~/.xsession-errors for "ENVIRONMENT CHECK"
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Administrator ![]()
|
An easier solution could be to make a new desktop file for the new Firefox. In kmenuedit, make a new Firefox item and set the command to launch /home/darkmind/firefox/firefox. Additionally, you can rename the old Firefox "Firefox-old" or something similar, which should make it rank second if you type "fir" in KRunner.
Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.
10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts |
![]() Registered Member ![]()
|
bcooksley,
I did this and I see .xsession-errors contain this line and quite long list of paths. Firefox instance in my home directory is among them and first in line: *** ENVIRONMENT CHECK /home/darkmind/firefox:/home/darkmind/bin:/home/darkmind/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/opt/cross/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:.:/usr/sbin:/sbin Still, KRunner executes instance from '/usr/bin'. While Konsole executes one from '/home/darkmind/firefox' |
![]() Registered Member ![]()
|
Hans,
Yeah, I know, there is always more than one way to do it. That's why I like Linux, one can always apply a workaround almost for any problem. On the other hand, I saw a lot of people having the same problem, but I didn't see anyone who succeeded in fixing. Seems like there's a bug or some unevident behavior of KDE. And I'd like to know the real cause of this problem, both to have a good understanding of how KDE works with environment and to correctly fix the problem. |
Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]