Skip to content

Instantly share code, notes, and snippets.

@Gjum
Created February 1, 2015 21:44
Show Gist options
  • Save Gjum/1b92d8c98e914f03580d to your computer and use it in GitHub Desktop.
Save Gjum/1b92d8c98e914f03580d to your computer and use it in GitHub Desktop.
Start Minecraft without opening the launcher every time
#!/bin/bash
# Start Minecraft without opening the launcher every time
# written by Gjum https://github.com/Gjum
# location to store the startup command:
faststart="$HOME/.minecraft/.faststart"
if [ -f "$faststart" ];then
exec "$faststart"
else
echo "Start Minecraft now as you usually do, then press enter"
echo " to capture the command to run Minecraft in $faststart"
read
pgrep -a java | grep "net.minecraft." | cut -d' ' -f2- > "$faststart"
chmod +x "$faststart"
echo "Done! Now you can close Minecraft."
echo "Run this command again to start Minecraft."
echo "If it does not work (updates, session expired),"
echo " or if you want to change the version/other settings,"
echo " just delete $faststart and run this again."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment