Eucalyptus HQ has a big TV on the wall that displays the #eucalyptus-devel IRC channel so developers can always see what is going on and jump in if they need to. Until recently, a laptop drove that display, but that seemed like overkill to me, so I went to employ my Raspberry Pi running the Raspberry Pi Fedora Remix to do that instead. Since the IRC program it’s using, irssi, is text-based I don’t need to use any of the Pi’s precious little memory to run anything graphical, so I just needed to figure out how to make systemd spawn irssi instead of a login prompt on tty1.
I would normally do this by copying
/firstname.lastname@example.org and then editing that, but F18’s version of systemd let me do this in an even simpler manner. By creating a directory with the same name as that file, plus
.d, I can add a config file to that directory that overrides only the parts of the original unit file that I need to change:
[Service] After=network-online.target Wants=network-online.target ExecStartPre=/usr/bin/nm-online ExecStart= ExecStart=/usr/bin/irssi KillSignal=SIGTERM StandardInput=tty StandardOutput=tty User=kiosk
Now I can just plug the system in and have it automatically up and running irssi in less than a minute.
I didn’t expect to have to run
nm-online here because
network-online.target is supposed to wait for a service that runs that itself, but for some reason systemd didn’t order things that way and irssi came up before the network connection did. Running that command as part of this unit worked around that problem.
consoleblank=0 kernel parameter to prevent Linux from blanking the screen after the usual ten minutes of inactivity.
I’m using the TV’s USB “service” port to power the raspberry pi. That usually works just fine, but when the TV turns off it cuts the power to that port as well, abruptly shutting the raspberry pi off. I don’t have any data loss in particular to worry about, but turning the system back on causes some annoyance: when the TV turns on the raspberry pi also powers on and attempts to detect what kind of screen it is plugged into. At that point the TV hasn’t figured out what it wants to display yet, so the detection fails and I’m left with a blank screen until I reboot the computer.