On Mon, 31 Aug 2026 at 14:27, Alejandro Lopez via devel
<[email protected]> wrote:
>
>
> On Mon, Aug 31, 2026 at 2:22 PM Chris Adams <[email protected]> wrote:
>>
>> Once upon a time, Alejandro Lopez <[email protected]> said:
>> > The simplest solution is to set EDITOR to vi in your whole environment, not
>> > only for login shells. In my environment, I set EDITOR to vi in my own
>> > ~/.bashrc.d/vi file.
>>
>> That doesn't work for the case of "sudo visudo", for the same reason
>> that the vim-default-editor RPM doesn't work: no shell is started.
>
>
> Yep. I had forgotten but I removed nano, so it is probably using the default 
> (nano:vim:vi).
>
>
>>
>>
>> > If, for any reason, you cannot set it (for instance, if you want to use vi
>> > only for sudo but what to use nano for the rest of the things), you can set
>> > the SUDO_EDITOR variable (this is supposed to work but I never tried it).
>>
>> That also doesn't work because SUDO_EDITOR is not inherited from the
>> environment through sudo.
>
>
> Is it possible for you to use `env_keep` in the sudoers file ? However, based 
> on your first message I think you want to avoid this.

That still requires some mostly-undocumented custom change to sudoers,
which I need to repeat on every new install, and which would get lost
on updates if you put it directly in the sudoers file (it's better to
add a new file in /etc/sudoers.d/ for such local changes).

Surely we can do better than requiring everybody to do that?

-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to