Friday, August 3, 2012

How To Create a Minecraft Desktop Launcher in Unity (Ubuntu 12.04)

I had recently decided to install and play minecraft on my desktop running Ubuntu 12.04, and after a couple of times got sick of having to open it up from the terminal all the time - so I decided to make a desktop shortcut. I figured I would post how I did this to save others some time. This should also allow for the easy creation of desktop shortcuts for other programs as well.

Make sure to replace the bolded values with the appropriate directory (in place of directory) and memory allocation (in place of 4096M - 4 GB of RAM dedicated). Furthermore, if your image name is different make sure to replace it.

Save this file in your ~/Desktop/ directory with the filename Minecraft.desktop

The next thing you need to do is make sure that the file is executable. The easiest way to do this is right click on the desktop icon, select properties -> Permissions and fill in the box next to "Allow executing file as program". Alternatively, open up a terminal, cd into the Desktop directory, and type the following comand:

sudo chmod +x Minecraft.desktop

When you do this the icon you selected should be visible on your desktop, and double clicking it will launch minecraft.