[mythtv-users] Starting mythfrontend with systemd?

Ian Evans dheianevans at gmail.com
Thu Oct 5 15:06:43 UTC 2017


On Thu, Oct 5, 2017 at 10:31 AM, Darac Marjal <mailinglist at darac.org.uk>
wrote:

> 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/KaiSf
>> orza/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 database.
>
>   Thanks,
>>   Richard
>>
>> References
>>
>>   Visible links
>>   1. mailto:mailinglist at darac.org.uk
>>   2. https://bitbucket.org/KaiSforza/systemd-user-units/wiki/X-
>> Applications
>
>
So how do you say after mythbackend? Is it mythbackend.service?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20171005/8dd02648/attachment.html>


More information about the mythtv-users mailing list