Re: Replacing nano-default-editor doesn't affect visudo

Neal Gompa <[email protected]>
Newsgroups gmane.linux.redhat.fedora.devel
Message-ID <CAEg-Je_iWOv5dzJahJxrBydsi5xfsGDkE-+vMA1uy78wznX6ww@mail.gmail.com>
On Fri, Aug 28, 2026 at 1:20 PM Jonathan Wakely via devel
<[email protected]> wrote:
>
> On Fri, 28 Aug 2026 at 18:05, Jonathan Wakely <[email protected]> wrote:
> >
> > I recently installed a new Fedora system and was recreating all my
> > preferred settings and realized that:
> >
> > 1) The https://fedoraproject.org/wiki/Changes/UseNanoByDefault change
> > for F33 never did the suggested documentation change, i.e. the Fedora
> > quick docs do not say how to replace nano by installing
> > vim-default-editor. That would be helpful.
> >
> > 2) Installing vim-default-editor doesn't help with 'sudo visudo' as
> > that command will still use nano to edit the sudoers file. That's
> > because the sudo command isn't in a login shell and so will not have
> > EDITOR set in the environment. This means that visudo doesn't care
> > about the environment, it only cares about the sudoers 'editor'
> > setting.
>
> This seems to have changed for F36 via
> https://bugzilla.redhat.com/show_bug.cgi?id=1328973#c14
>
> mattdm made visudo default to nano, on the basis that it's the default
> since F33. But because 'sudo visudo' doesn't respect EDITOR by
> default, this means that nano is the default for visudo even for
> people who have installed vim-default-editor, or set EDITOR manually.
>
> Let's be honest, the users that the F33 UseNanoByDefault change
> benefits (those who don't know how to set EDITOR in their shell
> settings) probably aren't going to be running visudo anyway. And the
> people who do know how to set it find that visudo ignores their EDITOR
> setting. This isn't a great experience.
>

I use visudo, and I like that it uses nano. I don't *love* that it's
called visudo, but whatever.

That said, visudo probably needs a patch to respect the EDITOR variable.


-- 
真実はいつも一つ!/ Always, there's only one truth!
-- 
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.