Score:1

Ubuntu live: ubiquity.desktop (alias "Install ") is not launched

it flag

I have created a custom distro using Cubic which comes from Ubuntu 20.04.2 LTS Desktop 64-bit.

I have noticed that if I open the file manager as root and then double click on the file then it works.

I have also noticed that in the ubiquity.desktop file, if I change the default line:

Exec=sudo --preserve-env=DBUS_SESSION_BUS_ADDRESS,XDG_RUNTIME_DIR sh -c 'ubiquity gtk_ui'

In:

Exec=sudo --preserve-env=DBUS_SESSION_BUS_ADDRESS,XDG_RUNTIME_DIR ubiquity gtk_ui

The problem is solved.

There seems to be a problem with the sh -c '' command when is executed in a file manager with normal privileges through a .desktop file, even if the sudo command is used inside it.
Instead it runs correctly from the terminal both as a normal user and as root.

Why?

us flag
You may have changed your system shell. Make sure `which sh` points to `/usr/bin/sh`. Do you have this problem when creating a `*.desktop` file in an original Ubuntu live environment?
it flag
yes, is /usr/bin/sh
us flag
I tested, and I do not see an issue with `sh -c ''`. Nevertheless, per AskUbubtu guidelines, you should post your solution as an Answer, below. Aldo, edit your question and remove the solution from the Question section. After a ~couple~ of days, you can select your own answer as Accepted. This will help other users who are experiencing a similar problem quickly find an answer to their issue. Welcome to AskUbuntu, by the way!
us flag
I misinterpreted your statement "The problem is solved". Basically you have a work-around by removing `sh -c ''`. I performed a test in an unmodified Ubuntu Live ISO, and `sh -c ''` does work. Try the same test yourself... It is possible that something you've customized has affected this. Think carefully about the changes you have made. Also, you might want to make a only few changes, generate an ISO, and test. Then repeat this process, making more changes each time, until you find what modification is causing `sh -c ''` to not work in a `*.desktop` file.
it flag
Yes, I too have tried on the original iso and it always works.
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.