I just recently downloaded a game called Starsector and instead of going into the folder every time and running
./starsector.sh
, I want to create a desktop entry. Below is my current .desktop
file called starsector.desktop
:
[Desktop Entry]
Version=1.0
Name=Starsector
GenericName=Starsector
Exec=sh -c "cd /usr/games/starsector && sudo ./starsector.sh"
Terminal=false
Icon=/usr/games/starsector/graphics/icons/cargo/ai_core_alpha.png
Type=Application
Categories=Game
I have moved this file into ~/.local/share/applications
. When copying the Exec
line and running it in my shell, it runs the game perfectly fine, but when clicking on the icon it does nothing.
##### Things I have tried
I have tried to set Terminal=true \
Run desktop-file-validate
; there are no errors present \
Adding exec permissions to the file\
Copying file to the desktop and clicking "Allow launching"\
Running gio set myapp.desktop metadata::trusted yes
As of now, the file permissions are -rw-rw-r--
. I don't know if this is a file permission problem or simply a problem with the game executable itself somehow.
EDIT:
##### More things I have tried
Setting Exect=sh -c "cd /usr/game/starsector && sh ./starsector.sh
\
Changed owner and group of starsector.sh
from root
to my own user
Changed owner and group of starsector.desktop
from my own user to root:root
Asked by Caleb Collier
(19 rep)
May 14, 2022, 04:58 AM
Last activity: May 14, 2022, 05:16 PM
Last activity: May 14, 2022, 05:16 PM