You are not logged in.

#1 2022-11-20 17:50:33

jamies
Member
Registered: 2022-11-20
Posts: 3

Cannot override pager on journalctl

Hello, I'm trying to replace the default pager, less, with most. However, journalctl seems to ignore the environment variables the man page says to use: https://man.archlinux.org/man/journalctl.1.en

I've set both environment variables:

PAGER=most
SYSTEMD_PAGER=most

And confirmed they are active in my shell. However, running journalctl still results in less being used as a pager.

I've also run:

SYSTEMD_PAGER=most journalctl

The only syntax that works is:

journalctl | most

I've also confirmed that other binaries do in fact use most as the pager, for example:

man journalctl

... opens properly in most.

Strange right? It seems like the jourtnalctl manpage is incorrect, or perhaps it runs under root, which has its own pager set?

Last edited by jamies (2022-11-20 18:00:14)

Offline

#2 2022-11-20 18:10:12

dogknowsnx
Member
Registered: 2021-04-12
Posts: 648

Re: Cannot override pager on journalctl

Hi and welcome to the forums!
Did you see/read the part about $SYSTEMD_PAGERSECURE in the manpage?

Last edited by dogknowsnx (2022-11-20 18:10:27)


RI - Rest your Eyes and Self

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#3 2022-11-20 18:47:29

jamies
Member
Registered: 2022-11-20
Posts: 3

Re: Cannot override pager on journalctl

dogknowsnx wrote:

Did you see/read the part about $SYSTEMD_PAGERSECURE in the manpage?

Whoa! I did not. Thanks so much.

If anyone else arrives, this works:

SYSTEMD_PAGERSECURE=1
SYSTEMD_PAGER=most
PAGER=most

And thanks for the warm welcome! Arch is the best!

Offline

Board footer

Powered by FluxBB