That's weird.
However, I found a solution.
'editor' is really '/usr/bin/editor', which is a symbolic link to '/etc/alternatives/editor', which in turn is a symbolic link to '/usr/bin/joe'. On my non-PIXEL Pi it points to '/bin/nano', so I changed the link.
The complete picture:
/usr/bin/editor -> /etc/alternatives/editor
/etc/alternatives/editor -> /usr/bin/joe, changed this to /bin/nano
/etc/alternatives/editor.1.gz -> /usr/share/man/man1/joe.1.gz, changed this to /usr/share/man/man1/nano.1.gz
Changing the links involved removing the existing links and making new ones. These were the commands:
Code: Select all
cd /etc/alternatives
sudo rm editor editor.1.gz
sudo ln -s /bin/nano editor
sudo ln -s /use/share/man/man1/nano.1.gz editor.1.gz
This works, but is there an easier way? I always thought there was an environment variable EDITOR involved.