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.

Reference

Launchpad Bug Report

About these ads

2 Comments to “Edit /etc/sudoers with gedit in Ubuntu Hardy Heron”

  1. what’s wrong with:

    sudo env EDITOR=gedit visudo

  2. 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 :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 91 other followers

%d bloggers like this: