Wednesday, November 30, 2011

Tech: Startup script for Minecraft under Linux

I use a heavily modified script to start Minecraft under Linux (Ubuntu 10.04, Lucid).

The script incorporates many of the suggestions from [HOWTO] Optimize Minecraft for Linux thread on the official forums.

It also resizes the Minecraft window on startup to 720p, convenient for recording videos.

You can get it here: minecraft startup script.

1 comment:

  1. Instead of doing the whole, write to a temporary file to run it in the background thing, here is another way to do that bit. It basically spawns a sub-shell then runs that in the background. =)

    (sleep 2 # wait for the launcher to get started

    # get the id of the launcher's window
    window=\`xwininfo -name "Minecraft Launcher" | perl -lne 'if (/Window id:\\s(\\S+)/){print \$1;}'\`

    xdotool windowsize \$window $wid $hgt # change the window size
    xdotool windowmove \$window $left $top # roughly re-center) &

    ReplyDelete