0

I have made a Minecraft.desktop file in ~/.local/share/applications/ that reads as follows:

[Desktop Entry]
Name=Minecraft
Comment=Play this game in OpenJDK Java 7 Runtime
Exec=minecraft
Terminal=false
Icon=minecraft
Type=Application
Categories=Game;

and my "minecraft" script reads:

java -jar ~/Desktop/Minecraft.jar

I can enter java -jar ~/Desktop/Minecraft.jar into the teminal and minecraft will start. I can also enter minecraft into the terminal and the script will run and the game will start. However, the icon will not actually appear to do anything when I click it with this configuration. I tried first with the Exec line as Exec=java -jar ~/Desktop/Minecraft.jar, but that didn't work, so I tried the script. I just don't know why nothing seems to happen when I use the launcher icon??

any thought on this issue? thanks!

1

I have found the solution to my problem after a little more experimenting:

I needed the script in a default PATH area, because it seems that .bashrc does not run before the .desktop Exec occurs. So what this means is that instead of having my minecraft script in my ~/Desktop/scripts folder (which is added to my path in .bashrc), I placed the script in /usr/local/sbin.

So I hope this might help anyone else wanting to make an awesome Minecraft icon!

0

Go to the path where ever you have created this .desktop file open terminal to that path and type

 sudo desktop-file-install Minecraft.desktop

This will add entry to the launcher.Find it use it .

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.