I would like to run this command in boot time:
This command prints "colored" content of /home/decker/test text file.So it would be something like welcome message during bootup process.
Tested this command when logged in in terminal.
I tried following, but nothing works:
Tried with and without "quite" kernel boot arg.
Back in my days, when no systemd was here, this was simple. I have no idea what to do now.
In ideal world, I would like to place it after fsck messages while using "quite" kernel boot arg. (So there would be only messages with booting kernel name, fsck and colored welcome message). I dont want to use plymouth.
EDIT: So, thanks again for answers guys. We moved forward, but still no go. No rainbows. I added 3 mentioned lines to journalctl.conf. There is everything else commented out, so these 3 lines are there "alone". Then I added 2 mentioned lines to my unit. Content of my unit is:
[Unit] Description=Peace Unicorn [Service] Type=simple ExecStart=/bin/cat /home/decker/test5 StandardOutput=tty-force TTYPath=/dev/tty12 [Install] WantedBy=multi-user.target
When I restarted system, systemd printed this error:
[ 4.817429] systemd: [/etc/systemd/system/unicorn.service:7] Failed to parse output specifier, ignoring: tty-force
7th line is this: StandardOutput=tty-force. I tried to change it to "tty" only, but that did not printed anything.
Also I changed to "/bin/cat" from "lolcat" to focus on systemd problem for now.
Your rainbows are being sent to journalctl, which manages stderr and stdout for all systemd units. If you want to enable tty output for a single unit, add this under your unit's [Service] section
This won't preserve any formatting codes, such as colors and extra spaces
External links referenced by this document: