In Ubuntu 18.04, when the user clicks on a custom desktop file, the program displays the message that the application launches is not trusted and launching it may be unsafe. The desktop also does not display the correct icon for the desktop file.
How is it possible to mark the application launches desktop file as trusted so that the message does not get displayed, and the ICON is also displayed on the desktop.
I tried using
chmod +x *.desktop
as suggested in some queries but this does not seem to work in 18.04.