How to Install Minecraft on Fedora

Minecraft on Fedora 15

As most of you will probably know by know, I'm a huge fan of Minecraft which isn't open source but probably the best game available on Linux today. The game runs really well on Linux but you need to take care in some respects when installing it. Since I get asked this a lot whenever I talk about Minecraft on the podcast, I thought I would write a quick howto and explain the installation of the game on Fedora. The basis for this tutorial is Fedora 15 (which is currently in alpha status) but it should work on Fedora 14 as well.

First, we need to install Oracle's version of the Java virtual machine since Fedora ships with the OpenJDK version which isn't recommended and has problems with running Minecraft.

  • Download the RPM from Oracle
  • Install it: # chmod +x jre-6u24-linux-i586-rpm.bin && ./jre-6u24-linux-i586-rpm.bin
  • Tell your system to use Oracle's Java by default (if the OpenJDK version of Java isn't present on your system, you may skip this step): # alternatives --config java In the dialogue that comes up, make sure that the OpenJDK package is not selected. Choose the other one instead and confirm your selection.
  • To make sure you have the correct version of Java installed, run: $ java -version You should get something like: [fabsh@serenity ~]$ java -version
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

Next, we can install the game itself.

  • Go to the Minecraft download section and get the Minecraft.jar file (listed under the "Linux / Other" heading); save it under the name Minecraft.jar in a directory of your choice.
  • In that same directory, create a document called minecraft.sh with your favourite text editor and put the following content in it:

    #! /bin/bash
    killall ibus-daemon
    java -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
    ibus-daemon --xim -r &

  • Make that file executable: $ chmod +x minecraft.sh

And that's it. If you are wondering why we are killing ibus-daemon before running Minecraft, that is due to a bug that would otherwise prevent any key presses from registering in the game — this step wasn't necessary on F14 but something obviously changed with F15. Anyway, you may now run the game by invoking $ ./minecraft.sh or by creating a shortcut to that script and executing it that way.