Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cannot find/change keybindings for visudo on Rhino Linux #382

Open
iconoclasthero opened this issue Jun 10, 2024 · 3 comments
Open

Cannot find/change keybindings for visudo on Rhino Linux #382

iconoclasthero opened this issue Jun 10, 2024 · 3 comments

Comments

@iconoclasthero
Copy link

visudo on my ubuntu 22.04 uses default nano keybindings.
on rhino linux it uses some alien keybindings I am unable to find... so instead of exiting ^X now deletes lines. Instead of page down, I have no idea wtf ^V does.

I really need to get to the bottom of this.

@iconoclasthero
Copy link
Author

You would think, based on looking at man visudo that simply

sudo su
SUDO_EDITOR="nano --rcfile /etc/nanorc"
EDITOR="nano --rcfile /etc/nanorc"
VISUAL="nano --rcfile /etc/nanorc"
visudo
^D

would be sufficient to force the standard keybindings on visudo.

@millert
Copy link
Collaborator

millert commented Jun 10, 2024

If you are running sudo visudo, you probably need to add:

Defaults env_keep += "SUDO_EDITOR EDITOR VISUAL"

to your sudoers file to preserve those environment variables. If you only want to preserve them for visudo itself you can do something like

Defaults!/usr/sbin/visudo env_keep += "SUDO_EDITOR EDITOR VISUAL"

@iconoclasthero
Copy link
Author

iconoclasthero commented Jun 11, 2024 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants