From 6c4563e281c78d27863b15274ad94d53fb92c7cb Mon Sep 17 00:00:00 2001 From: graysky Date: Mon, 25 Jun 2018 09:10:06 -0400 Subject: [PATCH] update readme --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4aa80b0..3bac65c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # kodi-standalone-service -A simple systemd service file to run kodi in standalone mode. +A systemd service unit to run [Kodi](https://kodi.tv/) in standalone mode without the need for a DE. ## Installation ### Arch Linux -Arch Linux users (not Arch ARM users) can find a PKGBUILD in the [AUR](https://aur.archlinux.org/packages/kodi-standalone-service) that will take care of everything. Simply install and use. +Arch Linux users can find a PKGBUILD in the [AUR](https://aur.archlinux.org/packages/kodi-standalone-service) 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: @@ -17,6 +20,8 @@ Users of other distros should copy `kodi.service` to `/usr/lib/systemd/system/` chown -R kodi:kodi /var/lib/kodi/.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: ``` @@ -28,7 +33,11 @@ systemctl start kodi * systemd * xorg-server with xorg-xinit -## Notes +## 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](https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/xbmc&id=9763c6d32678f3a3f45c195bfae92eee209d504f). + +## Tips and Tricks +### Service not starting Most users should not need `/etc/X11/Xwrapper.config` since the created X server becomes the [controlling process](http://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardInput=) 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: @@ -36,10 +45,9 @@ The recommendation is to first try starting `kodi.service` without it, but if th needs_root_rights = yes ``` -Users wishing to run the kodi web service on a privileged port (i.e. <1024) can simply modify `kodi.service` to contain the following line under the `[Service]` section: -`AmbientCapabilities=CAP_NET_BIND_SERVICE` - -If installing this manually, that should be all that's needed. If installing from the AUR, to avoid an overwrite, simply copy `kodi.service` (with the modified line) to `/etc/systemd/system` which will take president over the package-provided one. - -## Credit -Note that this service was provided by the Arch Linux maintainers of the official kodi package, but was removed upon the [1.16-1 release of Xorg](https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/xbmc&id=9763c6d32678f3a3f45c195bfae92eee209d504f). +### 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](https://wiki.archlinux.org/index.php/Systemd#Drop-in_files) modification as follows: +``` +[Service] +AmbientCapabilities=CAP_NET_BIND_SERVICE +```