Hey, how about an "xedit" command similar to visudo?

Glynn Clements glynn at gclements.plus.com
Sat Nov 4 20:07:27 PST 2006

Brendan wrote:

> Hey, how about an "xedit" command similar to visudo?
> To keep having to tell people on IRC to "nano -w /etc/X11/xorg.conf" or
> "vi..." or "pico..." and not having what ever package installed, etc, is
> just a hassle. I propose an xedit command to use the editor from the
> sysvariable EDITOR to auto-open the current xorg file. "how do i fix this? i
> changed my driver from nv to nvidia in the GUI but now it boots me to a
> console and i don't know how to use it! HELP!"
> .."type 'xedit' in the console as root and.." simple as that. no fuss with
> editor types and whatever.

Just tell them to "edit /etc/X11/xorg.conf". If they don't know how to
run their text editor, chances are they won't know how to use it

Note that vipw/visudo don't just open a file in $EDITOR/$VISUAL; they
lock the file against concurrent access and check that the modified
file meets certain validity criteria before replacing the original.

Glynn Clements <glynn at gclements.plus.com>

More information about the xorg mailing list