Summary: | .desktop file not honoring PATH environment variable | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kservice | Reporter: | Juan Ignacio Saitua <jisaitua> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | a.samirh78, alexander.lohnau, h.klene, kdelibs-bugs, nate |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Screenshot |
Description
Juan Ignacio Saitua
2008-07-27 01:40:43 UTC
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... 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! Dear Bug Submitter, This is a reminder that 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? Thank you for helping us make KDE software even better for everyone! Created attachment 130404 [details]
Screenshot
Trying to use an environment variable in the working directory (even though it is suggested by the edit dialog) will break the search for the executable and not run the program. In addition usage of "~" also fails to resolve $HOME.
(In reply to Holger from comment #4) > Created attachment 130404 [details] > Screenshot > > Trying to use an environment variable in the working directory (even though > it is suggested by the edit dialog) will break the search for the executable > and not run the program. In addition usage of "~" also fails to resolve > $HOME. Can you please file two separate bugs for this. Thanks! done: bug 424973 & bug 424974 Is the original bug still present? KStandardDirs is no longer used, there's no __KDE_BINDIR anymore, etc. I tested, looks fixed to me. |