I'm having trouble getting Minecraft to launch when I add it to the launcher. If the game is running, I can right click on the icon in the launcher and select "keep in launcher" and the icon stays, but the game won't launch from it.

If I create a launcher on the desktop, then drag that launcher to the unity launcher, the game will start. If I remove the launcher from the desktop, it stays in the Unity launcher, but will not start anymore.

Is there some way to add it to the Unity launcher so that it will actually launch?

(Blech, I've said launch far too many times.)

link|improve this question

60% accept rate
I ended up just creating a folder in home called .launchers and dragging launchers I created on my desktop to that folder. From there I dragged the launcher on to the Unity launcher. Now the launcher works, and the original launcher is hidden. The only downside is that after launching the application, I have the launcher icon, and the running application icon in my launcher. Still waiting on a better solution. – Spacecraft Apr 10 '11 at 21:46
feedback

3 Answers

You need a .desktop file for the MineCraft launcher.

gksudo gedit /usr/share/applications/minecraft.desktop

Put the following text into this file:

[Desktop Entry]    
Name=MineCraft    
Comment=    
Exec=COMMAND_FOR_MINECRAFT_LAUNCHER    
Icon=ICONNAME   
Terminal=false    
Type=Application    
StartupNotify=true

Now open a File manager (nautilus). Press Strg + H to show hidden files.

Go to: .gconf-> desktop-> unity-> favourites-> launchers

You'll see many folders starting with "app-". Create a folder for your program. Name it "app-MineCraft".

Now enter one of these app- folders, copy the xml file, paste it into your "app-MineCraft" folder and open the xml file with a text editor. Rename the *.desktop in this file with MineCraft.desktop.

Log out and in again (or restart your computer).

If you did it right, you should now see your icon on the dock.

I hope this helped you, Daniel

Source

link|improve this answer
I don't seem to have a unity folder in .gconf/desktop. I just have a gnome folder. – Spacecraft Apr 10 '11 at 21:13
1  
Is this for Unity for Maverick? Seems a lot of the people on the Ubuntu forums you linked are running 10.10. – Spacecraft Apr 10 '11 at 21:38
@Spacecraft: Oh, sorry I think that's an old version of unity :s But you could just create a shell script, save it to your home folder, then drag it to your unity dock and don't delete the shell file. That should work too :) – omnidan Apr 11 '11 at 5:07
feedback

There is an awesome Mincecraft installation script for ubuntu that will solve all your problems. Here is the link --> http://www.ubuntuvibes.com/2011/04/minecraft-installation-script-updated.html

This will create a Minecraft shortcut icon in actual menu under games. So you need to just launch Minecraft, right click the icon and select 'Keep in Launcher'

I have done the same thing and its working nicely. Here a screenshot:

link|improve this answer
feedback

What you'll need to make a minecraft launcher:

  1. full path to your minecraft.jar
  2. minecraft icon picture in *.svg format Note: I used the one at this site: http://gimilkhor.deviantart.com/art/Minecraft-icon-193038524 . But, in order to convert the *.png icon to *.svg , I had to install Inkscape, open the *.png, then save it as *.svg (gimp won't do this). You can install inkscape with:

sudo apt-get install inkscape

Here's how to make the launcher. We'll assume minecraft is in /home/joe-user/Downloads/minecraft/minecraft.jar , and we'll assume the *.png icon file from the above website has opened with inkscape, then saved in *.svg format to ~/Pictures/minecraft.svg

Create a launcher as follows. We'll use vi because we are badass.

sudo vi /usr/share/applications/minecraft.desktop

Put the text below into the launcher, then save it (modify the Exec path to match your minecraft.jar location):

[Desktop Entry]
Name=MineCraft
Comment=ThisGameRocks
Exec=java -jar /home/joe-user/Downloads/minecraft/minecraft.jar
Icon=minecraft
Terminal=false
Type=Application
StartupNotify=true

Now, you have to copy the minecraft.svg file to /usr/share/icons/hicolor/scalable/apps/minecraft.svg (as root, change the source path to fit your situation) so the launcher can find it and use it.

sudo cp ~/Pictures/minecraft.svg /usr/share/icons/hicolor/scalable/apps/minecraft.svg

Notes:

  • The minecraft.jar file should have chmod 755 minecraft.jar permissions
  • The minecraft.svg file should have chmod 644 minecraft.svg permissions
  • Also, the above assumes you have jre installed sudo apt-get install openjdk-7-jre

Now, you'll be able to find minecraft in the unity searchglass. Then, once you launch it, you can right-click the icon and set "Lock to Launcher".

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.