I know that I'm straying into Lifehacker territory here, but this is a tip I couldn't help but share. I've always wanted to create customer launchers for the Unity dock, and I've finally found how. I'm going to apply this to Minecraft, but you can use to create an icon for just about any program or command that you might need to run in Ubuntu. Read on for instructions...
We'll do most of this from the terminal, just because we can. First, create a hidden directory in your home folder for the launcher and icon files.
Change the directory to the new hidden folder.
Download Minecraft for Linux.
Make it executable.
sudo chmod +x minecraft.jar
Download a png or svg to use as an icon. I really liked this one. I recommend getting your icon in place before you create the .desktop file that references it; I had some problems getting Unity to pick up the icon if I did it the other way around.
Ugh, give that thing a reasonable name! The mv command will "move" it, changing it's name in the process.
mv minecraft_icon_by_dharmainitiative2010-d33ca5p.png minecraft.png
Now that we have our files in place, create a .desktop file. These steps might be the only thing you came to this article for.
sudo nano /usr/share/applications/minecraft.desktop
Paste this in, or modify to fit your purposes. The fields are pretty self explanatory, but notice that in the "Exec" field I'm not just giving in the .jar file, but the actual command to execute.
Exec=java -jar /home/joel/.minecraft/minecraft.jar
Press Ctrl+X to close the file, and Y and Enter to save it.
Give Ubuntu a moment to update the icon and...
That'sssssssssssss a nicccccccccccccce Unity icon you have there.
- Joel / FuelCell250