On 28/06/2023 20:26, stan via users wrote:
On Wed, 28 Jun 2023 11:10:05 -0700
stan <upaitag(a)zoho.com> wrote:
> On Wed, 28 Jun 2023 10:17:45 -0700
> stan via users <users(a)lists.fedoraproject.org> wrote:
>
>> On Wed, 28 Jun 2023 17:08:38 +0100
>> Patrick O'Callaghan <pocallaghan(a)gmail.com> wrote:
>>> See also 'man journalctl' and search for PAGER.
>> This is also relevant. Unfortunately, it seems that journalctl
>> ignores the input of SYSTEMD_LESS. It is hard to tell, because
>> there is no example of the kind of input it wants or whether it
>> only accepts options without arguments, as the default options all
>> are. I would probably have to look at the journalctl code to
>> determine if they are hard coded into the program. There is no
>> configuration file to set them in any case.
> So, the code for journalctl shows it reading the options from the
> variables, and invoking less with those options, but it doesn't seem
> to affect the behavior of running journalctl, or at least the colors
> don't change. Maybe I'll look more closely at some point, but no joy
> for now.
Operator error. Exporting the wrong name because of a cut and paste.
Once I fixed that, definitely works to change colors in journalctl
output, will have to tune it to get what I want.
I put this in my .bashrc so everything is set on login.
SYSTEMD_PAGER=less
export SYSTEMD_PAGER
SYSTEMD_LESS="[list of less options]"
export SYSTEMD_LESS
_______________________________________________
Not exactly, I'd not think of
it as _the_ solution - (I much
prefer to up&down pages via actual mechanical scrolling) -
as I use, always I've had, SYSTEMD_PAGER=cat so...
man page for 'journalctl' has a shor section:
When outputting to a tty, lines are colored according to
priority: lines of level ERROR and higher are colored red;
lines of level NOTICE and higher are highlighted;
lines of level DEBUG are colored lighter grey; other lines are
displayed normally.
would be nice to be able to customize those & if 'systemd'
delegates declaration of that 'highlighting' colour then
these below do not do it:
a) terminal-colors.d - perhaps systemd/journal ignores it
altogether
b) gnome-terminal has config for 'Highlight colour'
It would be great/the best to have that functionality
internal to systemd/journal - thus, if authors/devel might
read here - please think of this conversation's subject as
possible future addition/enhancement to the software.