From 566e8425b3e3f704dd6761c9f0abfeb16b527d3d Mon Sep 17 00:00:00 2001 From: graysky Date: Mon, 29 Apr 2019 10:38:00 -0400 Subject: [PATCH] updates for gbm service --- MIT | 2 +- README.md | 20 +++++++++++++------- init/kodi.service | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/MIT b/MIT index 62d0916..dd3ffbb 100644 --- a/MIT +++ b/MIT @@ -1,4 +1,4 @@ -Copyright (c) 2014-2018 graysky +Copyright (c) 2014-2019 graysky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index d110a6f..d3c3584 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # kodi-standalone-service -A systemd service unit to run [Kodi](https://kodi.tv/) in standalone mode without the need for a DE. +Systemd service units to run [Kodi](https://kodi.tv/) in standalone mode without the need for a DE. Both X11 and GBM are supported (makes little sense to use Wayland in standalone mode). ## Installation ### Arch Linux @@ -9,10 +9,10 @@ Arch Linux users can find a PKGBUILD in the [AUR](https://aur.archlinux.org/pack 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: +Users of other distros should copy `kodi.service` and `kodi-gbm.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 - + useradd -c 'kodi user' -u 420 -g kodi -G audio,video,network,optical -d /var/lib/kodi -s /usr/bin/nologin kodi + passwd -l kodi > /dev/null mkdir /var/lib/kodi @@ -22,15 +22,21 @@ Users of other distros should copy `kodi.service` to `/usr/lib/systemd/system/` 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: +Simply call the requisite service to start, for kodi-x11: ``` systemctl start kodi ``` +Or for kodi-gbm: +``` +systemctl start kodi-gbm +``` ## Dependency List +* kodi (x11 or gbm) * polkit -* systemd -* xorg-server with xorg-xinit + +* xorg-server and xorg-xinit (for running x11) +* libinput (for running gbm) ## 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). diff --git a/init/kodi.service b/init/kodi.service index 0438516..a0dc268 100644 --- a/init/kodi.service +++ b/init/kodi.service @@ -1,5 +1,5 @@ [Unit] -Description=Kodi standalone +Description=Kodi standalone (X11) After=systemd-user-sessions.service network-online.target sound.target mysqld.service Requires=network-online.target Conflicts=getty@tty1.service