<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 5, 2017 at 3:44 AM, Darac Marjal <span dir="ltr"><<a href="mailto:mailinglist@darac.org.uk" target="_blank">mailinglist@darac.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The following should be a suitable start:<br>
<br>
[Unit]<br>
Description=the open source DVR, MythTV<br>
After=graphical-session.target<br>
BindsTo=graphical-session.targ<wbr>et<br>
<br>
[Service]<br>
Environment=DISPLAY=%i<br>
ExecStart=/usr/bin/mythfronten<wbr>d<br>
<br>
[Install]<br>
WantedBy=graphical-session.tar<wbr>get<br>
<br>
This should start mythtv when you log in (WantedBy) and kill mythtv when you log out (BindsTo). Save this as /etc/systemd/system/mythtv@.se<wbr>rvice, then run "systemctl enable mythtv@:0.service" for display :0.<br>
<br>
All information cadged from <a href="https://bitbucket.org/KaiSforza/systemd-user-units/wiki/X-Applications" rel="noreferrer" target="_blank">https://bitbucket.org/KaiSforz<wbr>a/systemd-user-units/wiki/X-<wbr>Applications</a></blockquote><div><br></div><div>That's pretty cool but I have two questions...</div><div><br></div><div>This will start mythfrontend for ALL users, not just a specific one right? </div><div><br></div><div>I have a "mythuser" login and use the session preferences to start the frontend which always works for me so luckily I don't have this problem... I wouldn't want mythfrontend to load if I login as another user...</div><div><br></div><div>Wouldn't you want to add mythbackend to the "After" command? I know there's still issues with it not necessarily being ready to accept connections even if systemd thinks it's up, but it could help.</div><div><br></div><div>Thanks,</div><div>Richard</div></div></div></div>