Score:0

Configure a desktop shortcut during live media ubuntu 20.04 customization

ma flag

Context
Currently i'm creating a customized ubuntu 20.04 LTS to be booted from live media (USB).
i'm trying to create a desktop shortcuts i.e. for the shutdown command.
i prepared a .desktop file shutdown.desktop which include the following:

#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Name=Shutdown
Comment=shutdown
Icon=/opt/icons/shutdown.svg
Exec=sudo shutdown -h now
Terminal=false
Categories=Development;
Name[fr_CA]=something_related_to_project

and updated the access right also

chmod 777 -R home/<user>/Desktop/shutdown.desktop

also ran

gio set shutdown.desktop metadata::trusted true

when i test the generated live media, the file is available on the desktop but it's not executable.

Attempts
When i display the context menu "allow launching" is not available.
from forums, i copied the file to /usr/share/applications then from there i copied it back to desktop by replacing the existing file. At this point the "allow launching" is displayed but the file is still not executable. When i click on "allow launching" and i double click the file, the command is executed.

Question How can i configure, during the creation of the live media, my file that execute the shutdown command?

P.S: the procedure used to work with ubuntu 18.04 LTS

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.