Sample Header Ad - 728x90

How can I get colored output of `systemd` commands run with `watch` inside xterm?

1 vote
1 answer
402 views
Somehow I'm unable to get this working with color output, it works but no colors are shown. --- 1. I'm currently using these alias'es in my bash shell:
alias Xterm='xterm -geometry 132x60 +dc +cm -e '
   alias Watch='watch --color --differences --interval=1 --exec '
   alias xterm-watch='Xterm Watch '
   alias _nc='networkctl'
   alias nc-status='_nc --no-pager --stats --full status'
   alias nc-status-watch='xterm-watch nc-status'
1. $TERM is set to xterm-256color 1. When i enter nc-status-watch at the bash prompt, an xterm window pops-up correctly with a watch command running the networkctl command with it's arguments. But the output does not show any colors. Result of <code class=nc-status-watch" class="img-fluid rounded" style="max-width: 100%; height: auto; margin: 10px 0;" loading="lazy"> How can I get colored output of systemd commands run with watch inside xterm?
Asked by Tripple Moon (113 rep)
Sep 6, 2023, 09:24 AM
Last activity: Sep 7, 2023, 08:03 AM