Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

This is not a discussion. This is a manual.

.desktop files might not be supported on your Linux distribution. Please check before trying the following instruction.

As a desktop icon is not included in release, we may make one of our own.


Procedures

1. Put the .jar file at a appropriate place

Once you have downloaded HMCL .jar file, put it in a designed directory in consideration of there are extra files that may be generated during the operation of HMCL.

Here we take down the version of HMCL as HMCL_VER and the path of the .jar file as HMCL_DIR.

If you have executed HMCL before and wish to move it to a new directory, don't forget to move the extra files as well.

2. (Optional) Get an Icon you like for HMCL

Get a picture(.png/.svg/.xpm) you like for HMCL as the icon. You may also put it in the directory of the .jar file.

Here we take down the path of the picture as ICON_DIR.

I chose my MC character's head😋.

3. Create HMCL.desktop on the desktop & enter the content

Open the terminal and change the working directory to desktop. Path of desktop can vary due to the distribution of Linux, like it's ~/桌面 on mine since the system language is set to be Chinese from the start, so it's suggested you may open the terminal directly on desktop if possible.

Now we can create the .desktop file and enter necessary content. Here we demonstrate using Vim.

  • Execute
vim HMCL.desktop
  • Press i.

  • Enter

[Desktop Entry]
Version=$HMCL_VER
Type=Application
Name=HMCL
Comment=HMCL Minecraft Launcher
Terminal=false
Exec=java -jar "$HMCL_DIR"
Icon=$ICON_DIR
Categories=Game;

Don't forget to replace texts following $. Some fields(all except for Type, Name, Exec) are actually unnecessary and you can remove them at will, but they are still useful to a certain extent.

  • Press Esc, enter :wq and press Enter.

4. Add executable permission to the .desktop file.

Execute

chmod +x HMCL.desktop

You may close the terminal then.


Enjoy. Hope you found this manual useful.

You must be logged in to vote

Replies: 1 comment

Comment options

https://github.com/HMCL-dev/HMCL-docs

如果可以,欢迎到官方文档提供帮助,谢谢

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.