LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Minecraft on Stable (Wheezy) (https://www.linuxquestions.org/questions/debian-26/minecraft-on-stable-wheezy-4175480638/)

Tadaen 10-13-2013 04:36 PM

Minecraft on Stable (Wheezy)
 
Probably a dumb question but I can't find anything about this on google.

I have the latest Minecraft.jar file and when I try to open it it opens as an archive. So go to modify what it is opened with. Runtime isn't an option anywhere. JRE 6 was installed by default, I installed 7 as well. But neither is on the available programs list to launch it with. How to run Minecraft on Debian. I'm sure it is something simple I am missing.

Tadaen 10-13-2013 04:43 PM

Just now figured out how to launch it manually from Open With in the dialog. But how do I set default to use runtime instead of archive or iced tea

Firerat 10-13-2013 05:33 PM

below is a script I used to use
I have commented out ( but not tested ) the ps3 controller bits I used.

essentially has two modes, online and offline

Minecraft.sh

You get the login screen

Minecraft.sh Steve
you play offline , playername Steve ( skips the normal login screen )



Code:

#!/bin/bash
# Minecraft.sh
JavaMem=1024
autokey=autokey-gtk
Minecraft=$HOME/.minecraft
#TODO add some magic to manage .minecraft, plus manage versions and mods

Sixad () {
sudo service bluetooth stop
sudo /etc/init.d/sixad start
}
# Sixaxis Deamon
#ps -e | grep -q sixad || Sixad
#pidof $autokey || coproc $autokey
### above commented out for LQ posting
# sixad is a driver for ps3 controller
# autokey monitors 'events' I use it to map mouse wheel events to the ps3 controller
# ( by mapping 'dead keys' F20 and F21 ) to keys on the PS3Controller.
# when autokey 'sees' these it sends a mouse wheel up/down

Online () {
# MineCraft
pidof minecraft.jar || \
    coproc java -Xmx${JavaMem}M \
                -Xms$(( ${JavaMem} / 2))M \
                -cp $Minecraft/minecraft.jar \
                net.minecraft.LauncherFrame
}
Offline () {
pushd $Minecraft
  pidof minecraft.jar || \
    coproc java -Xmx${JavaMem}M -Xms$(( {JavaMem} / 2))M \
        -cp $Minecraft/bin/minecraft.jar:$Minecraft/bin/lwjgl.jar:\
            $Minecraft/bin/lwjgl_util.jar:\
            $Minecraft/bin/jinput.jar: \
        -Djava.library.path=$Minecraft/bin/natives net.minecraft.client.Minecraft $MCUSERNAME
popd
}
if [ "$#" != "0" ];
then
    #if [ "$1" == "-r" ];
    #then
        # sudo /etc/init.d/sixad stop
        # sudo /etc/init.d/sixad start
        # MCUSERNAME=$2
    #else
        MCUSERNAME=$1
    #fi # commented out for LQ post
        # sometimes sixad would 'die' ( if left inactive ) so was just a quick hack to restart it
    Offline
else
    Online
fi

save as ~/bin/Minecraft.sh
and in terminal
Code:

chmod 700 ~/bin/Minecraft.sh
Minecraft.sh

the chmod is only needed the once, in future just Minecraft.sh [PlayerName]

you might want to tweak JavaMem=1024 ( max 1GB memory, and starts with half (512MB) )


All times are GMT -5. The time now is 01:23 AM.