So you’re using Minecraft Pi on your Raspberry Pi. You enjoy the game, but starting it from the terminal just isn’t your thing. You wish there was an easier way to run it. You’re in luck. In this tutorial I’ll show you how to create a desktop short-cut for Minecraft on your Raspberry Pi.
Note: for all these instructions I assume your main mcpi directory is in the pi directory. If it isn’t you will need to change these instructions to match your setup.
1. Make Minecraft Pi Executable
In your main mcpi directory you need to make the Minecraft file executable. To do this open a terminal, navigate to the main mcpi directory and make Minecraft executable the following commands:
cd ~/mcpi chmod +x minecraft-pi
2. Find an Icon
Next thing we need is an icon for our desktop shortcut. You can make your own or search for one online. Personally, I just use the logo for Minecraft Pocket edition, which can be found here.
Save the file into the main mcpi directory and call it logo.png (or whatever other extension you’re using e.g. logo.jpg).
3. Create a File on the Desktop
Navigate to the Desktop directory within the pi directory using the terminal and create a new file called “minecraft.desktop” with the nano text editor:
cd ~/Desktop nano minecraft.desktop
Now right click and paste the following code into the file:
[Desktop Entry] Name=Minecraft Pi Comment=Creative Block Game Exec=/home/pi/mcpi/minecraft-pi Icon=/home/pi/mcpi/logo.png Terminal=false Type=Application Categories=Games;Education; StartupNotify=true
Save and exit the file. You should now have a Minecraft Pi shortcut on your desktop. When you double click it the game should launch. If the icon doesn’t show up immediately try restarting the desktop or rebooting the Pi.
Have fun with Minecraft Pi. If you want to learn more about Minecraft Pi, check out my API tutorials. I have also written a free book for learning Python programming with the Minecraft Pi API that is available here.