Creating a desktop shortcut for Minecraft Pi

Posted: September 21, 2013 by schoolpiclub in General News

20130921-192023.jpg

Once you have set up Minecraft Pi Edition (as seen in our previous post here) on your Raspberry Pi you may not want to launch it from terminal each time.

We decided to look into how we could launch it straight from the Pi desktop.

First we needed to choose an icon, then make the Minecraft file executable. Here are the instructions we followed.

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. We used this Minecraft Logo.

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.

Advertisements

Comments are closed.