Code Monkey home page Code Monkey logo

kodi-standalone-service's Introduction

kodi-standalone-service

A systemd service unit to run Kodi in standalone mode without the need for a DE.

Installation

Arch Linux

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

Arch ARM

Users of Arch ARM should NOT use this method as the distro package provides analogous functionality.

Other distros

Users of other distros should copy kodi.service to /usr/lib/systemd/system/ and should create both a kodi user and home directory as follows:

 useradd -u 420 -U -G audio,video -d /var/lib/kodi -s /usr/bin/nologin kodi
 
 passwd -l kodi > /dev/null

 mkdir /var/lib/kodi
 chown -R kodi:kodi /var/lib/kodi

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

Usage

Simply call systemd to start the service:

systemctl start kodi

Dependency List

  • polkit
  • systemd
  • xorg-server with xorg-xinit

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.