I'm writing a program with qt5 and I want create application icon which can be displayed on desktop(gnome), also within Activities(on top left of desktop) of Ubuntu when I type my application name to search for it. I'm using cmake to build my application with QtCreator
My environment:
Ubuntu 18.04.05 LTS 64bits
QT 5.15.0
CMake 3.10.0
g++ 7.5.0
My method is create a MyApplication.desktop file within ~/.local/share/applications.
My first try
The icon diplayed is default icon(two gears with purple background) when search MyApplication within Activities.
MyApplication.desktop
[Desktop Entry]
Type=Application
Exec=/home/someuser/Documents/MyApplication/release/MyApplication
Path=/home/someuser/Documents/MyApplication/release
Name=MyApplication
GenericName=Start up MyApplication
Icon=MyApplicationIcon
Terminal=false
Categories=Development;MyApplication;
Here is my tree of application directory
~/Documents/MyApplication/release$ tree
.
├── libraries
├── MyApplication
└── MyApplicationIcon.png
So I think if the icon file cannot be found due to the relative path? So I changed my MyApplication.desktop, and
My second try make no changes of the tree and files of application root.
This time, icon is blank or transparent or something else? Anyway, there is only a blank square with MyApplication name in bottom of that square after I typed MyApplication within Activities
Modified MyApplication.desktop
[Desktop Entry]
Type=Application
Exec=/home/someuser/Documents/MyApplication/release/MyApplication
Path=/home/someuser/Documents/MyApplication/release
Name=MyApplication
GenericName=Start up MyApplication
Icon=/home/isee/Documents/VisTrack/release/MyApplicationIcon
Terminal=false
Categories=Development;MyApplication;