How do I Mark a Desktop file as Trusted in Ubuntu 18.04

Ubuntu 18.04 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.

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.

This Post Has One Comment

  1. No Fault

    And just to add to b_laoshi ‘s answer – after updating from 16.04 to 18.04 I had a desktop full of steam links I didn’t want to have to open each game and then quit to trust them

    for i in ~/Desktop/*.desktop; do gio set “$i” “metadata::trusted” yes ;done
    You should never trust code from stackoverflow without being sure what it does:

    set “$i” in turn to the full path of each file on your desktop named desktop

    gio set “metadata::trusted” yes
    for each

    done marks the end of the loop

Leave a Reply