[Xastir] Xastir on Mint Festival as service
vk2tv
vk2tv at exemail.com.au
Sun Oct 27 14:03:26 PDT 2019
My understanding of systemd (for Debian based systems) is that the (user
generated) service file is installed to
/etc/system.d/system/<name>.service and the system creates the symlink
to /usr/lib/systemd/ when the service is enabled.
To enable a service use sudo systemctl start <name>.service
To stop a service use sudo systemctl stop <name>.service
To check the status of a service use sudo systemctl status <name>.service
To have a service start on boot use sudo systemctl enable <name>.service
(this action creates the symlink to usr/lib/systemd/), and to prevent a
service starting at boot use
sudo systemctl disable <name>service (this drops the symlink). You may
have to stop the service first, and then disable it.
I found (still find!) systemd confusing, and initially I put the
<name>.service file in /usr/lib/systemd/ and it wouldn't run (this was
on Debian; non-Debian distros may handle this differently). After moving
the service file to /etc/system.d/system/<name>.service and invoking
sudo systemctl enable <name>.service the service file functioned
correctly. YMMV
HTH
Ray vk2tv
On 28/10/19 2:02 am, wa7skg wrote:
>
>
> Ken Koster wrote on 10/25/19 6:00 PM:
>> On Thursday, October 24, 2019 1:29:11 PM PDT wa7skg wrote:
>>
>> > New subject. Got Xastir working and a few issues remain.
>> Apparently, on
>>
>> > restart or whatever, I need to open a terminal and start the festival
>>
>> > server. Then I have to start Xastir in the terminal. Is it
>> possible to
>>
>> > have festival start when the computer starts?
>> I'm not familiar with mint but on my systems (openSUSE) festival is
>> started by a systemd service file.
>>
>> I've included mine below and it should work on mint but I make no
>> guarantees.
>>
>> Copy the below into a file called festival.service
>>
>> On openSUSE service files are in /usr/lib/systemd/system. Your
>> mileage may vary.
>>
>> Enable with: sudo systemctl enable festival
>>
>> Start with: sudo systemctl start festival.
>>
>> --------------cut here-----------
>>
>> [Unit]
>>
>> Description=festival daemon providing full text-to-speech system
>>
>> After=remote-fs.target
>>
>> After=time-sync.target
>>
>> Wants=remote-fs.target
>>
>> [Service]
>>
>> Type=forking
>>
>> Restart=no
>>
>> TimeoutSec=5min
>>
>> IgnoreSIGPIPE=no
>>
>> KillMode=process
>>
>> GuessMainPID=no
>>
>> RemainAfterExit=yes
>>
>> SuccessExitStatus=5 6
>>
>> ExecStart=/usr/lib/festival/server start
>>
>> ExecStop=/usr/lib/festival/server stop
>>
>> ExecReload=/usr/lib/festival/server reload
>>
>> [Install]
>>
>> WantedBy=multi-user.target
>>
>> --------------cut here-----------
>>
>> --
>>
>> Ken - N7IPB
>
> I gave this a go with poor results. From what I deduce, the service
> files are in /lib/systemd/system/festival.service, with a link at
> /etc/systemd/system/. I created the festival.service file per your
> suggestion.
>
> So I have:
>
> michael at Desk4:~$ ll /etc/systemd/system/festival.service
> lrwxrwxrwx 1 root root 36 Oct 27 07:25
> /etc/systemd/system/festival.service ->
> /lib/systemd/system/festival.service
> michael at Desk4:~$ ll /lib/systemd/system/festival.service
> -rw-r--r-- 1 root root 467 Oct 27 07:17
> /lib/systemd/system/festival.service
> michael at Desk4:~$
>
>
> Then I tried your suggestions:
>
> michael at Desk4:~$ sudo systemctl enable festival
> Created symlink
> /etc/systemd/system/multi-user.target.wants/festival.service →
> /lib/systemd/system/festival.service.
>
> michael at Desk4:~$ sudo systemctl start festival
> Job for festival.service failed because the control process exited
> with error code.
> See "systemctl status festival.service" and "journalctl -xe" for details.
>
>
> michael at Desk4:~$ systemctl status festival.service
> ● festival.service - festival daemon providing full text-to-speech system
> Loaded: loaded (/lib/systemd/system/festival.service; enabled;
> vendor preset: enabled)
> Active: failed (Result: exit-code) since Sun 2019-10-27 07:27:13
> PDT; 21s ago
> Process: 7955 ExecStart=/usr/lib/festival/server start (code=exited,
> status=203/EXEC)
>
> Oct 27 07:27:13 Desk4 systemd[1]: Starting festival daemon providing
> full text-to-speech system...
> Oct 27 07:27:13 Desk4 systemd[7955]: festival.service: Failed to
> execute command: No such file or directory
> Oct 27 07:27:13 Desk4 systemd[7955]: festival.service: Failed at step
> EXEC spawning /usr/lib/festival/server: No such file or directory
> Oct 27 07:27:13 Desk4 systemd[1]: festival.service: Control process
> exited, code=exited status=203
> Oct 27 07:27:13 Desk4 systemd[1]: festival.service: Failed with result
> 'exit-code'.
> Oct 27 07:27:13 Desk4 systemd[1]: Failed to start festival daemon
> providing full text-to-speech system.
> michael at Desk4:~$
>
>
> michael at Desk4:~$ journalctl -xe
> Oct 27 07:19:45 Desk4 sudo[7862]: pam_unix(sudo:session): session
> closed for user root
> Oct 27 07:22:12 Desk4 sudo[7879]: michael : TTY=pts/0 ;
> PWD=/home/michael ; USER=root ; COMMAND=/bin/ln -s
> /etc/systemd/system/ /lib/systemd/sys
> Oct 27 07:22:12 Desk4 sudo[7879]: pam_unix(sudo:session): session
> opened for user root by michael(uid=0)
> Oct 27 07:22:12 Desk4 sudo[7879]: pam_unix(sudo:session): session
> closed for user root
> Oct 27 07:25:17 Desk4 sudo[7904]: michael : TTY=pts/0 ;
> PWD=/home/michael ; USER=root ; COMMAND=/bin/ln -s
> /lib/systemd/system/festival.service
> Oct 27 07:25:17 Desk4 sudo[7904]: pam_unix(sudo:session): session
> opened for user root by michael(uid=0)
> Oct 27 07:25:17 Desk4 sudo[7904]: pam_unix(sudo:session): session
> closed for user root
> Oct 27 07:26:04 Desk4 sudo[7909]: michael : TTY=pts/0 ;
> PWD=/home/michael ; USER=root ; COMMAND=/bin/systemctl enable festival
> Oct 27 07:26:04 Desk4 sudo[7909]: pam_unix(sudo:session): session
> opened for user root by michael(uid=0)
> Oct 27 07:26:04 Desk4 systemd[1]: Reloading.
> Oct 27 07:26:04 Desk4 sudo[7909]: pam_unix(sudo:session): session
> closed for user root
> Oct 27 07:27:13 Desk4 sudo[7952]: michael : TTY=pts/0 ;
> PWD=/home/michael ; USER=root ; COMMAND=/bin/systemctl start festival
> Oct 27 07:27:13 Desk4 sudo[7952]: pam_unix(sudo:session): session
> opened for user root by michael(uid=0)
> Oct 27 07:27:13 Desk4 systemd[1]: Starting festival daemon providing
> full text-to-speech system...
> -- Subject: Unit festival.service has begun start-up
> -- Defined-By: systemd
> -- Support: http://www.ubuntu.com/support
More information about the Xastir
mailing list