How to add Minecraft.jar to Steam in Ubuntu

I have created a bin folder in my home directory and put my minecraft.jar in that folder. I then used Steam's "add non-steam game" option and added the minecraft.jar, but when I click play nothing happens. I can run the .jar manually but I would like to get all my games on steam so it's all nice and organized.
Best Answer
This best way to enable it from steam is to create a .desktop shortcut to run the jar package. This will also allow you to provide name, description and icon to steam, as well as providing the full command line, including attributes.
Pictures about "How to add Minecraft.jar to Steam in Ubuntu"



How do I install Minecraft on Steam Linux?
Save that text file as something like \u201cminecraft.sh\u201d and set it to executable by right clicking -> select properties up the top and checking the \u201cAllow executing file as program\u201d box. And then it will just work, you can launch it from Steam Big Picture mode and it will pick up the Steam Controller perfectly.How do I add Minecraft to my Steam library?
How to add Minecraft to Steam. Firstly, you'll need the Minecraft program on your PC to be able to add it through Steam. Once you have the Minecraft download, go to Steam and in the bottom left corner click 'add a game' and select 'add a Non-Steam game'.Where do I put jar files Ubuntu?
IF you are using the packing system, then a good choice is indeed /usr/share/java/ or /usr/lib (if your app is called from /usr/bin or /usr/sbin). Another good choice would be inside /usr/local, only if this app of yours is host specific.How do I run a jar file in Ubuntu?
Right click the . jar file, and open properties. Now in the properties menu, open the 'Permissions' tab. Enable the 'Allow executing this file as program' checkbox.Minecraft: How to run TLauncher in Linux
More answers regarding how to add Minecraft.jar to Steam in Ubuntu
Answer 2
I've used the following wrapper script for Minecraft back when I used to play it:
#! /bin/bash
# Minecraft launcher script
# Enable if using Oracle Java
#export LD_LIBRARY_PATH="/usr/lib/jvm/j2re1.7-oracle/lib/amd64/"
# Allow a heap size of 512M to 4096M
java -Xmx4096M -Xms512M -cp $HOME/bin/Minecraft/minecraft.jar net.minecraft.LauncherFrame
Just place it in a text file named minecraft
in your bin
folder, in my case I made a folder named Minecraft
and put the minecraft.jar
file in there to keep things clean. Please note your filesystem is case sensitive; unlike in Windows minecraft
and Minecraft
can coexist without causing problems.
Remember to change the permissions of the script to allow it to be executed. In the file explorer, right click and select Properties
, then click the Permissions
tab and check the Allow executing file as program
checkbox. If you instead would prefer using the command line the command is chmod 755 ~/bin/minecraft
.
The script allows for some tweaking, by default it allows Minecraft to use up to 4GB of RAM. To change this, adjust the -Xmx4096M
parameter; for example 8GB will be -Xmx8192M
.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: HONG SON, Magic K, Magic K, Shourav Sheikh