Important: Please read the Qt Code of Conduct -

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.

  • That is not a Qt related problem, or is it?

    You should probably start a thread at a forum geared to Red Hat linux.

  • It's not a Qt problem, but I have it when I launch my Qt software because I need to open som files in "." directory.

    But if I find a solution, I will post it here, just in case for other people.


  • Moderators

    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": 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.

  • I will try that, thak you for your help

Log in to reply