Execute .desktop file
ClosedPublic

Authored by gengisdave on May 4 2020, 9:08 PM.

Details

Reviewers
asensi
Group Reviewers
Krusader
Summary

This patch allows the user to run .desktop instead of opening it in the external editor.

As a .desktop file could lead to security issues (evil Exec=), KIO will warn the user when he tries to launch it from an unknown location (see XDG_DATA_DIRS), setting the file with executable bit if the user confirms.

An option could be to add a Konfigurator flag to warn the user (possibly doubling the dialogs).

FIXED: [ 394938 ] Can't run .desktop files
BUG: 394938

Test Plan

Compile and test, even in root mode

Diff Detail

Repository
R167 Krusader
Lint
Lint Skipped
Unit
Unit Tests Skipped
gengisdave requested review of this revision.May 4 2020, 9:08 PM
gengisdave created this revision.
gengisdave edited the summary of this revision. (Show Details)May 4 2020, 9:11 PM
asensi added a subscriber: asensi.May 9 2020, 12:27 PM

Thanks, Davide! The resulting code worked under Kubuntu 18.04 and Kubuntu 20.04, other people can do their checks. I attach some .desktop files:

asensi accepted this revision as: asensi.May 9 2020, 12:31 PM
This revision is now accepted and ready to land.May 9 2020, 12:31 PM