RHEL8 Custom RPM Install - GNOME Desktop icon appears then becomes unlaunchable

Posted on

I am working on a custom application that I intend to deploy to a few RHEL8 computers that already have desktop icons on it (Mainly just the Trash Icon and a File Explorer). In the POST section of my spec file, I do the following (it is almost certainly overkill but I have tried a bunch of different combinations):

  1. Copy the app.desktop file to each user's Desktop folder
  2. dbus-launch gio set app.desktop "metadata::trusted" true (for each user's desktop file
  3. gsettings set org.gnome.desktop.background show-desktop-icons true
  4. Also copy the app.desktop file to /etc/skel/Desktop and to /usr/share/applications

Once the RPM install completes, the icon is visible and usable. After a couple of minutes (or if the screen locks) then the desktop icon changes to a piece of paper - and I have to right-click and select "Allow Launching" again. While this is certainly a very minor inconvenience, I would like to learn about what is happening and how I may prevent it.

Responses