Creating a desktop icon #4039
Boy-Grid
started this conversation in
日常闲聊 | General
Replies: 1 comment
-
https://github.com/HMCL-dev/HMCL-docs 如果可以,欢迎到官方文档提供帮助,谢谢 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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 placeOnce 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 asHMCL_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 contentOpen 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.
Press
i
.Enter
Don't forget to replace texts following
$
. Some fields(all except forType
,Name
,Exec
) are actually unnecessary and you can remove them at will, but they are still useful to a certain extent.Esc
, enter:wq
and pressEnter
.4. Add executable permission to the .desktop file.
Execute
You may close the terminal then.
Enjoy. Hope you found this manual useful.
Beta Was this translation helpful? Give feedback.
All reactions