I’m trying to set up a computer for a bit of a weird situation with some elderly relatives, and the key criteria is I need Thunderbird to open on boot, and STAY open, even if they accidentally close it, or it crashes for some other reason.
I’m trying to set this up as systemd service, as this seems to be the generally standardized method for auto-starting stuff, it’s easy (ish), I’m familiar(ish) with it and it has provisions for auto restart and so on if it crashes.
Problem I’m having is it seems to failing be asking for some sort of environment/display variable. Config file (placed in /etc/systemd/system ) is at the end.
[test@fedora ~]$ systemctl daemon-reload [test@fedora ~]$ systemctl start thunderbird [test@fedora ~]$ systemctl status thunderbird × thunderbird.service - Thunderbird Loaded: loaded (/etc/systemd/system/thunderbird.service; disabled; preset: disabled) Active: failed (Result: exit-code) since Sat 2023-01-07 15:30:35 AEDT; 3s ago Duration: 119ms Process: 11667 ExecStart=/usr/bin/thunderbird (code=exited, status=1/FAILURE) Main PID: 11667 (code=exited, status=1/FAILURE) CPU: 93ms Jan 07 15:30:35 fedora systemd: Started thunderbird.service - Thunderbird. Jan 07 15:30:35 fedora thunderbird: Error: no DISPLAY environment variable specified Jan 07 15:30:35 fedora systemd: thunderbird.service: Main process exited, code=exited, status=1/FAILURE Jan 07 15:30:35 fedora systemd: thunderbird.service: Failed with result 'exit-code'.
I’ve read through a few docs and done a google sweep and it’s all the usual level of irrelevant or incomprehensible. I cant find any info specifically relevant to systemd and just need to get this working before we have more problems
Can anyone advise the correct way to configure this?
PS yes I know I can just use a .desktop file to autostart it, but that wont auto restart and as I said, this a weird situation and half the problem is the user getting confused and closing things. I’m not looking for suggestions on how to create different problems going a different way, I’m after suggestions of solving this specific problem - this will do what I need if I fix this issue, and I’d like to know how to used systemd for this purpose going forward.