I am trying to run a small minecraft server via Ubuntu desktop 12.04 for my kids. I got minecraft installed and running, but don't want to run via the Terminal all the time. I'm trying to pin a Minecraft button to the launcher and am running into trouble. Here's what I've tried:
- Main Menu (alacarte?) but can't find the icon anywhere; can't drag it from the Main Menu list either.
- When that didn't work, I tried creating
minecraft.desktop&minecraft.shfiles. - I was able to download and get a .png file on the launcher but it won't launch anything.
Here's a rundown of all the commands and scripting I've done:
Terminal Script that does work:
sara@sara-Dimension-4300:~$ cd /home/sara/MCserver sara@sara-Dimension-4300:~/MCserver$ java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui"Main Menu" command script:
java -Xmx1024M -Xms512M -Xincgc -jar /home/sara/MCserver/minecraft.jarminecraft.sh script:
#!/bin/bash cd $(home/MCserver "$0") java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrameminecraft.desktop script:
[Desktop Entry] Name=MineCraft Comment= Exec=/home/sara/MCserver/minecraft.sh Icon=/usr/share/icons/Minecraft_Block.svg Terminal=false Type=Application StartupNotify=trueAll files are stored in the MCserver folder. When I open the folder on Launcher, it starts at Home -- then MCserver is one of the folders within Home (I don't see "Sara" as a subdirectory of Home here -- sometimes I see it when accessing other files somewhere).
@edwin: here's the copy of la /home/sara
sara@sara-Dimension-4300:~/MCserver$ la /home/sara
.bash_history examples.desktop .ICEauthority .profile
.bash_logout .fontconfig .java Public
.bashrc .gconf .local .pulse
.cache .gnome2 MCserver .pulse-cookie
.config .goutputstream-KIZ8WW minecraft.desktop~ Templates
.dbus .goutputstream-QXYAXW minecraft.png .thumbnails
Desktop .goutputstream-UZYSWW .mission-control Videos
.dmrc .gstreamer-0.10 .mozilla .Xauthority
Documents .gtk-bookmarks Music .xsession-errors
Downloads .gvfs Pictures .xsession-errors.old 2 1 Answer
The script should read:
#!/bin/bash
cd $HOME/MCserver
java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrameAfter writing it, you should make it executable, so open a terminal and if the script
is in a file called minecraft.sh (check if the casing is right, upper and lower
case matter!):
$ cd $HOME/MCserver
$ chmod +x minecraft.shFinally you must put minecraft.desktop in /usr/share/applications or
in $HOME/.local/share/applications (not both, only one of the two):
Do this if you want all users to have the Minecraft icon:
$ sudo mv minecraft.desktop /usr/share/applicationsOr do this if you want only the current user to have the Minecraft icon:
$ mv minecraft.desktop $HOME/.local/share/applications
The launcher should appear in the Unity Dash (so you can search for it typing "Minecraft"). Then you can just drag it to the panel.
11