I've developed an application in Qt which uses a launch script, myapp.sh
. I've created a .desktop file which launches this script, and set:
Command: $PWD/myapp.sh
Work path: $PWD
However, $PWD
prints my home directory when I launch the .desktop file, resulting in attempting to launch ~/myapp.sh
rather than ~/Development/build-directory/bin/myapp.sh
(that directory being where the .desktop file resides). Why isn't it correctly setting the working directory to where the .desktop file is actually located and how can I get around this without having to specify an absolute path in the .desktop file?