I use Fedora 35. I have to create desktop shortcut of application. When I start it from the folder using terminal by command ./metro it works. But when I placed .desktop file in /usr/share/applications with this content my application doesn’t start.
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/spym0nk/Games/Metro_Last_Light_Redux/metro
Name=Metro Last Light Redux
Comment=Metro Last Light Redux
Icon=/home/spym0nk/Games/Metro_Last_Light_Redux/icon.png
What should I do to start my application from shortcut?
Your case:
Your .desktop file looks fine, I don’t see any obvious issue there,
Just to be sure, the path to the executable is correct?
Not sure why it would make a difference to place it in your user directory instead of the system directory, but it’s worth a try. Move the file to ~/.local/share/applications/
You can use desktop-file-validate <your-desktop-file> to see if there are any complains about it.
Can you change the exec line to Exec=sh -c "/home/spym0nk/Games/Metro_Last_Light_Redux/metro 2>/tmp/mymetrolog.txt" and examine the resulting log file? We are only capturing stderr because applications usually write error messages to standard error. If that application writes error messages to stdout instead of stderr, replace 2>/tmp/mymetrolog.txt with >/tmp/mymetrolog.txt.