Bug #17193

Can't run .desktop files from the desktop anymore

Added by PavlaVesela 2019-10-26 12:24:33 . Updated 2019-11-30 14:35:16 .

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

0%

Feature Branch:
Type of work:
Test
Blueprint:

Starter:
Affected tool:
Deliverable for:

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.


Files


Subtasks


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 2016-08-25
Related to Tails - Bug #17180: cant wipe files on desktop New
Related to Tails - Bug #17243: Desktop icon's label fail to resize for long names Confirmed
Has duplicate Tails - Bug #17207: not work desktop icons Duplicate

History

#1 Updated by intrigeri 2019-10-27 08:26:53

  • 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 2019-10-27 15:12:38

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

#3 Updated by PavlaVesela 2019-10-27 15:18:22

@intrigeri

#4 Updated by sajolida 2019-10-29 22:48:30

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 2019-10-30 12:25:33

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

#6 Updated by sajolida 2019-10-30 12:26:03

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

#7 Updated by sajolida 2019-10-30 12:26:48

  • Status changed from Resolved to New

#8 Updated by PavlaVesela 2019-10-31 23:38:55

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 2019-11-03 12:13:38

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 2019-11-03 12:17:41

correction:

you need to Right click and click Allow Launching

#11 Updated by PavlaVesela 2019-11-04 01:30:38

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)

<code class="text">gio set ./Krita.desktop metadata::trusted true</code>


2, (just an example)

<code class="text">chmod -v 500 ./Krita.desktop</code>

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 2019-11-06 14:51:40

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

#13 Updated by sajolida 2019-11-06 15:01:51

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

#14 Updated by intrigeri 2019-11-10 16:04:59

#15 Updated by intrigeri 2019-11-10 16:05:23

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

#16 Updated by intrigeri 2019-11-10 16:05:37

  • has duplicate Bug #17207: not work desktop icons added

#17 Updated by sajolida 2019-11-30 14:35:16

  • 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 Bug #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 2019-11-30 14:35:45

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

#19 Updated by sajolida 2019-11-30 14:53:10

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