You are not logged in.
I don't know when this bug popped up, as I don't run systemctl commands every day, but whenever I run a systemctl command now that outputs colors, for example: "systemctl list-unit-files", it clobbers the colors on my terminal. The colors that are outputted don't look right either, it's like a wall of red where it should only show a few keywords in red or green. After I have run the command, I have to type reset in my terminal to get the colors back to normal
I have the environment variable SYSTEMD_PAGER set to "", because I dislike pager-by-default behavior. If I unset the variable, systemctl commands don't clobber my terminal, but the output still doesn't look right, with some seemingly random "underlines" in the output. If I pipe the output through another command (e.g. grep), it obviously goes away too as piping strips the output of ansi codes.
I verified the behavior on three different Arch machines, with three different terminal emulators: rxvt-unicode, regular xterm and mate-terminal. The bug is present in all cases.
I also checked if it was behaving like that on CentOS, which uses an older version of systemd, and it is not.
Here is a comparison screenshot: http://i.imgur.com/NPIhgPX.png
The terminal on top is on CentOS, it shows the output as I expect it to look like. The terminal on the bottom is on Arch.
Offline
Trying to narrow down this bug, I dug up an Arch VM that hasn't been powered on or updated since December 2016. The version of systemd on the VM is 231-4, and it doesn't exhibit this buggy behavior.
This leads me to conclude that the bug has been introduced somewhere between version 231-4 and 232-8 of systemd.
Offline
I cannot reproduce this (systemd-232-8, rxvt-unicode-9.22-2).
Are you sure it is a systemd bug? Have you tried with another terminal (e.g. xterm or a VTE-based one, or in a TTY)?
Reread my initial post, I tried with 3 terminal emulators on 3 different hosts. On a TTY it's the same problem and you can add PuTTY to the list too. I really don't think it's my terminal emulator.
Here's a very basic arch system I just installed from scratch.
With 232-8 I get this: http://i.imgur.com/WsRKaEt.png
If I downgrade the systemd package to version 231-4 from the archives, I get this: http://i.imgur.com/q23eSvN.png
The only difference between screenshot 1 and screenshot 2 is the systemd version. I can't really make it any clearer than that...
Last edited by BlackMastermind (2017-03-01 16:28:16)
Offline
I'd rather blame the shell or some variable in there.
bash, zsh or sth. entirely different?
Tried with a different user than root?
Offline
I'd rather blame the shell or some variable in there.
bash, zsh or sth. entirely different?
Tried with a different user than root?
Regular old bash, straight out of the box without anything fancy configured, tried with a different user too, same result. Just to humor you, I tried with csh, mksh, zsh and fish too. Same result.
As you all don't believe me, what do you get if (using bash) you do:
export SYSTEMD_PAGER=""
/usr/bin/systemctl list-unit-files
Post a screenshot.
Offline
Reread my initial post, I tried with 3 terminal emulators on 3 different hosts.
Ah, I should've read that, I'm sorry. Also, unsetting the pager indeed makes it behave the same way here, too, so yeah, this looks like a bug to me.
I would probably contact the systemd devs - either on GitHub (I can't find any related issue) or on IRC (freenode#systemd).
--edit--
To extend on seth's comment below, yes, it doesn't really "clobber the terminal" - it just forgets to print the "reset-colour" escape sequence after a disabled.
If your shell prompt doesn't do anything colour-related, the colour will continue to be active beyond your shell prompt.
But it is still a bug and should be reported.
Last edited by ayekat (2017-03-01 17:16:09)
Offline
Who said disbelieve?
systemctl messes colors, yes - but gracefully caught by my PS1 ;-)
Offline
Who said disbelieve?
systemctl messes colors, yes - but gracefully caught by my PS1 ;-)
So I take it your PS1 has an ansi code to workaround buggy software like that?
Offline
It's rather to please my eyes - and came for free with grml-zsh-config ;-)
Offline
Offline