[Bug 252571] Re: .desktop file not honoring PATH environment variable
Bug Watch Updater
252571 at bugs.launchpad.net
Wed Nov 7 13:52:55 UTC 2018
Launchpad has imported 3 comments from the remote bug at
https://bugs.kde.org/show_bug.cgi?id=167502.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2008-07-27T01:40:43+00:00 Juan Ignacio Saitua wrote:
Version: (using KDE 3.5.9)
Installed from: Ubuntu Packages
OS: Linux
This is the situation:
- I have myapp in /usr/bin/myapp and in /opt/bin/myapp
- I also have myapp_entry.desktop in /usr/share/applications with the Exec line as "Exec=myapp"
- I added /opt/bin into PATH (editing /etc/environment). So PATH has the following: /opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Now, when I launch "kdialog --msgbox `echo $PATH`" using ALT+F2 it shows
correctly:
/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
When I launch "myapp" using ALT+F2 it runs /opt/bin/myapp as expected.
But, and this is what I think is a BUG, when I launch "myapp_entry" using ALT+F2 it runs /usr/bin/myapp and not /opt/bin/myapp as I would expect.
Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdelibs/+bug/252571/comments/0
------------------------------------------------------------------------
On 2008-07-31T22:47:41+00:00 Juan Ignacio Saitua wrote:
Found where the problem is. It's in the KStandardDirs::findExe()
function. From line 937 (http://api.kde.org/3.5-api/kdelibs-
apidocs/kdecore/html/kstandarddirs_8cpp-source.html#l00937)
QString p =
QString("%1/%2").arg(kfsstnd_defaultbindir()).arg(real_appname);
you can see that it uses function kfsstnd_defaultbindir() to get the
absolute path to the application. KStandardDirs::kfsstnd_defaultbindir()
returns __KDE_BINDIR and, from the ubuntu packages, the default compiled
value for __KDE_BINDIR is /usr/bin. So, it doesn't matter what you set
in your PATH environment variable, but it always will execute
/usr/bin/myapp.
IMHO, I think that KStandardDirs::findExe() should use
KStandardDirs::kfsstnd_defaultbindir() as the last option to find the
absolute path to the application (and not as the second one, as is coded
right now).
Any comments? Thanks...
Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdelibs/+bug/252571/comments/4
------------------------------------------------------------------------
On 2018-11-02T04:28:39+00:00 Andrew-crouthamel wrote:
Dear Bug Submitter,
This bug has been stagnant for a long time. Could you help us out and
re-test if the bug is valid in the latest version? I am setting the
status to NEEDSINFO pending your response, please change the Status back
to REPORTED when you respond.
Thank you for helping us make KDE software even better for everyone!
Reply at:
https://bugs.launchpad.net/ubuntu/+source/kdelibs/+bug/252571/comments/8
** Changed in: kdelibs
Status: New => Incomplete
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kdelibs in Ubuntu.
https://bugs.launchpad.net/bugs/252571
Title:
.desktop file not honoring PATH environment variable
To manage notifications about this bug go to:
https://bugs.launchpad.net/kdelibs/+bug/252571/+subscriptions
More information about the kubuntu-bugs
mailing list