Below is an example of how to create a Minecraft custom Launcher, the assumption that you have already installed Java and have Minecraft downloaded and unpacked somewhere are made.
- First we need to create a shell script file to launch the Minecraft launcher (I put mine in an apps directory within my home).
cd ~/
mkdir apps
gedit ~/apps/minecraft.sh
- Paste the following content into gedit and save/close gedit
#!/bin/bashNOTE: The path to java (~/apps/java/bin/java) must match where ever you've installed java this can be found with the following command (to be run in a terminal):
~/apps/java/bin/java -Xmx1024M -Xms1024M -jar ~/apps/minecraft/minecraft.jar net.minecraft.LauncherFrame
which javaNOTE: The path to minecraft.jar (~/apps/minecraft/minecraft.jar) must match the path to where ever you've unpacked the Minecraft download.
- Next you will need to make the .sh file executable with the following command:
chmod +x ~/apps/minecraft.sh
- Now we will create a new .desktop file (I put mine in a launchers directory within my home).
cd ~/
mkdir launchers
gedit ~/launchers/gnome-minecraft-panel.desktop
- Paste the following content into gedit and save/close gedit
[Desktop Entry]NOTE: the paths to the (Exec & Icon) need to be to the .sh file and the Icon wish you want to use accordingly).
Name=Minecraft
Comment=Minecraft Launcher
Exec=~/apps/minecraft.sh
Icon=~/apps/minecraft/minecraft.png
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;X-GNOME;
OnlyShowIn=GNOME;
# Translators: those are keywords for the date and time control-center panel
X-GNOME-Keywords=Minecraft;
X-GNOME-Keywords[en_GB]=Minecraft;
X-Ubuntu-Gettext-Domain=Minecraft Launcher
Name[en_GB]=gnome-minecraft-panel.desktop
- Open the file browser (Nautilus) and navigate to the lauchers directory within your home directory.
- Drag the desktop into the Unity Launcher, done!
No comments:
Post a Comment