Edit /etc/sudoers with gedit in Ubuntu Hardy Heron

I came across a UF thread that p_quarles pointed at us in the Staff area. Thanks p_quarles :).
The classic:

export EDITOR=gedit && sudo visudo

will open /etc/sudoers with visudo, which does not behave like nano any more. I’m not a vi fan, please accept my apologies, Ive said it. I’m a nano fan :)
But I understand some users feel more comfortable with gedit or other GUI text editors.

The way to go now is:

export EDITOR=gedit && sudo -E visudo

where the -E option preserves the user environment variables.


Launchpad Bug Report


2 thoughts on “Edit /etc/sudoers with gedit in Ubuntu Hardy Heron

  1. bapoumba Post author

    Nothing I guess (I just read over man visudo). The mentioned command is just based on the previous one you can find all over the place :)

Comments are closed.