Bug 89690

Summary: journalctl does not respect $SYSTEMD_PAGER environment variable
Product: systemd Reporter: Dustin Falgout <dustin>
Component: generalAssignee: systemd-bugs
Status: RESOLVED INVALID QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Dustin Falgout 2015-03-20 12:10:41 UTC
journalctl does not respect $SYSTEMD_PAGER environment variable when it's set. 

systemctl does use the pager when the env var is set as expected so the issue is only with journalctl.
Comment 1 Lennart Poettering 2015-05-15 14:42:29 UTC
This seems to work fine here with current git. Can you reproduce this with 219 or newer?

What's the precise command line you tried? What did you set $SYSTEMD_PAGER to?
Comment 2 Dustin Falgout 2015-05-15 18:25:50 UTC
I am currently using 219 and the issue is still present.

Environment Vars:

SYSTEMD_PAGER=/usr/bin/most -dw
PAGER=/usr/bin/most -dw

Command:

sudo journalctl -b -0

Let me know if there's any other information you need. Thanks.
Comment 3 Lennart Poettering 2015-05-15 18:35:18 UTC
Is it possible that "sudo" strips the env vars?

If you invoke this without sudo, or if you explicitly pass the env vars through sudo, does it work then?
Comment 4 Dustin Falgout 2015-05-15 19:17:26 UTC
No, it doesn't work without sudo either. I think it bears mentioning again that it works fine for systemctl (with and without sudo).
Comment 5 Lennart Poettering 2015-05-15 19:22:13 UTC
It definitely works fine here...

Can you rung this through "strace -f -o log -s 500" or so, then check for the child that is used to invoke the pager what it tries to execute? If in doubt attach the relevant log output this generates here...
Comment 6 Dustin Falgout 2015-05-16 20:13:40 UTC
Thanks for the suggestion. I should have though of it. The problem was a function in my .bashrc that I forgot about :-/ Sorry for the pointless bug report. Thanks again for your help. Cheers!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.