How to create a desktop launcher for Linux
The first thing you must know is place where .desktop files are stored, see the following paths and priority increases from top to bottom:
and there's also some directories that default icons are stored you should know:
Create a .desktop file and add contents below:
optional contents:
Enter the command below:
Tips:
How to convert an icon to a supported format:
If you want to know the size of the icon:
Aug 4 2022
FAQ
Why are there two icons when I startup the launcher?
It's probably about the StartupVMClass parameter that can't match the correct value. Enter the command as the following shows:
When you execute the command above, your cursor will became + , then click at any location on the target window in this mode, thereby you will see WM_CLASS output as the following listing shows:
Choose any one and fill in Desktop Entry as the following listing shows:
