This is a follow up on How to make the 'less' command handle UTF-8?
If I want to set options for less
globally, so that each user doesn't have to fiddle with their own env vars (.basrc
, etc) individually, where should it be set?
/etc/bashrc
is not a good option as then I'd have to set one up for each shell.
The man page for less
mention a lesskey
file that has a #env
section where i can set this, but there is no mention of where to put it. It does mention that I can use env vars LESSKEY_SYSTEM
and LESSKEY
to point to the file... but that creates a chicken vs egg problem.
Other distros man pages mention /usr/local/etc/sysless
but that is not used on ubuntu from my tests.
strace
to the rescue./usr/bin/.sysless
is very odd. let's skip that./etc/sysless
sounds more sane. I think this is the answer. I can't say for sure because now less gives meStill need to debug that since the contents of that file for now are copied from the man page...