This post is for anyone who wants to install Minecraft on Ubuntu and have it feel like any other game installed via the Ubuntu Software Center. It assumes you have already purchased Minecraft and provides full Unity integration, though Unity is not needed for this to work. In fact, I suspect it should work for any Linux distribution that has a desktop environment.
We are going to do this via the command-line because copy-and-pasting commands from this tutorial is easier and more fool-proof than following a long list of screen shots. It's also easier for me to write it that way as there are fewer steps.
First we need to install Java. The website claims it needs Sun Java, but the open source Java in the Ubuntu repos works just fine in my experience.
sudo apt-get install openjdk-7-jreNow we need the actual game
sudo wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar -o /usr/games/minecraft.jarChange the vi part in the next section to gedit if you want a graphical text editor.
sudo chown root:games /usr/games/minecraft.jar
sudo chmod 755 /usr/games/minecraft.jar
sudo vi /usr/games/minecraftThe file contents should be as follows.
java -Xmx1024M -Xms512M -cp /usr/games/minecraft.jar net.minecraft.LauncherFrameAnd then set the proper permissions on the file
sudo chown root:games /usr/games/minecraftAgain, change vi with something else if that is easier for you.
sudo chmod 755 minecraft
sudo vi /usr/share/applications/minecraft.desktopAnd put this in the file.
[Desktop Entry]The last piece we need is an icon. There are many good Minecraft icons at http://www.rw-designer.com/icon-detail/5547 I like http://www.rw-designer.com/icon-image/5547-256x256x32.png as it gives us the highest resolution available. Replace the URL of the icon you prefer to use in the following command.
Comment=Build your own world
sudo wget http://www.rw-designer.com/icon-image/5547-256x256x32.png -o /usr/share/pixmaps/minecraft.pngNow you should be able to play Minecraft by simply typing minecraft in the command-line, in the Unity dash, the KDE prompt, or by browsing to the games menu in the applications menu in your desktop environment of choice. It is also available to all users of your desktop.
You also do not need to do anything to update. Minecraft updates itself each time you start it.
I've got one more neat trick up my sleeve. If a CraftBuntu spin sounds good to you, here's how you can setup Ubuntu to just run Minecraft when you sign in. It assumes you have already done the above.
sudo cp /usr/share/applications/minecraft.desktop /usr/share/xsessions/Now Minecraft is an available option when you select your desktop environment. This works best if you set Fullscreen in the Minecraft options.
You could do a number of things with this setup. You could setup a minimal Ubuntu installation that has no desktop environment, or other desktop-related software installed. You could also allow guests to play Minecraft without touching any of your stuff by them selecting the Ubuntu guest account and setting Minecraft for the login. I have even found that on my struggling laptop this setup allows Minecraft to run more smoothly as there is no other desktop cruft running in the background.