From 494235750e808ed508a7275cdac7fde77ef458dd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Feb 2019 08:38:39 +0530 Subject: [PATCH] Cleanup note on visudo --- docs/faq.rst | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 5722a7e3e..f9a8d1102 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -81,19 +81,11 @@ Shell providing the right terminfo path:: sudo … env TERMINFO=$HOME/.terminfo bash -i TERMINFO=/home/ORIGINALUSER/.terminfo exec bash -i -Alternatively, if you want to keep TERMINFO automatically whenever you run a ``sudo`` -command, you can edit the `/etc/sudoers.d/visudo` file by executing this shell command: - - sudo visudo - -Then add the following content: +Alternatively, you can configure sudo to preserve TERMINFO by running ``sudo +visudo`` and adding the following line:: Defaults env_keep += "TERM TERMINFO" -Save the file and from now on `sudo` will correctly identify `xterm-kitty`. -This is based on the trick provided [here](https://stackoverflow.com/a/8636711/5715571), -and has been tested on Clear Linux (27910). - If you have double width characters in your prompt, you may also need to explicitly set a UTF-8 locale, like::