What I missed: Don't just put your .desktop files to e.g.
~/.local/share/applications, but craft your desktop file an then install it like
desktop-file-install --dir=~/.local/share/applications ~/app.desktop
I am correct in saying that you should run for example
$ sudo update-desktop-database
$ sudo update-desktop-database ~/.local/share/applications/
if want your changes to come into force immediately?
- Thanks. Already added in section "Update database of desktop entries". Close. Fengchao (talk) 02:50, 29 October 2019 (UTC)