Note: Run any of this at your own risk, don't hold me up at gunpoint if you screw it up. Works perfectly fine for me. I can/will probably keep updating this based on feedback to make it as easy as possible for people.
I wanted to see how easy it was to not only get Minecraft working with the Steam Controller on Ubuntu, but to also see if I could get it all on my Steam Machine, and as it turns out most of it is easy enough.
Linux desktop (Ubuntu, Fedora etc)
For desktop Linux like Ubuntu it’s as easy as having the Minecraft.jar downloaded from here, making a tiny bash script with this in it:
Quote#!/bin/bash
java -jar ~/Downloads/Minecraft.jar
You can simply copy/paste that into a blank text file in gedit or whatever text editor you use
Save that text file as something like “minecraft.sh” and set it to executable by right clicking -> select properties up the top and checking the “Allow executing file as program” box.
Then you can add it to Steam using the “Games -> Add a non-Steam Game to My Library” option like so:
Click Browse and find your way to where you saved the file created above and you will see this:
And then it will just work, you can launch it from Steam Big Picture mode and it will pick up the Steam Controller perfectly.
This will also allow you to stream it to your Steam Machine, or another Linux box running Steam. I’ve tested it myself, and it works well while streaming!
SteamOS
You will need to enable desktop mode in SteamOS by going to Settings -> Interface and enabling Linux desktop mode. Then quit to the desktop using the top right button (like you would turn off your machine, there will be a new option available to go to the desktop).
The SteamOS desktop user account doesn’t come with a password set (see their support page here), so you will need to open the terminal (push the mouse to the top-left corner, type terminal and open it). Then type “passwd” and enter a password twice to create it.
You can then download this script (or copy it out from the spoiler tags below) (poached and edited from here, cheers!).
Save it to the standard Downloads folder and then run the below command in terminal:
Spoiler, click me
# Init
# Make sure only root can run
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
echo "The script was run as root!"
echo "Working to install Java..."
echo "Downloading files..."
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u65-b17/jre-7u65-linux-x64.tar.gz
wget https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
if [ ! -f jre*x64.tar.gz ]; then
echo "Error, Java failed to download correctly, please try again..."
exit 1
fi
if [ ! -f Minecraft.jar ]; then
echo "Error, Minecraft failed to download correcly, please try again..."
exit 1
fi
# Install Java
mkdir /usr/local/java
tar xzf jre*x64.tar.gz -C /usr/local/java
JAVAVER=$(ls /usr/local/java)
echo "Java version is: $JAVAVER"
echo "JRE_HOME=/usr/local/java/$JAVAVER" >> /etc/profile
echo "PATH=\$PATH:\$HOME/bin:\$JRE_HOME/bin" >> /etc/profile
echo "export JRE_HOME" >> /etc/profile
echo "export PATH" >> /etc/profile
update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/$JAVAVER/bin/java" 1
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/$JAVAVER/bin/javaws" 1
update-alternatives --set java /usr/local/java/$JAVAVER/bin/java
update-alternatives --set javaws /usr/local/java/$JAVAVER/bin/javaws
. /etc/profile
echo "Java is installed!"
echo
echo
echo "Java self check"
echo "----------------------------"
java -version
# Install Minecraft
mkdir /home/$SUDO_USER/.minecraft
mv Minecraft.jar /home/$SUDO_USER/.minecraft
touch /home/$SUDO_USER/Desktop/minecraft.desktop
echo '[Desktop Entry]' >> /home/$SUDO_USER/Desktop/minecraft.desktop
echo 'Name=Minecraft' >> /home/$SUDO_USER/Desktop/minecraft.desktop
echo 'Exec=java -jar /home/'$SUDO_USER'/.minecraft/Minecraft.jar' >> /home/$SUDO_USER/Desktop/minecraft.desktop
echo 'Icon=/home/'$SUDO_USER'/.minecraft/minecraft_logo.ico' >> /home/$SUDO_USER/Desktop/minecraft.desktop
echo 'Terminal=false' >> /home/$SUDO_USER/Desktop/minecraft.desktop
echo 'Type=Application' >> /home/$SUDO_USER/Desktop/minecraft.desktop
echo 'Categories=Application;' >> /home/$SUDO_USER/Desktop/minecraft.desktop
chmod +x /home/$SUDO_USER/Desktop/minecraft.desktop
wget https://dl.dropbox.com/s/l02or84ws4a1bde/minecraft_logo.ico
mv minecraft_logo.ico /home/$SUDO_USER/.minecraft
chown -R $SUDO_USER:$SUDO_USER /home/$SUDO_USER/.minecraft
# Cleanup
rm -R jre*.tar.gz
Quotesudo ~/home/Downloads/installminecraft.sh
You can easily get to the terminal on SteamOS desktop mode, by going to the top left corner which brings up the overlay, then type terminal and the icon will appear! This is perfectly safe, I’ve tested it multiple times myself.
It will automatically download Java for you, and automatically move the Minecraft.jar file into /home/.minecraft for you to clean up the cruft. Once finished, it will create a Minecraft file on the desktop you can double click to run.
You are able to adjust the keys to the gamepad using Minecraft’s options menu, which surprised me I didn’t think it would be picked up properly. I was able to walk around with the stick, and interact with the environment. It's not as good as having it in Big Picture mode to configure it properly though. I haven’t been able to figure out how to get it to work from the SteamOS Big Picture mode yet, feel free to share tips in the comments. I will update the article if anyone manages to give me a pointer on that.
0. I assume you already set up password for 'desktop' user, because 'steam' user doesn't have sudo rights.
1. Go to settings and find "Add external app" or something like that (sorry, writing from memory, feel free to correct the post) - and add XTerm
2. Go to library and launch XTerm
3. Download Minecraft.jar
wget https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
4. Create a 'minecraft' script
echo "java -jar /home/steam/Minecraft.jar" >minecraft
chmod 755 minecraft
5. Create a 'minecraft.desktop' file containing something along these lines:
[Desktop Entry]
Name=Minecraft
Exec=minecraft
Icon=steam
Terminal=false
Type=Application
6. su to user desktop
su desktop
7. Copy the files where they should go:
sudo cp minecraft /usr/bin/
sudo cp minecraft.desktop /usr/share/applications/
8. exit Xterm
9. go to setting and add Minecraft exactly the same way you added XTerm in #1
Notes:
- I used 'steam' icon for Minecraft because it's sure to be there and because I don't care much - feel free to use any icon you like, maybe there even are some official icons, no idea
- I had some weird text input problem in the launcher (couldn't type login/password) which I circumvented by copying my ~/.minecraft dir from laptop to steambox, so I was logged in automatically. Might be general SteamOS/BPM problem but might be specific to alchemist, or even my own system - please report back if you can confirm that.
- feel free to point any mistakes, I typed it all from memory and in a bit of a hurry, so there may be some typos or logical errors - hopefully not!
- standard disclaimer - test it out on your own responsibility, I won't refund any broken hardware :D
- forgot one thing: of course you have to install java first! I did it (sudo-ing from 'desktop' user) by adding debian repos to /etc/apt/sources.list and then apt-get install openjdk-8-jre or sth like that. Won't give specific instructions from memory though ;-)
[edit] changed 'code' to 'quote' - looks worse now but 'code' removed newlines for some reason.
[edit2] changed it back but puting every line separately, looks moderately good imo ;-)
Last edited by pb on 12 November 2015 at 10:53 pm UTC
I think it would be great if someone could post here a tutorial explaining how to get emulators running, as well as installing a package manager. I do not have time to do it myself yet, but if it hasn't been done by the time I get some spare time in my hands, I'll write one for sure. I've pointed out Lutris as a possible solution in the past, but I don't really know if it's difficult to get it running on SteamOS.
Edit: the official Minecraft launcher is publicly available from here, as listed there. I don't really see why you didn't include it.
Edit2: One could just provide a .deb with minecraft too, no?
Last edited by MayeulC on 12 November 2015 at 10:43 pm UTC
Quoting: MayeulCIt's a great idea to put tutorial like these on this site, most notably for people who are new to Linux/SteamOSYou're right, I didn't even realise that was the legal download in the original script.
I think it would be great if someone could post here a tutorial explaining how to get emulators running, as well as installing a package manager. I do not have time to do it myself yet, but if it hasn't been done by the time I get some spare time in my hands, I'll write one for sure. I've pointed out Lutris as a possible solution in the past, but I don't really know if it's difficult to get it running on SteamOS.
Edit : the official Minecraft launcher is publicly available from here, as listed there. I don't really see why you didn't include it.
I have updated it now to not make people download Minecraft.
Quoting: liamdawe@pb, I tried that, but I get permission errors when trying to download in xterm.
Are you logged as user 'steam' and in /home/steam? I assumed that's where you land after starting xterm from Big Picture, but maybe it's not universal.
BTW now I noticed that you mentioned some script that already does most stuff which I mentioned in my post and even installs oracle's java - if I'm not wrong, after running that script you should be able to simply add Minecraft from settings -> add external app and it should work in BPM w/o problems. I wish I knew about that script rather than figure it all out by myself. ;-) But it's still useful as it may be used to add pretty much any other app - you only need to create a proper .desktop file for a game/app you installed and it should be easily addable and launchable from BPM.
Last edited by pb on 12 November 2015 at 11:04 pm UTC
Last edited by tamccullough on 13 November 2015 at 1:57 am UTC
http://kodi.tv/
Tried playing Minecraft once with an normal Gamepad on a XBox which kinda sucked.
Another thing with adding Non-Steam games & Apps to Steam, is that you will get kicked out of the game everytime Steam gets an update or looses contact to the Steam server :(.
Quoting: rustybroomhandleNewbies might also like to know how to install Kodi on their Steam Machine since SteamOS media centre functionality is a bit not-quite-there. :)
http://kodi.tv/
Sure and burn a lot of power ~200W/h (depening on model) for just watching movies :(. A Raspberry Pi needs max. 3-4 W/h and small machine with an ATOM CPU needs 10-15W/h.
Quoting: DamonLinuxPLSo why we need this simply script in bash? We can't run in directly from Steam as .jar file?
Steam can't run a .jar file out of the box. As can see in the screenshots you only can add a filename BUT no parameters. So you have to wrap the full command line into a shell script.
See more from me