0

I would like to configure a program named howdy which allows you to login using your face. For this I need to edit the config file to add the path to my camera. However when I execute sudo howdy config it opens nano despit the fact that I added

export EDITOR='code' 
export VISUAL='code'

to my .bashrc file. It is supposed to edit it in my default editor. When I do anything like sudo howdy config|cat or sudo howdy config|code it still opens nano. Does anyone know why this is the case?

(also I don't know how to copy text in nano and none of the combinations mentioned don't work)

1 Answers1

1
  1. sudo doesn't preserve the environment (see man sudo). You can use sudo -E to request environment preservation. Use at your own risk, there's a reason the environment is not preserved.

  2. EDITOR and VISUAL are just hints to the program, each program may use or ignore them at their leisure. Looking at the source of howdy, it actually reads the EDITOR variable, so after preserving the environment, it should hopefully work.

dirkt
  • 17,461