I'm trying to remaster the 20.04 iso for single-user root use. However, I am sure this question also applies to 19.10 as it suffers the same issue. This distro is for systems that test hardware and are shared between many people, the systems serve that purpose and that purpose only. These systems were last running 16.04 but we need newer kernels (were running 5.3 on 16.04 and are already basing 20.04 off of 5.6 oem package)

As part of the remastered iso creation scripts, I install some (non-public) deb packages that create .desktop launchers onto the Desktop. However, these icons do not work as intended. Digging into things, it seems you need to set gnome's metadata trust to true, but I can't seem to find a way to do this while building an iso. Running:

 gio set desktopfile.desktop "metadata::trusted" true

in the chroot during the iso build process returns:

gio: Setting attribute metadata::trusted not supported

I found an autostart script I could run to trust all *.desktop files on gnome's start up (courtesy of the second answer here: Trust desktop icons without clicking them manually in Ubuntu 18.04 Gnome 3), but this relies on waiting for and then restarting nautilus-desktop, which has since been deprecated.

I tried using nemo-desktop to handle icons, but it refuses to run as root. It looks like a simple patch to the source to allow it to, but I'd like to avoid having to do that.

  • Refer askubuntu.com/help/on-topic where you'll notice only supported releases of Ubuntu and flavors are on-topic for this site. For focal fossa [20.04] questions you'll need to use a development support site such as IRC (#ubuntu+1) or Ubuntu Forums, or wait until after release for this site (expected release date for Ubuntu 20.04 is 23rd April 2020 when your question will be on-topic here).
    – guiverc
    Apr 18, 2020 at 2:57
  • While I am using focal, this also applies to 19.10 as that's when the change from nautilus-desktop to gnome-shell-extension-desktop-icons were made. Apr 18, 2020 at 9:15
  • Were you able to figure this out? I'm having the same issue. Dec 22, 2020 at 16:40
  • @AndrewLamarra yes, I had to use nemo-desktop to handle the icons. I had to patch its "no run as root user" check out of the source. Then, I followed the rest of what I originally linked. Jul 15, 2022 at 4:30


Your Answer

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