I created a desktop shortcut to launch Android Studio - studio.desktop. But I just can't get it to run. Ubuntu 22.04 keeps popping up a dialog Untrusted Desktop File
This .desktop file is not trusted, it can not be launched. To enable launching, right-click, then:
**Enable "Allow Launching"**
But this dialog has only "Close" button. And on the Destop, wherever I right-click, I don't see any "Allow Launching". Okay, I thought - try to do this by terminal.
I have already tried a whole mountain of commands, but they do not help.
chmod a+x studio.desktop // Just in case, although I previously did it through the Permissions of the shortcut itself
dbus-launch gio set studio.desktop "metadata::trusted" yes
That didn't show any message and launching is still not allowed. Then i try this:
sudo gio set studio.desktop metadata::trusted true
This return message "gio: Setting attribute metadata::trusted not supported"
I also tried:
sudo desktop-file-install studio.desktop
As you probably guessed, also to no avail.
This is my studio.desktop:
[Desktop Entry]
Comment=Run Android Studio link
Exec=bash -c /home/user/android-studio/bin/studio.sh
GenericName=Android Studio
Icon=/home/user/android-studio/bin/studio.png
Name=Android Studio
Type=Application
Terminal=false
chmod +x /path/to/studio.desktop
– Archisman Panigrahi May 13 '22 at 17:39sudo journalctl --follow
as you try. Paste your script intohttps://shellcheck.net
, a syntax checker, or installshellcheck
locally. Make usingshellcheck
part of your development process. Does/home/user/android-studio/bin/studio.sh
use environments that are set up for your desktop, but not set up fordesktop
files? – waltinator May 13 '22 at 17:48/home/user/android-studio/bin/studio.sh
on? Is it mounted withnoexec
? Explore your Mount/Read/Write/Execute problems withhttps://github.com/waltinator/pathlld
, abash
script to show the permissions, mount options along the path to an object or objects. – waltinator May 13 '22 at 17:55Line 1: Laptop dbus-daemon[1881]: [session uid=1000 pid=1881] Successfully activated service 'org.gnome.ArchiveManager1' ^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
And for next lines: Line 2: Laptop gnome-shell[1991]: DING: Detected async api for thumbnails Line 3: Laptop gnome-shell[1991]: DING: desktop-icons: Desktop is writable by others - will not allow launching any desktop files
Show same error: SC2102 (info): Ranges can only match single chars (mentioned due to duplicates).
– Никитос May 15 '22 at 14:04