Software & AppsOperating SystemLinux

How To Add Minecraft to Unity Launcher

Ubuntu 20

In this guide, we will walk you through the process of adding Minecraft to your Unity Launcher. This is a useful feature for those who want to access their favorite game directly from the Unity Launcher in Ubuntu. We will cover several methods to achieve this, so you can choose the one that suits your preferences and technical skills best.

Quick Answer

To add Minecraft to the Unity Launcher in Ubuntu, you have several options. You can manually create a launcher by fetching a Minecraft image icon and creating a desktop file. Alternatively, you can use the "Main Menu" package from the Software Center to create a new item for Minecraft. Another method is to create a .desktop file manually and add it to your Unity launcher. Finally, you can use a Minecraft installation script for Ubuntu to add Minecraft to the Unity launcher.

Method 1: Setting up a Minecraft Launcher Manually

This method involves creating a launcher manually by fetching a Minecraft image icon and creating a desktop file.

Step 1: Fetch Minecraft Image Icon

First, open a terminal and run the following command:

cd /usr/share/icons; sudo wget http://images.wikia.com/yogbox/images/d/dd/Minecraft_Block.svg

This command navigates to the /usr/share/icons directory and downloads the Minecraft image icon using the wget command. The sudo command is used to run the command with root privileges.

Step 2: Create a Minecraft Desktop File

Next, create a minecraft.desktop file by running the following command in the terminal:

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

This command opens the minecraft.desktop file in a text editor with root privileges.

Paste the following contents into the minecraft.desktop file:

[Desktop Entry] 
Name=Minecraft
Comment=
Exec=/opt/minecraft.sh
Icon=Minecraft_Block
Terminal=false
Type=Application
StartupNotify=true

Here’s what each line means:

  • Name=Minecraft: This is the name that will be displayed on the launcher.
  • Exec=/opt/minecraft.sh: This is the command that will be executed when the launcher icon is clicked. In this case, it runs the minecraft.sh script located in the /opt directory.
  • Icon=Minecraft_Block: This specifies the icon that will be displayed on the launcher. It should match the name of the icon file downloaded earlier.
  • Terminal=false: This means that the application will not be run in a terminal.
  • Type=Application: This specifies that the launcher icon is for an application, not a link or a directory.
  • StartupNotify=true: This enables startup notification.

Save the file and open your file manager to go to /usr/share/applications. Locate the Minecraft entry and drag it to your launcher bar.

Method 2: Using the “Main Menu” Package from the Software Center

This method involves installing the “Main Menu” package from the software center and creating a new item for Minecraft.

Step 1: Install the “Main Menu” Package

First, install the “Main Menu” package from the software center. This package provides a simple GUI for editing the applications menu.

Step 2: Create a New Menu Item for Minecraft

Next, download a PNG of the Minecraft icon and save it to your computer. Open “Main Menu” from the Dash and click on Games > New Item. Choose the downloaded PNG as the icon and enter the following command:

java -Xmx1024M -Xms512M -Xincgc -jar ~/minecraft.jar

This command launches Minecraft with specific Java parameters:

  • -Xmx1024M: This sets the maximum Java heap size to 1024MB.
  • -Xms512M: This sets the initial Java heap size to 512MB.
  • -Xincgc: This enables the incremental garbage collector, which can improve performance.
  • -jar ~/minecraft.jar: This specifies the Minecraft JAR file to be run.

Save the item and it should appear in your menu. You can then pin it to the launcher.

Method 3: Creating a .desktop File Manually

This method involves creating a .desktop file manually and adding it to your Unity launcher.

Step 1: Create a .desktop File

Open a terminal and run the following command:

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

This command opens the minecraft.desktop file in a text editor with root privileges.

Put the following text into the file:

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

Replace COMMAND_FOR_MINECRAFT_LAUNCHER with the command to launch Minecraft and ICONNAME with the name of the Minecraft icon.

Save the file and log out and back in or restart your computer. The Minecraft icon should now appear in the Unity launcher.

Method 4: Using the Minecraft Installation Script for Ubuntu

This method involves using a Minecraft installation script for Ubuntu.

Follow the instructions in the provided link to install the Minecraft installation script. The script will create a Minecraft shortcut icon in the actual menu under Games. Launch Minecraft, right-click the icon, and select “Keep in Launcher” to add it to the Unity launcher.

We hope this guide has been helpful in showing you how to add Minecraft to your Unity launcher. If you have any questions or run into any issues, feel free to ask for help in the comments section below. Happy gaming!

Can I add Minecraft to the Unity Launcher in Ubuntu?

Yes, you can add Minecraft to the Unity Launcher in Ubuntu by following the methods outlined in this guide.

What is Unity Launcher?

Unity Launcher is a feature of the Ubuntu operating system that provides a quick and easy way to access frequently used applications and files. It is located on the left side of the screen and can be customized to add and remove icons for different applications.

Leave a Comment

Your email address will not be published. Required fields are marked *