.\" Text automatically generated by txt2man .TH kodi.service 1 "23 May 2021" "" "" .SH NAME \fBkodi-xxx.service \fP- Systemd service units to run Kodi in standalone mode without the need for a DE. \fB .SH DESCRIPTION Systemd service units to run kodi in standalone mode using X11, GBM, or Wayland. .PP Provided services are: .IP \(bu 3 /usr/lib/systemd/system/kodi-x11.service .IP \(bu 3 /usr/lib/systemd/system/kodi-gbm.service .IP \(bu 3 /usr/lib/systemd/system/kodi-wayland.service .SH NOTES ON SYSTEM SHUTDOWN/REBOOT Be aware that these services run Kodi in systemd's system.slice not in the user.slice. In order to have Kodi gracefully exit, the system should be called to shutdown or to reboot using the respective Kodi actions not by a call to systemctl. .PP This is NOT recommended: .PP .nf .fam C # systemctl reboot .fam T .fi If you do reboot or shutdown via a call to systemctl, this will result in systemd killing the cg too quickly and data loss to your Kodi profile will occur. When Kodi exits cleanly, it will save GUI settings, media settings, Kodi uptime etc. In principal this is no different than data loss occurring from a user doing work when a sysadmin issues a reboot command without prior warning. While it is possible to run Kodi in systemd's user.slice instead, doing so makes it difficult to use USB mounts within Kodi and to use pulseaudio for Kodi sessions. .SH RECOMMENDED METHODS TO SHUTDOWN/REBOOT Here are several options: .IP \(bu 3 Select the corresponding option under Power menu in the Kodi GUI. .IP \(bu 3 Use the official Android/iOS remote app. .IP \(bu 3 If a CLI option is preferred, use kodi-send to issue the command to reboot or shutdown like so: .PP .nf .fam C $ kodi-send -a "Reboot" $ kodi-send -a "ShutDown()" .fam T .fi Note that kodi-send may not be included with your Distro's kodi package. For example, on Arch Linux, it is provided by the kodi-eventclients package. .SH PASSING ENVIRONMENT VARIABLES TO THE SERVICE Certain use cases require environment variables to be passed to the service. Define these variables in /etc/conf.d/kodi-standalone and they will be passed along to the service. .SH CONTRIBUTE Users wishing to contribute to this code, should fork and send a pull request. Source is freely available on the project page linked below. .SH BUGS Discover a bug? Please open an issue on the project page linked below. .SH ONLINE Project page: https://github.com/graysky2/kodi-standalone-service .SH AUTHOR graysky (graysky AT archlinux DOT us)