Yocto Project Discussions
 help / color / mirror / Atom feed
* strange formatting of command output on core-image-base
@ 2020-05-20 10:23 stefan.wenninger
  2020-05-20 15:39 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: stefan.wenninger @ 2020-05-20 10:23 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 1808 bytes --]

Hi,
I recently switched form an image based on fsl-image-qt5 to one based on core-image-base.
The new image works fine in every regard except that the output of some commands looks weird.

I have attached the output of commands "nmcli" and "systemctl status dbus". Once executed on the fsl-image-qt5 based system and once on the core-image-base based system (_weird.txt).
There are two main points I gather from that weird output:
1. There are some codes like "[[32m"+"[[0m" or "[[0;1;32m"+"[[0m", which I assume are colour codes, that are printed and not applied.
2. The output appears to be opened in a vi-like editor?! It clears and fills the entire terminal page and seems to display an input mode at the bottom.

Both of these aspects are non-existent on the fsl-image-qt5 based system. There, colours are displayed normally and the output is just printed right beneath my command call.

I have discovered that I can get these two commands to work properly on the core-image-base based system, if I pipe their output into cat: "nmcli | cat".

My assumption for the colour codes is that, the core-image-base system uses a different text encoding, or a different style of colour codes and therefore does not recognize the ones presented by nmcli.
I have tried to install the ttf-dejavu-* fonts that are present on the fsl-image-qt system. I also verfied that both systems seem to be using POSIX as their LANG setting ("locale" produces the same output on both).
I have no idea why the output is presented in what seems to be a vi editor though. Both systems have their EDITOR variable set to "vi".

Am I missing some kind of package or setting in my image?

I am at my wits' end and would greatly appreciate anyone trying to shed some light on what is going on here.
Stefan Wenninger

[-- Attachment #1.2: Type: text/html, Size: 1894 bytes --]

[-- Attachment #2: nmcli_weird.txt --]
[-- Type: text/plain, Size: 817 bytes --]

[[32meth0: connected to static-ethernet[[0m
        "eth0"
        ethernet (fec), F8:DC:7A:38:5E:88, hw, mtu 1500
        ip4 default
        inet4 10.30.4.204/24
        route4 10.30.4.0/24
        route4 0.0.0.0/0
        route6 ff00::/8

[[31mwlan0: disconnected[[0m
        "wlan0"
        wifi (brcmfmac), E6:EE:24:78:B8:B8, hw, mtu 1500

[[2mlo: unmanaged[[0m
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details.

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
standard input

[-- Attachment #3: systemctl_weird.txt --]
[-- Type: text/plain, Size: 726 bytes --]

[[0;1;32m●[[0m dbus.service - D-Bus System Message Bus
   Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
   Active: [[0;1;32mactive (running)[[0m since Wed 2020-04-22 08:32:34 UTC; 14min ago
     Docs: man:dbus-daemon(1)
 Main PID: 261 (dbus-daemon)
    Tasks: 1 (limit: 3582)
   CGroup: /system.slice/dbus.service
           └─261 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

Apr 22 08:32:34 imx8mq-var-dart systemd[1]: Started D-Bus System Message Bus.

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
standard input

[-- Attachment #4: nmcli.txt --]
[-- Type: text/plain, Size: 668 bytes --]

eth0: connected to static-ethernet
        "eth0"
        ethernet (fec), F8:DC:7A:38:5E:6F, hw, mtu 1500
        ip4 default
        inet4 10.30.4.204/24
        route4 10.30.4.0/24
        route4 0.0.0.0/0
        route6 ff00::/8

wlan0: disconnected
        "wlan0"
        wifi (brcmfmac), C2:AC:F8:33:15:5A, hw, mtu 1500

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details.

[-- Attachment #5: systemctl.txt --]
[-- Type: text/plain, Size: 543 bytes --]

● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
   Active: active (running) since Thu 2020-01-16 13:19:07 UTC; 2min 4s ago
     Docs: man:dbus-daemon(1)
 Main PID: 363 (dbus-daemon)
    Tasks: 1 (limit: 3582)
   CGroup: /system.slice/dbus.service
           └─363 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

Jan 16 13:19:07 imx8mq-var-dart systemd[1]: Started D-Bus System Message Bus.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yocto] strange formatting of command output on core-image-base
  2020-05-20 10:23 strange formatting of command output on core-image-base stefan.wenninger
@ 2020-05-20 15:39 ` Khem Raj
  2020-05-22 12:33   ` stefan.wenninger
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2020-05-20 15:39 UTC (permalink / raw)
  To: yocto



On 5/20/20 3:23 AM, stefan.wenninger@evopro-ag.de wrote:
> Hi,
> I recently switched form an image based on fsl-image-qt5 to one based on 
> core-image-base.
> The new image works fine in every regard except that the output of some 
> commands looks weird.
> 
> I have attached the output of commands "nmcli" and "systemctl status 
> dbus". Once executed on the fsl-image-qt5 based system and once on the 
> core-image-base based system (_weird.txt).
> There are two main points I gather from that weird output:
> 1. There are some codes like "[[32m"+"[[0m" or "[[0;1;32m"+"[[0m", which 
> I assume are colour codes, that are printed and not applied.
> 2. The output appears to be opened in a vi-like editor?! It clears and 
> fills the entire terminal page and seems to display an input mode at the 
> bottom.
> 
> Both of these aspects are non-existent on the fsl-image-qt5 based 
> system. There, colours are displayed normally and the output is just 
> printed right beneath my command call.
> 
> I have discovered that I can get these two commands to work properly on 
> the core-image-base based system, if I pipe their output into cat: 
> "nmcli | cat".
> 
> My assumption for the colour codes is that, the core-image-base system 
> uses a different text encoding, or a different style of colour codes and 
> therefore does not recognize the ones presented by nmcli.
> I have tried to install the ttf-dejavu-* fonts that are present on the 
> fsl-image-qt system. I also verfied that both systems seem to be using 
> POSIX as their LANG setting ("locale" produces the same output on both).
> I have no idea why the output is presented in what seems to be a vi 
> editor though. Both systems have their EDITOR variable set to "vi".
> 
> Am I missing some kind of package or setting in my image?
> 
> I am at my wits' end and would greatly appreciate anyone trying to shed 
> some light on what is going on here.
> Stefan Wenninger
> 

Its perhaps some of  busybox applets like cat etc. Try 
core-image-full-cmdline and see if its any better.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: strange formatting of command output on core-image-base
  2020-05-20 15:39 ` [yocto] " Khem Raj
@ 2020-05-22 12:33   ` stefan.wenninger
  0 siblings, 0 replies; 3+ messages in thread
From: stefan.wenninger @ 2020-05-22 12:33 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

Hi Raj,

you seem to have been spot on. After adding the "packagegroup-core-full-cmdline" to my image all command output looks perfect.
This packagegroup was the only relevant difference between core-image-base and core-image-full-cmdline imo. Some package out of this group did the trick.

Thank you very much, I consider this topic closed.

Stefan Wenninger

[-- Attachment #2: Type: text/html, Size: 396 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-22 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20 10:23 strange formatting of command output on core-image-base stefan.wenninger
2020-05-20 15:39 ` [yocto] " Khem Raj
2020-05-22 12:33   ` stefan.wenninger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox