Description of problem: When I run journalctl, it pipes output to less, and escape sequences are there but not interpretted. For example: "kernel: ESC[1;39mtype=1404 audit(1350686330.035:2): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295ESC[0m". Typing -R<enter> to enable processing of ANSI sequences makes the sequences show properly. Version-Release number of selected component (if applicable): systemd-194-1.fc18.x86_64 less-444-8.fc18.x86_64 This is on an up-to-date F18 test system. How reproducible: always Steps to Reproduce: 1. Install system 2. Wait until something colored hits the log 3. run journalctl Actual results: Garbled ESC codes in output. Expected results: Pretty colors in output.
hmm, do you have any non-default options set in $LESS? The default of less does actually interpret ANSI escape codes. What does this print for you? echo $LESS Is this fixed if you invoke: LESS= journalctl ?
Hmmm. Yes; I had -MX set. Doesn't journalctl override this? I don't necessarily want to add -R to my default options. (I don't think that _is_ the default.) I think journalctl should probably override the default options, as 'man' does. If one wants to change them, they can set SYSTEMD_PAGER.
*** Bug 869403 has been marked as a duplicate of this bug. ***
Also: "LESS= journalctl" does not work. I have to actually unset LESS.
In pager_open() we do: setenv("LESS", "FRSX", 0); We can change the last argument to 1 to override the user's value.
(In reply to comment #5) > In pager_open() we do: setenv("LESS", "FRSX", 0); > We can change the last argument to 1 to override the user's value. (Can we add M while we are at it?)
(Re: title change) While "override $LESS" is the suggested fix, I think it's still a _bug_, not really an RFE. As long as it's fixed, not a big deal, of course.
I have now added "M" to LESS. I am not sure we really should override $LESS. git doesn't do that. I have the suspicion that people would hate us if we override their personal settings. Dunno. Opinions? Convince me that we really should override $LESS. If not, I'll close the bug.
(In reply to comment #8) > I have now added "M" to LESS. > > I am not sure we really should override $LESS. git doesn't do that. I have > the suspicion that people would hate us if we override their personal > settings. Dunno. Opinions? Convince me that we really should override $LESS. > If not, I'll close the bug. It looks like git (and man) _add_ to the existing options. They don't exhibit the same problem with color and -R. I agree that that's better than just overriding them, and that people might not be happy about that. However, if that's hard, I think overriding is better than the current approach, especially since there is $SYSTEMD_PAGER.
From what I am seeing in the git sources (pager.c) they do not add, they only set $LESS if it is not set anyway, and they set it to FRSX. I don't see any code for "adding" settings there, do you?
(In reply to comment #10) > From what I am seeing in the git sources (pager.c) they do not add, they > only set $LESS if it is not set anyway, and they set it to FRSX. I don't see > any code for "adding" settings there, do you? My fault; I had pager options set in git directly as well. It does have the same behavior.
I have now turned on overriding of LESS after all, simply to ensure that the new "-e" feature (i.e. immediately jump to end of log stream) of journalctl always works. I guess this closes the issue.
Cool. Thanks!
systemd-201-2.fc18.1 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/systemd-201-2.fc18.1
Package systemd-201-2.fc18.2: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.2' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.2 then log in and leave karma (feedback).
Package systemd-201-2.fc18.4: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.4' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.3 then log in and leave karma (feedback).
Package systemd-201-2.fc18.5: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.5' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.5 then log in and leave karma (feedback).
systemd-201-2.fc18.6 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.6
Package systemd-201-2.fc18.6: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-201-2.fc18.6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-5452/systemd-201-2.fc18.6 then log in and leave karma (feedback).
systemd-201-2.fc18.6 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.