How do I disable plymouth message --text="foobar" to be replicated in text console?

LAHAYE Olivier olivier.lahaye at cea.fr
Tue Jun 6 08:01:53 UTC 2017


Thanks Ray for your inputs, good ideas indeed.

Unfortunately, this won't fit all my needs as I'm using ansi color codes to print to console with my echo command.
As for the latest command which would delete the entire line, it's difficult to parse in plymouth script as I would need to remove the remaining \r, thus treat each line which is not efficient.

I think I'll migrate to plymouth update --status which I already use to enable/disable progress steps on the screen (icons and progress bar). Format is "Item(4letters):value(3digits):max value(3digits)".
I could add "mesg" for message item and forward to my message parser in that case.

Could be a good idea to add an option to disable this behavior (replicate messages in console)

If you want to have an idea of what my plymouth theme is doing:
http://svn.oscar.openclustergroup.org/pkgs/downloads/sis_plymouth.png
And the text console:
http://svn.oscar.openclustergroup.org/pkgs/downloads/SIS_CO6.png

Cheers,

Olivier.


--
   Olivier LAHAYE

________________________________________
De : Ray Strode [halfline at gmail.com]
Envoyé : vendredi 2 juin 2017 19:21
À : LAHAYE Olivier
Cc : plymouth at lists.freedesktop.org
Objet : Re: How do I disable plymouth message --text="foobar" to be replicated in text console?

Hi,

> How do I avoid plymouth to replicate text messages in console?
> This behavior is not present on CentOS-7 but is present in Fedora-25.
>
> plymouth message --text="foobar" # => foobar is printed on screen.
>
> This behavior seems present only on systemd based distro.
> Is there a switch to prevent this?
No easy way to get rid of that behavior (other than editing details plugin.c)

> I'm using a special format that has no meaning in text mode.
> Indeed to display a warning I'm using:
>
> plymouth message --text="W:This is a warining message"
> plymouth message --text="I:This is an informative message"
> Aside that I'm using an echo that won't prepend the "<letter>:" to the
> messafge to log output.

Maybe instead of using colon as your delimiter use control characters?

 e.g. \r or \b\b

so then plymouth display-message --text="$(echo -ne W:\rThis is a
warning message)"

Then if it gets printed to the console, the W: will get overwritten by
the message
(or deleted if you use \b\b)

or if you really want to delete it entirely maybe

plymouth display-message --text="W:This is a warning message$(echo -ne
'\e[1K\r)"

just an idea.

you could also use status instead:

plymouth update --status=warning-256-magic-cookie-here

--Ray


More information about the plymouth mailing list