Project

General

Profile

Bug #17193

Can't run .desktop files from the desktop anymore

Added by PavlaVesela about 2 months ago. Updated 11 days ago.

Status:
Resolved
Priority:
Elevated
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Test
Blueprint:
Starter:
Affected tool:

Description

USE: Tails 4.0

Hello,
Unable to run program shortcut or shortcut script, it always opens to me in a text editor, even if it is set to run as a program.
https://i.imgur.com/hMmr6uA.png
https://i.imgur.com/o5mRFyu.png

in older versions of tails, I didn't have this problem.

script.png View (56.7 KB) sajolida, 10/29/2019 10:48 PM

shortcuts_work.mp4 - appears to work as intended (1.7 MB) op_mb, 11/03/2019 11:52 AM


Related issues

Related to Tails - Bug #17195: 'Allow launching' setting is not saved New
Related to Tails - Bug #17186: "Open in terminal" has disappeared from the file explorer Resolved
Related to Tails - Feature #11717: Drop launchers from the Desktop Rejected 08/25/2016
Related to Tails - Bug #17180: cant wipe files on desktop New
Related to Tails - Bug #17243: Desktop icon's lable fail to resize for long names Confirmed
Duplicated by Tails - Bug #17207: not work desktop icons Duplicate

History

#1 Updated by intrigeri about 2 months ago

  • Status changed from New to Resolved

Unable to run program shortcut or shortcut script, it always opens to me in a text editor, even if it is set to run as a program.

With recent GNOME, you need to mark these scripts or .desktop files as trusted, with a command like:

gio set /path/to/example.desktop metadata::trusted true

#2 Updated by PavlaVesela about 1 month ago

command tested, this method is not functional. I request a review.

#3 Updated by PavlaVesela about 1 month ago

@intrigeri

#4 Updated by sajolida about 1 month ago

To execute a script you can drag and drop it from the Files browser into Terminal. See screenshot in attachment.

@PavlaVesela: Does this solve your concern?

#5 Updated by sajolida about 1 month ago

  • Related to Bug #17195: 'Allow launching' setting is not saved added

#6 Updated by sajolida about 1 month ago

  • Related to Bug #17186: "Open in terminal" has disappeared from the file explorer added

#7 Updated by sajolida about 1 month ago

  • Status changed from Resolved to New

#8 Updated by PavlaVesela about 1 month ago

It's really a bugs that needs to be fixed.
no shortcut works on the desktop or in folders and running a script by dragging and dropping into the terminal is a totally insane solution.

#9 Updated by op_mb about 1 month ago

hey,

i just looked at it,

you need to put your shortcut in the Desktop directory, and then from the actual Desktop(not Desktop folder),
you need to run click and click Allow Launching

i attached the video, have a look.

// nestled Desktop directories
// from were im looking at, i might be wrong:
if Desktop subdirectories were allowed to have the same behaviour as Desktop, there you would have automatic execution premission granted (without user interaction, through any script/program) to *.sh files, as long as the files had chmod 700, which any-thing can just copy without sudo permission such as:

// if you dont want to right click on desktop and allow execution, just run this command
// from Desktop directory
chmod --reference=./Report_an_error.desktop ./krita.desktop 

if the Desktop subdirectories had that behaviour, you would allow script execution throughout the whole Desktop directory structure, which would act as a link in remote execution chain for overflows or else

also, there is nowhere in Tails you can execute a script with a click, unless its on the desktop

#10 Updated by op_mb about 1 month ago

correction:

you need to Right click and click Allow Launching

#11 Updated by PavlaVesela about 1 month ago

@op_mb @sajolida
Manual settings (Allow Launching) works correctly.
https://i.imgur.com/uXkPowS.png
https://i.imgur.com/ktBcXT7.png
https://i.imgur.com/V4tNKQN.png

solution:
The (Allow Launching) option has two built-in commands:

1, (just an example)

gio set ./Krita.desktop metadata::trusted true

2, (just an example)
chmod -v 500 ./Krita.desktop

Change settings "metadata::trusted true" (only theory) requires some restart, for example command "chmod -v 700 ./Krita.desktop" to make shortcut enabled > (so that the change is reflected in the gnome).

so the best solution would be to write a simple script that runs after Tails persistence and sets these two commands for all shortcut icon (.desktop) in the desktop.

@intrigeri
you were right command works but you need to restart gnome service (i don't know how it works) example > change chmod.

Would it be possible to add such a script to the update, or create it for people like me?

#12 Updated by sajolida about 1 month ago

  • Related to Bug #17207: not work desktop icons added

#13 Updated by sajolida about 1 month ago

@PavlaVesela: Do you confirm that #17186 will solve your concern? It will add back the "Open in Terminal" in the Files browser.

#14 Updated by intrigeri about 1 month ago

#15 Updated by intrigeri about 1 month ago

  • Related to deleted (Bug #17207: not work desktop icons)

#16 Updated by intrigeri about 1 month ago

  • Duplicated by Bug #17207: not work desktop icons added

#17 Updated by sajolida 11 days ago

  • Subject changed from It is not work to run the script or shortcut to Can't run .desktop files from the desktop anymore
  • Status changed from New to Resolved

I did more tests to compare Tails 3.16 and Tails 4.0.

  • Things didn't change for scripts. There was no easy way to start scripts from the Files browser or the desktop in 3.16 and it's the same in 4.0.
  • Things did change for .desktop files as described here.

Adjust the title of this ticket accordingly.

The explanation of @op_mb in #17193#note-9 solves this issue: Right-click on the Desktop, choose "Allow launching".

By the way, I found at least 1 tutorial online that relies on this:

https://blog.thestever.net/2019/02/26/upgrading-electrum-on-tails-to-3-3-4/

This might explain why people relied on this until now.

#18 Updated by sajolida 11 days ago

  • Related to Bug #17180: cant wipe files on desktop added

#19 Updated by sajolida 11 days ago

  • Related to Bug #17243: Desktop icon's lable fail to resize for long names added

Also available in: Atom PDF