Post by @cliffle@hachyderm.io

mcc
@mcc @mastodon.social

A year ago learning systemd would be a "well, it's like any system, it's got upsides and downsides" but now, now that I'm in "move to NetBSD or some other non-AI-generated operating system ASAP" mode, having to learn systemd is grating. Did you know systemctl does not respect the conventional PAGER environment variable? It wants you to use the very special SYSTEMD_LESS variable

Replying to @mcc@mastodon.social
cliffle
@cliffle @hachyderm.io

@mcc so, while it may not make it less grating, there is actually a reason for that.

SYSTEMD_LESS isn't a replacement for PAGER,. it's a replacement for LESS -- the environment variable that less interprets for its default options. My understanding SYSTEMD_LESS is only useful for altering the options given to less, _not_ replacing the pager program.

You probably _could_ work out a way to replace the pager, but iirc journalctl and friends pass options to it assuming it has less-compatible command line syntax. So you'd want to check for that.

Replying to @cliffle@hachyderm.io
cliffle
@cliffle @hachyderm.io

@mcc ...hm, it actually looks like journalctl and friends respect PAGER unless that's overridden -- do you have SYSTEMD_PAGERSECURE exported? That overrides PAGER.

(Also if you're just venting and don't want to override the pager on the systemd system you're having to use, I can shut up.)