-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds open elevated folder to right-click menu
Adds ability to open file manager as an elevated user, by adding a PolKit script for xdg-open and integrating it into PCManFM's right-click context menu after a user called for this [1]. [1] #281
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
pkexec "/usr/bin/xdg-open" "$@" |
10 changes: 10 additions & 0 deletions
10
src/livecd/chroot/usr/local/share/file-manager/actions/open-root-file-manager.desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Desktop Entry] | ||
Type=Action | ||
Name=Open root file manager | ||
Profiles=profile-zero; | ||
Icon=system-file-manager | ||
|
||
[X-Action-Profile profile-zero] | ||
MimeTypes=inode/directory; | ||
Exec=/usr/local/bin/xdg-open-pkexec %f | ||
Name=Default profile |
23 changes: 23 additions & 0 deletions
23
src/livecd/chroot/usr/share/polkit-1/actions/com.rescuezilla.xdg-open.policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" | ||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> | ||
<policyconfig> | ||
|
||
<vendor>Rescuezilla</vendor> | ||
<vendor_url>https://rescuezilla.com/</vendor_url> | ||
<icon_name>xdg-open</icon_name> | ||
<action id="com.rescuezilla.xdg-open"> | ||
|
||
<description gettext-domain="rescuezilla">Run xdg-open as root</description> | ||
<message gettext-domain="rescuezilla">Authentication is required to run xdg-open as root</message> | ||
<defaults> | ||
<allow_any>auth_admin</allow_any> | ||
<allow_inactive>auth_admin</allow_inactive> | ||
<allow_active>auth_admin</allow_active> | ||
</defaults> | ||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/xdg-open</annotate> | ||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> | ||
|
||
</action> | ||
|
||
</policyconfig> |