Tag Archives: gedit

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