diff --git a/README.md b/README.md index 3b1e4ec..6fdbfa6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # kodi-standalone-service Systemd service units to run [Kodi](https://kodi.tv/) in standalone mode without the need for a DE. X11, Wayland, and GBM are supported. -Which one to choose? Depends... +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](https://github.com/xbmc/xbmc/issues/14876). @@ -17,7 +17,7 @@ Users of ARM distros such as Arch ARM, Raspberry Pi OS (formerly Raspbian), etc. ### 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 +### Other distros (manual installation) Users of other distros should install the following files: * `init/*.service` to `/usr/lib/systemd/system/` @@ -31,10 +31,10 @@ Simply [start/enable](https://wiki.archlinux.org/index.php/Systemd#Using_units) ## Dependencies * kodi (x11 or wayland or gbm) -* polkit -* xorg-server and xorg-xinit (for running x11) * libinput and cage (for running wayland) * libinput (for running gbm) +* polkit +* 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. @@ -46,7 +46,7 @@ Much of the credit for this service goes to the Arch Linux maintainers of the of ### 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: +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 ``` diff --git a/init/kodi-gbm.service b/init/kodi-gbm.service index 52a907a..45778a4 100644 --- a/init/kodi-gbm.service +++ b/init/kodi-gbm.service @@ -12,11 +12,10 @@ SupplementaryGroups=input PAMName=login TTYPath=/dev/tty1 Environment=WINDOWING=gbm -ExecStart=/usr/bin/kodi-standalone +ExecStart=/usr/lib/kodi/kodi-gbm --standalone Restart=on-abort StandardInput=tty -StandardOutput=file:/var/log/kodi-gbm-standalone.log -StandardError=file:/var/log/kodi-gbm-standalone.log +StandardOutput=journal [Install] Alias=display-manager.service diff --git a/init/kodi-wayland.service b/init/kodi-wayland.service index 002701f..e05a50c 100644 --- a/init/kodi-wayland.service +++ b/init/kodi-wayland.service @@ -11,11 +11,11 @@ EnvironmentFile=-/etc/conf.d/kodi-standalone PAMName=login TTYPath=/dev/tty1 Environment=WINDOWING=wayland -ExecStart=/usr/bin/cage -- /usr/bin/kodi-standalone +ExecStart=/usr/bin/cage -- /usr/lib/kodi/kodi-wayland --standalone +ExecStop=/usr/bin/killall --user kodi --exact --wait kodi-wayland Restart=on-abort StandardInput=tty -StandardOutput=file:/var/log/kodi-wayland-standalone.log -StandardError=file:/var/log/kodi-wayland-standalone.log +StandardOutput=journal [Install] Alias=display-manager.service diff --git a/init/kodi.service b/init/kodi-x11.service similarity index 70% rename from init/kodi.service rename to init/kodi-x11.service index 3556db3..877929b 100644 --- a/init/kodi.service +++ b/init/kodi-x11.service @@ -11,12 +11,11 @@ EnvironmentFile=-/etc/conf.d/kodi-standalone PAMName=login TTYPath=/dev/tty1 Environment=WINDOWING=x11 -ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1 -ExecStop=/usr/bin/pkill kodi +ExecStart=/usr/bin/xinit /usr/lib/kodi/kodi-x11 --standalone -- :0 -quiet -nolisten tcp vt1 +ExecStop=/usr/bin/killall --user kodi --exact --wait kodi-x11 Restart=on-abort StandardInput=tty -StandardOutput=file:/var/log/kodi-x11-standalone.log -StandardError=file:/var/log/kodi-x11-standalone.log +StandardOutput=journal [Install] Alias=display-manager.service diff --git a/init/sysusers.conf b/init/sysusers.conf index 45798cc..a70df4d 100644 --- a/init/sysusers.conf +++ b/init/sysusers.conf @@ -1,6 +1,6 @@ # override these settings by copying this to /etc/sysusers.d/ and modifying it therein -#Type Name ID GECOS Home directory Shell +# Type Name ID GECOS Home directory Shell g kodi - - u kodi - "Kodi User" /var/lib/kodi diff --git a/init/tmpfiles.conf b/init/tmpfiles.conf index 615f016..a3d61ca 100644 --- a/init/tmpfiles.conf +++ b/init/tmpfiles.conf @@ -1,3 +1,3 @@ -#Type Path Mode User Group Age Argument +# Type Path Mode User Group Age Argument d /var/lib/kodi 0750 kodi kodi - - Z /var/lib/kodi - kodi kodi - -