You are not logged in.
One can display system information, and a distro logo on the console login screen. The idea is simple - Use a script to overwrite /etc/issue before getty starts.
I wrote a simple script for my system, but I later realized that one can just configure neofetch/screenfetch to do the job (duh).
once you have the script, just use it to populate /etc/issue at boot. If you're on a Debian based system, just call your script in /etc/rc.local. (Debian has a enabled systemd service that executes /etc/rc.local if it exists.)
#!/bin/sh -e
#
# rc.local
# overwrite /etc/issue
yourscript.sh > /etc/issue
exit 0
On other systemd based systems, we can create a service unit that runs before getty.
We can add other stuff like current weather, bitcoin prices etc, but that could add significant delays.
Issues: The /etc/rc.local fires the script just once, before starting the initial tty. On any other ttys started by Ctrl+Alt+Fn, the same old /etc/issue is displayed, giving outdated info. I'll try to see if it can be made more dynamic.
Offline
Thanks easysid!
Offline
Issues: The /etc/rc.local fires the script just once, before starting the initial tty. On any other ttys started by Ctrl+Alt+Fn, the same old /etc/issue is displayed, giving outdated info. I'll try to see if it can be made more dynamic.
You could add an override to the getty@ttyX.service files (replace X with the TTY number):
# /etc/systemd/system/getty@ttyX.service.d/override.conf
[Service]
Type=
Type=oneshot
ExecStart=
ExecStart=-/usr/bin/agetty --noclear %I $TERM
ExecStart=-/path/to/yourscript.sh
(Untested, I'm not booted with systemd at the moment)
Offline
^ nice suggestions.
Last edited by ohnonot (2021-07-02 07:49:09)
Offline