Two different path on linux redHat
-
Hello,
I have a problem when I want to launch my software.
If I launch it from the console, th path is the executable directory path and this is good for me.
But if I launch it with a double clic, the path is different and some texts files are not finding (help.txt and licence.txt for exemple).Have someone got a solution for that, my $PATH is configure, where is the double clic path ?
Thanks a lot.
Have a good day. -
I think you should follow the Linux standards and not put files like help.txt and license.txt next to the binaries. That will make packaging your application much harder as distributions will not allow for littering /usr/bin (or any other /bin dir) with non-binary files!
The "FHS":http://www.pathname.com/fhs/ actually defines which file types should go where on a linux system.
Using PATH to find your application binary is not recommended either: As you already found out it is not relyable:-) Use QCoreApplication::applicationFilePath() instead.