After upgrading to Ubuntu 18.04 my desktop icons no longer display their respective artwork. Only after opening them individually and going through the process of "Untrusted Application Launcher" will correct them.

enter image description here

Is there a way to trigger a mass "trust" to bring the art back or some other method?

1 Answer 1


desktop files can be trusted via the command line:

gio set Your_desktop_file.desktop "metadata::trusted" yes


  • Make sure your Desktop file is executable with the following command: chmod +x Your_desktop_file.desktop
  • You have to run this command with the same user as the owner of the desktop files
  • It only works if you run the command in the gnome shell (not via SSH)
  • To do this automatically at logon, you have to make a logon script which will execute a script, as this only run when Gnome is started. For example you can create a .desktop file in ~/.config/autostart/ which execute some shell script including the gio commands
  • Make sure nautilus-desktop is really started. You can create a while loop with a sleep 1 till nautilus-desktop runs
  • Icon's will not refresh automatically. You can achieve this with pressing F5 on the desktop or restart nautilus in your autostart script. killall nautilus && nautilus-desktop & (the last & sign is to make sure the rest of your code will run. Otherwise it will stop the script there till you close nautilus-desktop process again)
  • On Unity, in a user terminal the command seems to modify the metadata internally (gio info file.desktop will show metadata::trusted: yes), but the icon of file.desktop on the desktop is not refreshed. Besides, when launching it, it still shows the warning message. When accessing Desktop via Nautilus, icons will be refreshed but you may need to close and reopen it once or twice to clear the cache. Any idea to force refresh? I guess applying the script on logon is the most efficient since it would be done before Desktop is displayed for the first time.
    – hsandt
    Oct 6, 2018 at 11:37
  • What warning do you exactly get? You have to make sure nautilus-desktop is started before you run the gio commands. When you press F5 it refresh the icons, no clue how you can simulate this yet. Is that what you mean by refresh?
    – Sander
    Oct 7, 2018 at 13:32
  • The same warning as in OP, "Untrusted Application Launcher", as if I had done nothing to change the metadata. I guess nautilus-desktop was running since I could get some icons to work, but I'll check next time. I'll try F5 as well, it may refresh the icons on the Nautilus Desktop tab but probably not on the desktop itself. That said, if I only need to change the metadata once, that's not a big deal. (will move to discussion if those comments get too lengthy)
    – hsandt
    Oct 7, 2018 at 19:36
  • When you wait till task nautilus-desktop is really running, run the gio commands and press F5 on the desktop it should refresh your icons. What I do to achieve the refresh is killing nautilus-desktop and start it again. I have edited my post above under "NOTE:"
    – Sander
    Oct 8, 2018 at 9:02
  • I tried in 20.04 and the gio command seems to change the value as expected, as hsandt mentioned, but nothing else happens. The app. still can't be started without the warning as mentioned by OP and the icon (no matter how many times I press F5) remains the same. Also unless I have a nautilus window opened, the killall nautilus command doesn't work. (i.e. it's not running if you only have the desktop & a terminal). Aug 30, 2020 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.