Install Minecraft in Fedora

Minecraft is this game everybody is talking about lately. I found out it existed about two weeks ago and after playing around with the Classic mode in the Left-Handed Toons server, I was convinced I wanted to buy the alpha version which is currently under heavy development.

So I withdrew some founds from my oDesk account and bought the game last friday. That means I was now able to download the jar file and start the game in my computer using my minecraft.net username and password… and so I did.

The thing is having to double-click a jar file every time I wanted to play the game doesn’t look like the best way to “install” an application I’m sure I’ll be using quite often during Christmas. I’m a fedora user and I wanted Minecraft to be available in Gnome at the Applications menu, right under the Games category like any other game.
I decided to spent some time trying to get that done and as result I created the following Bash script.

Since the jar file can’t be distributed, the script uses wget to download it an place in a proper location (/usr/local/minecraft/). The script then add desktop entries to the menu, create some icons and adds a minecraft command to start the game from console. I assumed you already have Sun’s Java Runtime Environment installed and that is available under /usr/java/latest/bin/java. Those paths and others can be easily changed modifying the variables at the top of the file.

The script was only tested in fedora using Gnome, but I think it can work on other environments. Please fork it at GitHub if you find a way to improve it … and I’m sure somebody will.

The icons are a resized version of the big PNG published at Code Shenanigans.

  • Talal Mash

    Thank YOU SOOOOOOO MUCH!~

  • CGC002

    Thank you- it works perfectly in KDE.

  • bob

    works well

  • Quanose

    how do i do this? i just got Fedora yest erday and wanted to reinstall minecraft Premium again.

    • Anonymous

      Hi, you can do the following. Open a terminal, login as root and execute:

      wget http://goo.gl/hl87e
      bash minecraft-install.sh

  • Anomynous

    Not good

    • Anomynous

      In fact, i don’t know what the hell this is

  • KenDhia

    Thank you. at the first time i’ve faced an issue with java directory but it worked after i edited “JAVA=/usr/java/latest/bin/java” to “JAVA=/usr/lib/jvm/java/bin/java”(I’m using Fedora 17)