All Projects → graysky2 → Kodi Standalone Service

graysky2 / Kodi Standalone Service

A systemd service to allow for standalone operation of kodi.

Projects that are alternatives of or similar to Kodi Standalone Service

Libreelec.tv
Just enough OS for KODI
Stars: ✭ 1,358 (+1536.14%)
Mutual labels:  makefile, kodi
Op Build
Buildroot overlay for Open Power
Stars: ✭ 82 (-1.2%)
Mutual labels:  makefile
Openwrt Kcptun
kcptun for OpenWrt
Stars: ✭ 80 (-3.61%)
Mutual labels:  makefile
Docker Trino Cluster
Multiple node presto cluster on docker container
Stars: ✭ 81 (-2.41%)
Mutual labels:  makefile
Awesome Blogdown
An awesome curated list of blogs built using blogdown
Stars: ✭ 80 (-3.61%)
Mutual labels:  makefile
Avrqueue
Queueing Library for AVR and Arduino
Stars: ✭ 81 (-2.41%)
Mutual labels:  makefile
Plugin.video.netflix
Inputstream based Netflix plugin for Kodi
Stars: ✭ 1,225 (+1375.9%)
Mutual labels:  kodi
Wiki
Archive of free60.org mediawiki
Stars: ✭ 83 (+0%)
Mutual labels:  makefile
Make Docker Command
Seamlessly execute commands (composer, bower, compass) in isolation using docker and make.
Stars: ✭ 82 (-1.2%)
Mutual labels:  makefile
Openwrt Simple Obfs
Simple-obfs for OpenWrt/LEDE
Stars: ✭ 81 (-2.41%)
Mutual labels:  makefile
Obs Gnome Screencast
GNOME Screen Cast OBS Studio plugin
Stars: ✭ 80 (-3.61%)
Mutual labels:  wayland
K8s Mediaserver Operator
Repository for k8s Mediaserver Operator project
Stars: ✭ 81 (-2.41%)
Mutual labels:  makefile
Dokku Wordpress
A simple repository that will guide you through deploying wordpress on dokku
Stars: ✭ 82 (-1.2%)
Mutual labels:  makefile
Vkmark
Vulkan benchmark
Stars: ✭ 80 (-3.61%)
Mutual labels:  wayland
Vala Object
Use Vala from Ruby, Python, Lua, JavaScript (Node.js, gjs, seed) and many other languages
Stars: ✭ 82 (-1.2%)
Mutual labels:  makefile
Freedom Tools
Tools for SiFive's Freedom Platform
Stars: ✭ 80 (-3.61%)
Mutual labels:  makefile
Corteza Docs
Documentation, manual, instructions
Stars: ✭ 81 (-2.41%)
Mutual labels:  makefile
Openwrt Vlmcsd
a package for vlmcsd
Stars: ✭ 81 (-2.41%)
Mutual labels:  makefile
Sqlite3 Android
SQLite CLI and Library build scripts for Android
Stars: ✭ 83 (+0%)
Mutual labels:  makefile
Sway
i3-compatible Wayland compositor
Stars: ✭ 9,854 (+11772.29%)
Mutual labels:  wayland

kodi-standalone-service

Systemd service units to run Kodi in standalone mode without the need for a DE. X11, Wayland, and GBM are supported.

Which one to choose?

In terms of functionality, X11 is probably the most mature and feature rich. Wayland is next in line and should be considered on-par with X11, however, a known limitation of Wayland is having the resolution and frame rate set in the compositor rather than in kodi's GUI. As well, Wayland currently does not support VT switching. GBM has some known features it lacks compared the X11 and Wayland. A complete list can be found in Kodi issue 14876.

Another factor that may affect choice is the number of dependencies required to run which will vary distro-to-distro.

Installation

Arch Linux

Arch Linux users can find a PKGBUILD in the AUR that will take care of everything. Simply install and use.

ARM distros

Users of ARM distros such as Arch ARM, Raspberry Pi OS (formerly Raspbian), etc. should NOT use these files since their official corresponding kodi packages supply their own version of a service. If you are knowledgeable enough with your distro, feel free to use/modify.

Ubuntu

For the kodi user to access devices on /dev/ttyxxxx, users will need to edit init/sysusers.conf and uncomment the line corresponding to enable membership in the dialout group.

Other distros (manual installation)

Users of other distros can just run make install as the root user. Then, as the root user:

  • Run systemd-sysusers
  • Run systemd-tmpfiles --create

Note that the kodi user's home directory is /var/lib/kodi/ in this example, NOT /home/kodi/ like a regular user.

Usage

Simply start/enable the requisite service.

Dependencies

  • kodi (x11 or wayland or gbm)
  • libinput and cage (for running wayland)
  • libinput (for running gbm)
  • xorg-server and xorg-xinit (for running x11)

Passing environment variables to the service

Should the need arise, one can pass environment variables to the service by creating /etc/conf.d/kodi-standalone and populating it with the needed variables.

Notes on system shutdown/reboot

Be aware that these services run Kodi in systemd's user.slice not in the system.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. Failure to do so will result in an ungraceful exit of Kodi and the saving of GUI settings, Kodi uptime etc. will not occur. 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 system.slice instead, doing so makes it difficult to use USB mounts within Kodi and to use pulseaudio for Kodi sessions.

Recommended methods to reboot/shutdown

Here are several options:

  • Select the corresponding option under Power menu in the Kodi GUI.
  • Use the official Android/iOS remote app.
  • If a CLI option is preferred, use kodi-send to issue a ShutDown() or Reboot like so:
$ kodi-send -a "Reboot"
$ kodi-send -a "ShutDown()"

Acknowledgments

Much of the credit for this service goes to the Arch Linux maintainers of the official kodi package. Note that they removed it upon the 1.16-1 release of Xorg.

Tips and Tricks

Service not starting

Most users should not need /etc/X11/Xwrapper.config since the created X server becomes the controlling process of the VT to which it is bound. Most users does not mean all users. There have been reports of some AMD users still requiring this file. As well, users of Xorg's native modesetting driver may also require it.

The recommendation is to first try starting kodi-x11.service without it, but if the service fails to start X, you may need to create /etc/X11/Xwrapper.config which should contain the following:

needs_root_rights = yes

Running Kodi web service on a privileged port

Users wishing to run the kodi web service on a privileged port (i.e. <1024) can simply use a systemd drop-in modification as follows:

[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].