diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2026-03-14 09:31:51 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2026-03-14 09:31:51 +0200 |
| commit | 79eb4385bd34e8ee06b35637f092ee45dc3e3706 (patch) | |
| tree | 4c3de5583733e9c9cfdc7b5f31a56f8d2ba205ba /README.md | |
| parent | f3416de0e2fd920dda7379c3b7dc2b3087cc30c6 (diff) | |
dfm: Add privilege escalation.
Pressing 'Z' (default) will spawn a nested dfm by escalating privileges
using the value of DFM_SU (default 'sudo'). Pressing 'Z' again inside
of this escalated mode returns to the original dfm.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -50,6 +50,7 @@ Initial Announcement: https://dylan.gr/1772192922 * [Searching](#searching) * [Marking](#marking) * [Commands](#commands) + * [Privilege Escalation](#privilege-escalation) * [Bound Commands](#bound-commands) * [Design Considerations](#design-considerations) * [Conclusion](#conclusion) @@ -190,6 +191,8 @@ environment, default values are derived from the `config.h.in` file. - DFM_TRASH_DIR (Path to trash directory) - DFM_IMG_MODE (Image mode to use: 'chafa' (default), 'kitty') + +- DFM_SU (Privilege escalation tool to use: 'sudo' (default)) ``` ### CD On Exit @@ -386,6 +389,19 @@ and sends it all to the shell. ``` +### Privilege Escalation + +Commands can be run as root by prepending `sudo` or a similar tool on the +command-line. For more complex situations, pressing `Z` by default will use +`DFM_SU` (default `sudo`) to spawn another `dfm` as `root`. The statusline will +be a different color, show the nest level and display an `R` indicator to make +the escalation obvious. Pressing `Z` again inside of this escalated mode quits +and returns to the original `dfm`. + +This can be configured at runtime using the environment variable `DFM_SU` and +at compile time via the `config.h.in` file. + + ### Bound Commands Commands can be bound to keys. When a command is bound it can either run |