Some of you may have previously spotted our old Minecraft on Fedora 18 masterclass and found it handy for setting up Minecraft 1.4.7 (and later 1.5.1) on Fedora 18 with mods, texture packs, gnome shell integration and a few tips on troubleshooting Java issues.
However, six months on things have changed dramatically. A new version of Fedora Linux has arrived (along with helpful new tools) and Minecraft now has a completely new launcher and support for riding around on horseback (among other things). So, to keep up with the changes here's a new and improved version of what turned out to be our most popular post this year!
Just like last time I'm assuming you're using a 64-bit system and have the latest updates installed for Fedora 19. It is recommended you install non-free Oracle Java with easyLife, but you can also use the version of OpenJDK provided with Fedora (See the 'troubleshooting' section for how to solve problems you might run into). This tutorial was also written when 1.6.2 was the most recent release, but we expect these tips to work with any future versions of Minecraft whose version number begins with '1.6'. Unlike last time we're using the default graphics drivers that come with Fedora 19 rather than the proprietary versions offered for the ATI graphics card we used. However, if you run into problems (such as Minecraft refusing to load because "OpenGL hardware acceleration is not enabled") then you can download and configure nVidia drivers using easyLife or you can look here for AMD/ATI driver instructions (they were written for Fedora 18, but setup shouldn't be dissimilar). I also recommend you use easyLife to download font packages and non-free media codecs, but this is not strictly required.
Minecraft isn't available in our package manager, but that isn't going to stop us! In this tutorial you should download two files. The first is the official Minecraft launcher, and the second is the icon image you see to the right of this text. You should save both files in your /home directory (not just in your downloads folder). You should also install alacarte through Fedora's package manager.
When you first get the opportunity, test the following in a terminal window:
java -jar ~/Minecraft.jar
You should see the image to the left which prompts you for your Minecraft user name and password. Once validated the launcher will start downloading the rest of the game. If nothing happens or you just see a blank screen, try some of the parameters suggested on the Minecraft launcher download page. While you are waiting for this to download it makes sense to set up a Minecraft shortcut/launcher for Gnome Shell so you don't have to use the terminal every time you wan to play the game. This is why we installed the alacarte package earlier; we can use this package to create custom Gnome icons. Simply search for
alacarte in Gnome Shell, and click the icon that pops up called Main Menu. Click Games in the left-hand panel of the window that pops up, then click New Item. (Your icon may not appear in the Games section when you are finished, but it will definitely be in Other section). Simply click the square icon on the left to select mc1.jpg as the icon, type
Minecraft as the name, then use the following as your command (replacing
bob with your user. Also ensure you add the same parameters you used for the Java command earlier):
java -jar /home/bob/Minecraft.jar
If you have more than one user on your system and want to use the same link for everyone you can store
minecraft.jar launcher in
/usr/share/minecraft instead. Each user should still download their own particular installation to their /home directory. Just like any other Gnome Shell icon you can then add Minecraft to your favourites by right-clicking it. In our last tutorial the icon looked a little nicer as it had a transparent background. I wound up spending a good hour trying to get this SVG file (and a PNG version of it) to work with alacarte but was unable to. I'm not sure if this is alacarte turning its nose up at those file types or if I was missing something, but you may have more luck playing with the GIMP than I did!
If you're using 64-bit Fedora 19 with OpenJDK you may find that after pressing the Play button all you get is a black screen of death. To fix the problem follow this guide to update the LWJGL (this is a collection of libraries that aren't bundled by default with Minecraft as they're Linux-specific). Next, edit the execution line in your launcher to the following (substituting
bob for your username):
In your home directory, create a new shell script called Minecraft.sh and add the following code to it:
#!/bin/bash export LD_LIBRARY_PATH=”/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/” java -jar Minecraft.jar
You should add any necessary parameters to the bottom line if this is required for your setup. If things still don't seem to work, start again but this time use Oracle Java instead of OpenJDK. Ensure your launcher uses the first command rather than pointing to the shell script if you go for this option.
Those of you who are not interested in using custom texture packs, syncing save files across machines or adding custom mods to Minecraft can stop reading now. This is very much for people who like to customise their copy of Minecraft to suit their own preferences.
These are ridiculously easy to install. Simply launch Minecraft, head to Options > Resource Packs > Open resource pack folder and simply drag and drop the zipped up texture packs into the window that pops up just like you would on any other OS. You will find some of the best Minecraft texture packs available via this link (my personal favourite is "Ovo's Rustic Redemption" resource pack). You may still have to use MCPatcher to use high definition textures (see the 'Install Mods' section below).
Mojang (the developers of Minecraft) unfortunately do not provide their users with cloud-save functionality. Fortunately we can use services such as Dropbox to make this happen by ourselves.
I will use Dropbox for the purposes of this tutorial as it is known to work well with Linux systems and it provides 2GB of free cloud file storage, which is more than enough for our purposes. To set up Dropbox on Fedora you should follow these instructions. Then, close Minecraft and use the following commands in the terminal (substituting
savename for whatever you've called your save. You may need to escape any spaces in the with a backslash
mv ~/.minecraft/saves/saveName ~/Dropbox/saveName ln -s ~/Dropbox/saveName ~/.minecraft/saves/saveName
What we have done here is moved the folder containing your save in /home directory across to your Dropbox folder, then created a symbolic link in the Minecraft save directory that points to it so the system (and therefore the game itself) are fooled into thinking the folder is still there. When you reload Minecraft and select Single Player the save should still be present, and using
cd command to reach
~/.minecraft/saves/saveName should automatically redirect you to your Dropbox directory. On any future systems all you have to do is wait until Dropbox has fully downloaded the Minecraft save folder and then run the second line.
To install mods and make useful tweaks such as provide support for HD texture packs, we need to download MCPatcher. However, most of the links you'll find online will point to an EXE file. That is not much good to us on Fedora, so we need to download the Java version from the 'All Platforms' section and save it in our home folder. Ensure you've successfully launched Minecraft at least once. Then, to run MCPatcher use the following terminal command:
java -jar MC-Patcher-HD-4.2.0.jar
replacing '4.2.0' with whatever the version you downloaded (ensure your version is compatible with the current version of Minecraft you're using) In the Window that pops up it should automatically detect where Minecraft is installed in your
/home directory. If it doesn't you will need to set this manually. You can safely select all the default options. Before you click the 'Patch' button though you may wish to include a mod from the outset. Rei's Minimap mod provides a helpful on-screen map of your surroundings and indicators where animals and mobs are. You can download it from here (scroll down the subsequent page to avoid accidentally clicking a misleading ad), copy it to
~/.minecraft/mods/1.6.2/ folder and then include it in the patch by heading to Mods > Add... and selecting the ZIP file (click OK to subsequent windows).
When you have loaded the mods you'd want to add, click the Patch button. Once complete, launch Minecraft again and once you start playing you should see your mods working.
If you decide to add further mods after running MCPatcher, simply copy the ZIP file containing them to the newly-generated
~/.minecraft/mods/version folder (substitution 'version' for '1.6.2' or whatever version of Minecraft you are using) before you launch Minecraft and they should be loaded automatically before you play. If they are not then you will need to re-run MCPatcher and manually add them in the patch. Also be aware that with each new version update of Minecraft you will need to re-download your mods and MCPatcher and go through this all again if you want to keep your custom mods and texture packs. Thankfully with the new launcher provided from Minecraft 1.6 onwards you can quickly and easily switch between different modified and unmodified versions of the game.