This is a small trick, low technical content, but useful, so as a reminder.
Programmers like to use linux development, ubuntu is a common one.
But there is a problem that the ubuntu desktop does not have an application icon by default. Most of us need to add the application script to the PATH environment and then start it with a command.
Is there a faster way, such as opening the application directly by clicking the icon like in windows?
The answer is yes.
Let's take WeChat as an example.
The WeChat on ubuntu is electronic-wechat, which is a package for the web version of WeChat API.
The default startup is a script, I find it too troublesome, so I want to add it directly to the desktop startup bar.
Here are the steps.
To add desktop icons, you need to create a file in the form of xxx.desktop and store the address.
/usr/share/applications
This is suitable for all scripts, we create the WeChat desktop icon, so add wechat.desktop
# File header, fixed format
[ Desktop Entry]
# coding
Encoding = UTF-8
# Application Name
Name = Wechat
# Application hints, text hints when hovering the icon
Comment = Wechat
# The full path of the application execution script, fill in according to the actual situation
Exec =/home/xxx/xxx/electronic-wechat-linux-x64/electronic-wechat
# Icon address,Specify the icon to be displayed by yourself
Icon =/home/xxx/xxx/wechat.png
# Whether the terminal is started
Terminal =false
# classification
Type = Application
After finishing it, restart it and it will be OK.
Recommended Posts