visudo does not use sensible-editor

Bug #280877 reported by Peter Matulis on 2008-10-09
This bug affects 3 people
Affects Status Importance Assigned to Milestone
debianutils (Ubuntu)
sudo (Ubuntu)

Bug Description

Binary package hint: debianutils

Installed Intrepid Beta and issued the following command:

$ sudo visudo

I was brought immediately into a nano session.

Peter Matulis (petermatulis) wrote :

The installation was the Ubuntu Server edition.

Dustin Kirkland  (kirkland) wrote :

Hi Peter-

I don't quite understand this bug.

sensible-editor is most certainly in Intrepid, and is provided by the debianutils package.

visudo is located at /usr/sbin/visudo, and is provided by the sudo package. Looking at the source, visudo doesn't support 'sensible-editor'. It does respect the EDITOR and VISUAL environment variables, if those are set in your environment. The only way I could get 'visudo' to use a nano editor was to first export EDITOR=/usr/bin/nano.

Please check the value of $EDITOR, when you're seeing this problem.

I'm going to mark this as "Invalid" against debianutils. If, instead, what you want is for visudo to support sensible-editor, that seems reasonable. Add a new task for this bug against the sudo package.


Changed in debianutils:
status: New → Invalid
Peter Matulis (petermatulis) wrote :

OK then, visudo does not support sensible-editor. Thanks.

Changed in sudo:
importance: Undecided → Wishlist
status: New → Confirmed
Jani Uusitalo (uusijani) wrote :

The community wiki currently claims that the default editor for visudo has been sensible-editor since 8.10 [1]. But for me in both 12.04 and 14.04, `sudo visudo` still launches /etc/alternatives/editor, so select-editor doesn't actually change visudo's editor; for that I have to run `sudo update-alternatives --config editor`. So I suspect that either the wiki has incorrect advice, or this bug has been fixed, and has since reappeared.

* [1]

dino99 (9d9) wrote :

outdated flavor, report about a newer active version if needed

Changed in sudo (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers