-1

I am using Debian Stretch, and pcmanfm-qt as the file manager.

Basically I am making a game in C++. Everything is OK, if I run executable from terminal ./launcher. However I cannot run from GUI because of wrong mime type bug, where I get shared library mime type, and am asked to choose program to open the file with.

In the link above people talk that you could launch it with .desktop file if it is in the same path, so this is what I tried. However neither of these 2 desktop files worked (desktop file is in the same dir as launcher):

[Desktop Entry]
Type=Application
Path=/home/myname/pathtogame
Exec=launcher

[Desktop Entry]
Type=Application
Exec=./launcher

as I get error Invalid desktop entry file. The only desktop file that launched the application was this

[Desktop Entry]
Type=Application
Exec=/home/myname/pathtogame/launcher

however in that case, my game cannot load any resources needed, as it relies on them being in relative path to the executable.

3

You probably need to specify both Path and Exec (with a full path for the latter):

[Desktop Entry]
Type=Application
Path=/home/myname/pathtogame
Exec=/home/myname/pathtogame/launcher

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.