Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › antiX-development › Development › antiX-23 – based on Debian 12 Bookworm – ideas
Try running “sudo visudo” and you’ll be using nano whether you like it or not. Editing the sudoers file is difficult enough for a novice without the added trial of doing it in the archaic nano.
My point is that usually you edit text files, conf files, dot files, etc with whatever editor you want. But on occasion, there are no obvious ways to choose text editor, and sudo will default to its default editor, which is usually nano. Sudo visudo is one such example. I think viewing updated conf files presented while upgrading with apt is another. Having the default editor be micro, where intuitive commands such as ctrl+q work, would be beneficial for the majority of users.
https://www.howtogeek.com/devops/how-to-use-micro-the-better-alternative-to-nano/
(the article is three years old, so the part about not being on apt isnt true anymore. Micro is in the debian repos)
Regardless of what the setting happens to be, you can easily change it.
For me, this worked:
sudo update-alternatives –config editor
Once I ran it, a list of the editors I have installed was listed (I have MANY of them); it was set to nano as the default, so I changed it to jmacs, which is the Joe/Jupp editor set to emacs emulation. Then I ran sudo visudo and it came up in Jmacs as expected.
--
Brian Masinick
Also, once you use sudo update-alternatives –config editor
you can set (and optionally change) the EDITOR environment variable.
I had it set to geany and I changed it to emacs by explicitly typing export EDITOR=emacs
Then I ran sudo visudo and it came up in emacs as expected.
So to summarize, it’s easy to put environment variables in .profile, .bashrc, or whatever configuration file you use at startup time.
If it’s a shell variety such as sh, ksh, zsh, or bash, the syntax is as above export EDITOR={your-desired-editor}.
As mentioned above, you can change it interactively as well, but that will only remain during the current shell session unless you
add or update EDITOR in your personal configuration.
--
Brian Masinick
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |