retroarch-standalone-service/README.md

46 lines
2.2 KiB
Markdown
Raw Normal View History

2014-11-05 21:24:29 +01:00
# kodi-standalone-service
A simple systemd service file to run kodi in standalone mode.
2017-03-09 20:52:05 +01:00
## 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.
### 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 -c 'kodi user' -u 420 -g kodi -G audio,video,network,optical \
2017-05-28 19:50:56 +02:00
-d /var/lib/kodi -s /usr/bin/nologin kodi
passwd -l kodi > /dev/null
2017-03-09 20:52:05 +01:00
mkdir /var/lib/kodi/.kodi
chown -R kodi:kodi /var/lib/kodi/.kodi
```
## Usage
Simply call systemd to start the service:
```
systemctl start kodi
```
2014-11-05 21:24:29 +01:00
## Dependency List
2015-05-27 22:53:54 +02:00
* polkit
2014-11-05 21:24:29 +01:00
* systemd
* xorg-server with xorg-xinit
2017-08-28 22:17:52 +02:00
## Notes
2018-01-12 14:38:37 +01:00
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.
2017-03-09 20:52:05 +01:00
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
```
2015-01-01 19:33:28 +01:00
2017-08-28 22:17:52 +02:00
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.
2014-11-05 21:24:29 +01:00
## Credit
2017-03-04 14:46:48 +01:00
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).