[Discussion] Behavior of `SUDO_ASKPASS`
- Linguagem predominante
- Go
- Estrelas
- 13k
- Forks
- 541
- Merge médio
- 20h 47min
- PRs com merge (30d)
- 4
Descrição
Is your feature request related to a problem? Please describe.
I created a libvirt container based on [doc](https://distrobox.it/posts/run_libvirt_in_distrobox/). I noticed the desktop entry had `SUDO_ASKPASS` pointing to a generated script.
`Exec=env SUDO_ASKPASS="/var/home/user/.local/bin/distrobox_sudo_askpass" DBX_SUDO_PROGRAM="sudo --askpass" /var/home/user/.local/bin/distrobox-enter --root -n libvirt
-- /usr/bin/virt-manager`
I noticed one of the [useful tips](https://distrobox.it/useful_tips/#using-a-command-other-than-sudo-to-run-a-rootful-container) mentioned that we can override the behavior by setting SUDO_ASKPASS environment variable. But it was not clear if the behavior is for `distrobox-enter` or `distrobox-create` command.
It turns out the `distrobox-assemble` and consequently `distrobox-export` command does not respect the `SUDO_ASKPASS` environment variable. So even if we set the `SUDO_ASKPASS` environment variable before running `distrobox-create` command the desktop entry still points to the generated script.
https://github.com/89luca89/distrobox/blob/3b9f0e8d3d8bd102e1636a22afffafe00777d30b/distrobox-export#L284-L287
Describe the solution you'd like
It would be nice for `distrobox-export` to respect the `SUDO_ASKPASS` environment variable.
Describe alternatives you've considered
The workaround is to manually edit the `SUDO_ASKPASS` in the desktop entry created.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.