diff --git a/README.md b/README.md index a6f432a..75d1622 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,36 @@ Another factor that may affect choice is the number of dependencies required to ## Installation ### Arch Linux -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 Linux users (likely users of Arch clones) 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. -### 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: -### 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` +* `systemd-sysusers` +* `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. +#### Notes for users of non-Arch Linux distros +1. Arch Linux ships three discrete Kodi packages, each providing a different Kodi executable (`kodi-x11`, `kodi-wayland`, and `kodi-gbm`) but other distros may not do this and may ship a combined Kodi binary (called `kodi.bin`). If your distro ships `kodi.bin` rather than the discrete executables you must adjust the name of the Kodi executable in the `ExecStop=` line accordingly. Failure to do so will result in Kodi getting killed before it can perform exit tasks and can result in data loss to your profile. + +Do this modification using a [systemd drop-in](https://wiki.archlinux.org/title/Systemd#Drop-in_files). + +Example: +``` +# systemctl edit kodi-x11 + +<< you are creating a drop-in >> + +[Service] +ExecStop= +ExecStop=/usr/bin/killall --user kodi --exact --wait kodi.bin +``` + +2. Users of Ubuntu ≥20.0 will need to copy the contents of [sysusers.conf](https://github.com/graysky2/kodi-standalone-service/blob/master/x86/init/sysusers.conf) to `/etc/sysusers.d/kodi.conf` and uncomment the line adding kodi user to the `render` group. + +3. Users of Ubuntu wishing the kodi user to access devices on `/dev/ttyxxxx`, will need to copy the contents of [sysusers.conf](https://github.com/graysky2/kodi-standalone-service/blob/master/x86/init/sysusers.conf) to `/etc/sysusers.d/kodi.conf` and uncomment the line adding the kodi user to the `dialout` group. + ## Usage Simply [start/enable](https://wiki.archlinux.org/index.php/Systemd#Using_units) the requisite service. @@ -43,7 +60,7 @@ 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: +* If a CLI option is preferred, use `kodi-send` to issue a `Reboot` or `ShutDown()` like so: ``` $ kodi-send -a "Reboot" $ kodi-send -a "ShutDown()" diff --git a/x86/init/sysusers.conf b/x86/init/sysusers.conf index fee3f3d..ea3148f 100644 --- a/x86/init/sysusers.conf +++ b/x86/init/sysusers.conf @@ -16,6 +16,11 @@ m kodi video # m kodi disk # m kodi storage -# uncomment the following line for Ubunutu users needing access to /etc/ttyxxxx +# Ubuntu users only +# uncomment the following line if the kodi user needs access to /etc/ttyxxxx # https://github.com/graysky2/kodi-standalone-service/issues/14 # m kodi dialout + +# uncomment the following line if you're running Ubuntu >=20 since they created +# a new render group of which the kodi user needs to be a member +# m kodi render