<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Ian and Stephen,</div><div><br></div><div>You guys were busy as I slept so I am creating a single response.</div><div><br></div><div>As to what I am running this is what I know</div><div><br></div><div><div><b>dad@NewMyth:~$ lsb_release -a</b></div><div><b>No LSB modules are available.</b></div><div><b>Distributor ID: Ubuntu</b></div><div><b>Description:    Ubuntu 16.04.1 LTS</b></div><div><b>Release:        16.04</b></div><div><b>Codename:       xenial</b></div></div><div><br></div><div><br></div><div><div><b>dad@NewMyth:~$ apt-cache policy mythtv</b></div><div><b>mythtv:</b></div><div><b>  Installed: 2:0.28.2+fixes.20180827.9031599-0ubuntu0mythbuntu2</b></div><div><b>  Candidate: 2:0.28.2+fixes.20180827.9031599-0ubuntu0mythbuntu2</b></div><div><b>  Version table:</b></div><div><b> *** 2:0.28.2+fixes.20180827.9031599-0ubuntu0mythbuntu2 500</b></div><div><b>        500 <a href="http://ppa.launchpad.net/mythbuntu/0.28/ubuntu" target="_blank">http://ppa.launchpad.net/mythbuntu/0.28/ubuntu</a> xenial/main i386 Packages</b></div><div><b>        100 /var/lib/dpkg/status</b></div><div><b>     2:0.28.0+fixes.20160413.15cf421-0ubuntu2 500</b></div><div><b>        500 <a href="http://us.archive.ubuntu.com/ubuntu" target="_blank">http://us.archive.ubuntu.com/ubuntu</a> xenial/multiverse i386 Packages</b></div></div><div><br></div><div><br></div><div>And to Ian's question:</div><div><br></div><div><b>dad@NewMyth:~$ ls -la /home/dad/.config/autostart</b></div><div><b>total 16</b></div><div><b>drwxrwxr-x  2 dad dad 4096 Oct 14 09:22 .</b></div><div><b>drwxrwxr-x 12 dad dad 4096 Feb 24 17:14 ..</b></div><div><b>lrwxrwxrwx  1 dad dad   38 Aug 25  2018 mythtv.desktop -> /usr/share/applications/mythtv.desktop</b></div><div><b>-rw-rw-r--  1 dad dad   30 Oct 14 09:19 pulseaudio.desktop</b></div><div><b>-rw-rw-r--  1 dad dad   29 Oct 14 09:22 xfsettingsd.desktop</b></div><div><br></div><div><font color="#a64d79"><br></font></div><div><font color="#a64d79">I must say, I did think your solution of killing mythfrontend via the remote to be a good and elegant one.  Given that a remote is nearly always to hand, it's about as user-friendly as it could be.  So far, we have gone down this rabbit hole a bit - the question now is whether to go further down it or give up...</font></div><div><br></div><div>For a number of reasons having to do with what we are used to, the difficulty of programming and using the remote, and the unknowns of changing the lirc code, I prefer to continue on the CTRL-ALT-BS question as I think we are very close to a solution with all the thought you two have put into this. It could also be of benefit to others if a good solution is found.</div><div><br></div><div><font color="#a64d79">ultimately suggest running mythfrontend without the --service option</font></div><div><br></div><div>If Myth is being run by that script from 2007 that doesn't even run correctly I must ask does myth still crash often enough that the auto restart is necessary?  This seems like a super easy solution unless the underlying program crashes constantly. BTW, I tested it and it works.</div><div><br></div><div>Of course, I may not know if this script is restarting myth but I doubt it as we can see that it does't work.  The crashes I get of myth are freeze up.  Still possible I would not know but worth thought as if the script really is 12 years old then perhaps it is solving a problem that is no longer a problem.</div><div><br></div><div><font color="#a64d79">Clicking on the Edit button reveals that this runs:</font></div><div><b><font color="#a64d79">  mythfrontend --service</font></b></div><div><font color="#a64d79">  </font></div><div>Correct. What is your opinion on how important the --service is at this point? That script is really old if the comments are correct.</div><div><br></div><div>If the --service option is necessary am I correct that the suggestion is to change this line</div><div><br></div><div><b>pidof mythfrontend.real 2>&1 >/dev/null && wmctrl -a "MythTV Frontend" 2>/dev/null && exit 0</b></div><div><br></div><div>To this </div><div><br></div><div><b>pidof mythfrontend.real 2>&1 >/dev/null</b></div><div><b>pidof_retcode=$?</b></div><div><b>if [ $pidof_retcode==0 ]; then</b></div><div><b>  wmctrl -a "MythTV Frontend" 2>/dev/null</b></div><div><b>  wmctrl_retcode=$?</b></div><div><b>else</b></div><div><b>  wmctrl_retcode=1</b></div><div><b>fi</b></div><div><b>if [ pidof_retcode==0 || wmctrl_retcode==0 ]; then</b></div><div><b>  exit 0</b></div><div><b>fi</b></div><div><br></div><div>By the way, <b>pidof mythfrontend.real </b>returns 3524 (the pid) and <b>wmctrl -a "MythTV Frontend"  </b>doesn't return anything at least on a terminal but I think that is normal.</div><div><br></div><div>What I think is going on is that X closes mythfrontend.real but does not close the service.  Then when X opens again and checks if myth is running the service has not had time to get its version of myth running so the pid returns null or 0. This happens so fast and all the services start versions of myth before the pid is valid. One key is that when I do CTRL-ALT-BS I don't always get a new instance, just 80-90% of the time.  This says to me there is a timing component to the problem.  My computer is much faster with the new RAM and my guess is that mostly all the services are busy starting an instance of myth before a pid is established. Perhaps what is needed as the first line of the script is a delay.</div><div><br></div><div>I will test the proposed script changes when I hear from you that I understand it correctly and continue to think it is a good idea. Until then, I am running mythfrontend without the service option. My gut says that is the best solution anyway.   That script is just too old. I don't trust it and doubt that it is necessary any longer.<br></div><div><br></div><div>Allen</div><div><br></div></div></div></div></div>