-3

I downloaded Minecraft. I created a 'Portable Apps' directory under Home. I then right-clicked 'Minecraft.jar' and selected 'Make Link'.

I then moved the "shortcut" to the desktop.

When I try to launch Minecraft from that shortcut, I either get errors or Minecraft saves a whole bunch of random data files to the desktop.

Why can't Ubuntu create proper shortcuts like Windows? Why does it treat shortcuts like actual programs? Why isn't a "Link" a link? Why is it the actual program?

LiveWireBT
  • 29,597
jay_t55
  • 403

2 Answers2

6

The proper way to use a portable app like this under Ubuntu requires also creating a "*.desktop" file for its executable (which is "Minecraft.jar" in this case), and putting it in one of these folders: /usr/share/applications, /usr/local/share/applications, or /home/jay/.local/share/applications (which looks like the one you would prefer).

If you want a "shortcut" for this app on your desktop as well, you should simply copy that "*.desktop" file to your desktop. It's OK to create shortcuts for files, folders, and other places, but it's not advisable to do the same for apps in this case.

Here's a sample file, which you might name as "minecraft.desktop", which is simply a plain text file given executable permissions.

[Desktop Entry]
Version=1.0
Type=Application
Name=Minecraft
Comment=Java minecraft game
Exec="/home/jay/Portable Apps/Minecraft.jar"
Icon="/home/jay/Portable Apps/Minecraft.png"
Categories=Games;
StartupNotify=true
Terminal=false

It's assumed above that your user name is jay and you also have an icon file named "Minecraft.png", otherwise you should better have one.

Sadi
  • 11,074
1

Does the original 'Minecraft.jar' work correctly? I'm thinking that maybe there is a problem in how Ubuntu is handling your .jar files. If that's the problem, read this thread.

I have tried two methods to make desktop shortcuts: the right clickmake link and right clickcopy to. I mostly use copy to for the executable files usually found on /usr/share/applications. I know that copy to doesn't really create a shortcut, but it does the job for me.

William
  • 143