[mythtv-users] Starting mythfrontend with systemd?

Darac Marjal mailinglist at darac.org.uk
Thu Oct 5 14:31:59 UTC 2017

On Thu, Oct 05, 2017 at 07:57:45AM -0500, Richard Shaw wrote:
>   On Thu, Oct 5, 2017 at 3:44 AM, Darac Marjal <[1]mailinglist at darac.org.uk> wrote:
>     The following should be a suitable start:
>             [Unit]
>             Description=the open source DVR, MythTV
>             After=graphical-session.target
>             BindsTo=graphical-session.target
>             [Service]
>             Environment=DISPLAY=%i
>             ExecStart=/usr/bin/mythfrontend
>             [Install]
>             WantedBy=graphical-session.target
>     This should start mythtv when you log in (WantedBy) and kill mythtv when you log out (BindsTo). Save this as
>     /etc/systemd/system/mythtv at .service, then run "systemctl enable mythtv@:0.service" for display :0.
>     All information cadged from [2]https://bitbucket.org/KaiSforza/systemd-user-units/wiki/X-Applications
>   That's pretty cool but I have two questions...
>   This will start mythfrontend for ALL users, not just a specific one right? 
>   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...

Good point. Save the file to ~/.config/systemd/user/mythtv at .service

>   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.

Yes. After mythbackend probably makes more sense than after mysql, as 
mythbackend probably won't come ready until it has access to the 

>   Thanks,
>   Richard
>   Visible links
>   1. mailto:mailinglist at darac.org.uk
>   2. https://bitbucket.org/KaiSforza/systemd-user-units/wiki/X-Applications

>mythtv-users mailing list
>mythtv-users at mythtv.org
>MythTV Forums: https://forum.mythtv.org

For more information, please reread.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 906 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20171005/59140bf2/attachment.sig>

More information about the mythtv-users mailing list