<div dir="ltr">On Sun, Oct 15, 2017 at 3:31 PM, Rajil Saraswat <span dir="ltr"><<a href="mailto:rajil.s@gmail.com" target="_blank">rajil.s@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/15/2017 11:42 AM, Rajil Saraswat wrote:<br>
> On 10/15/2017 03:55 AM, Jeff wrote:<br>
>> I've just documented my setup here:<br>
>><br>
>> <a href="https://www.mythtv.org/wiki/Raspberry_Pi#Autostart_MythTV_on_boot" rel="noreferrer" target="_blank">https://www.mythtv.org/wiki/<wbr>Raspberry_Pi#Autostart_MythTV_<wbr>on_boot</a><br>
>><br>
>> Regards<br>
>><br>
>> Jeff<br>
> I believe there are some shortcomings of this approach compared to<br>
> .xinitrc  which i use on my desktop documented here<br>
> <a href="https://dev.gentoo.org/%7Ecardoe/mythtv/autostart.html" rel="noreferrer" target="_blank">https://dev.gentoo.org/~<wbr>cardoe/mythtv/autostart.html</a><br>
><br>
> a) If frontend crashes, it will not respawn the frontend again. Also, if<br>
> i do an 'Exit Mythtv' in the frontend, it will not restart the frontend.<br>
> b) I have  autologin-user=pi set in /etc/lightdm.conf so on first-boot<br>
> it autologs me in. However, if X dies (say killall Xorg), then it doesnt<br>
> autologin instead shows up the login/passwd input box.<br>
><br>
> It is not idiot proof yet :)<br>
><br>
> Any comments?<br>
><br>
> Thanks<br>
<br>
I decided to use console based auto-login instead of graphics login.<br>
Enabled autologin first using:<br>
<br>
systemctl set-default multi-user.target<br>
sed /etc/systemd/system/autologin@<wbr>.service -i -e<br>
"s#^ExecStart=-/sbin/agetty --autologin<br>
[^[:space:]]*#ExecStart=-/<wbr>sbin/agetty --autologin pi#"<br>
ln -fs /etc/systemd/system/autologin@<wbr>.service<br>
/etc/systemd/system/getty.<wbr>target.wants/getty@tty1.<wbr>service<br>
<br>
and then followed the instructions below. You need to replace tty8 with<br>
tty1 for RPI.<br>
<br>
<a href="https://dev.gentoo.org/%7Ecardoe/mythtv/autostart.html" rel="noreferrer" target="_blank">https://dev.gentoo.org/~<wbr>cardoe/mythtv/autostart.html</a><br>
<br></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">I opted to go with ratpoison since I will never run anything on a local TV except Myth, so no heavy GUI needed.</div><div class="gmail_extra"><br></div>cat .xinitrc <br><div class="gmail_extra"># The black/white grid as background doesn't suit my taste.<br>xsetroot -solid black &<br>exec /usr/bin/ratpoison<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">cat .ratpoisonrc<br>exec xset -dpms<br>exec xset s off<br>exec while true ; do mythfrontend >/home/greg/mythfrontend.log 2>&1 ; sleep 5; done<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">cat /etc/systemd/system/getty@tty1.service.d/override.conf<br>[Service]<br>ExecStart=<br>ExecStart=-/usr/bin/agetty --autologin greg --noclear %I \$TERM<br><br></div><div class="gmail_extra"></div><div class="gmail_extra">I have a button mapped with irexec that `kills` mythfrontend if I need it to.  It starts right back up because of the while loop in ratpoison..</div><div class="gmail_extra"><br></div><div class="gmail_extra">Of course if you ever need to debug mythfrontend (I do it on another machine), you need to obviously change the bottom line..</div><div class="gmail_extra"><br></div><div class="gmail_extra">-Greg<br></div></div>