[Discussion] Behavior of `SUDO_ASKPASS`
Is your feature request related to a problem? Please describe.
I created a libvirt container based on doc. 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 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.