I can't get lolcat to show colours in the message of the day (motd).

When I run this in the command line, all works fine:

exec /usr/games/fortune | /usr/games/cowsay -f moose | /usr/games/lolcat

But the same line in /etc/update-motd.d produced black-and-white output only.

What am I doing wrong?


By default, lolcat does not produce colors when its output is not a tty.

To force colors, use the -f, --force option:

/usr/games/fortune | /usr/games/cowsay -f moose | /usr/games/lolcat -f

This works on my system.

|improve this answer|||||
  • Thanks so much, Nick. You've nailed it! – Mihai Nagy Sep 23 '19 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.