Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

display colors from systemd in ssh session to embedded device

I have a embedded device to which I connect to with a ssh terminal. When running systemd* commands the output contains color characters like shown below:

[[0;1;32m●[[0m reMarkable State: [[0;1;32mrunning[[0m

I know I can turn the color off with export SYSTEMD_COLORS=0, but is it possible to configure my host terminal to display the colors correctly?

I have tried with putty, teraterm and standard linux terminal in Ubuntu. Can't find any way to display the colors.

like image 961
Michal Koziel Avatar asked Jan 21 '26 16:01

Michal Koziel


1 Answers

The problem is with pager used by systemd on embedded device. Systemd uses less -FRSXMK by default.
BusyBox less may not support colors (i.e. -R option).
You can use other pager (export SYSTEMD_PAGER="more") or install less from a different package.

like image 73
Chernyshov Pavel Avatar answered Jan 25 '26 08:01

Chernyshov Pavel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!