back to user.slice
It seems that as long as the Kodi menu is used to call a shutdown or reboot, the services will allow the application to gracefully exit including saving settings, uptime etc. This will only NOT occur if the user calls the box to shutdown or reboot via a call to systemctl for the reasons cited in previous commits. While not optimal, it is consistent with the same thing happening if others users are logged into the box, working, and a sysadmin calls the systemctl to reboot. The result is users will lose work/data. Going back to the user.slice is better for USB mounts, and for pulseaudio sessions as well.
This commit is contained in:
parent
80d6d44698
commit
8c5d854a36
11
Makefile
11
Makefile
@ -4,23 +4,17 @@ PREFIX ?= /usr
|
|||||||
INITDIR = $(PREFIX)/lib/systemd/system
|
INITDIR = $(PREFIX)/lib/systemd/system
|
||||||
USERDIR = $(PREFIX)/lib/sysusers.d
|
USERDIR = $(PREFIX)/lib/sysusers.d
|
||||||
TMPFDIR = $(PREFIX)/lib/tmpfiles.d
|
TMPFDIR = $(PREFIX)/lib/tmpfiles.d
|
||||||
POLKDIR = $(PREFIX)/share/polkit-1/rules.d
|
|
||||||
|
|
||||||
RM = rm
|
RM = rm
|
||||||
INSTALL = install -p
|
INSTALL = install -p
|
||||||
INSTALL_DIR = $(INSTALL) -d
|
INSTALL_DIR = $(INSTALL) -d
|
||||||
INSTALL_PROGRAM = $(INSTALL) -m755
|
INSTALL_PROGRAM = $(INSTALL) -m755
|
||||||
INSTALL_DATA = $(INSTALL) -m644
|
INSTALL_DATA = $(INSTALL) -m644
|
||||||
INSTALL_POLK = $(INSTALL_DIR) -m750
|
|
||||||
|
|
||||||
common/$(PN):
|
common/$(PN):
|
||||||
@echo -e '\033[1;32mNothing to be done.\033[0m'
|
@echo -e '\033[1;32mNothing to be done.\033[0m'
|
||||||
@echo -e '\033[1;32mJust run make install as root.\033[0m'
|
@echo -e '\033[1;32mJust run make install as root.\033[0m'
|
||||||
|
|
||||||
install-common:
|
|
||||||
$(INSTALL_POLK) "$(DESTDIR)$(POLKDIR)"
|
|
||||||
$(INSTALL_DATA) polkit/10-kodi.rules "$(DESTDIR)$(POLKDIR)/10-kodi.rules"
|
|
||||||
|
|
||||||
install-init:
|
install-init:
|
||||||
$(INSTALL_DIR) "$(DESTDIR)$(INITDIR)"
|
$(INSTALL_DIR) "$(DESTDIR)$(INITDIR)"
|
||||||
$(INSTALL_DIR) "$(DESTDIR)$(USERDIR)"
|
$(INSTALL_DIR) "$(DESTDIR)$(USERDIR)"
|
||||||
@ -37,8 +31,7 @@ uninstall:
|
|||||||
$(RM) "$(DESTDIR)$(INITDIR)/kodi-x11.service"
|
$(RM) "$(DESTDIR)$(INITDIR)/kodi-x11.service"
|
||||||
$(RM) "$(DESTDIR)$(TMPFDIR)/kodi-standalone.conf"
|
$(RM) "$(DESTDIR)$(TMPFDIR)/kodi-standalone.conf"
|
||||||
$(RM) "$(DESTDIR)$(USERDIR)/kodi-standalone.conf"
|
$(RM) "$(DESTDIR)$(USERDIR)/kodi-standalone.conf"
|
||||||
$(RM) "$(DESTDIR)$(POLKDIR)/10-kodi.rules"
|
|
||||||
|
|
||||||
install: install-common install-init
|
install: install-init
|
||||||
|
|
||||||
.PHONY: install-common install-init uninstall
|
.PHONY: install-init uninstall
|
||||||
|
11
README.md
11
README.md
@ -20,15 +20,8 @@ For the kodi user to access devices on `/dev/ttyxxxx`, users will need to edit `
|
|||||||
### Other distros (manual installation)
|
### Other distros (manual installation)
|
||||||
Users of other distros can just run `make install` as the root user. Then, as the root user:
|
Users of other distros can just run `make install` as the root user. Then, as the root user:
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
* Run `systemd-sysusers`
|
* Run `systemd-sysusers`
|
||||||
* Run `systemd-tmpfiles --create`
|
* Run `systemd-tmpfiles --create`
|
||||||
* Run `udevadm control --reload-rules && udevadm trigger`
|
|
||||||
=======
|
|
||||||
* `init/*.service` to `/usr/lib/systemd/system/`
|
|
||||||
* `init/sysusers.conf` to `/usr/lib/sysusers.d/`, then run `systemd-sysusers`
|
|
||||||
* `init/tmpfiles.conf` to `/usr/lib/tmpfiles.d/`, then run `systemd-tmpfiles --create`
|
|
||||||
>>>>>>> parent of 34515c3 (Consistent behavior on a systemctl stop vs reboot)
|
|
||||||
|
|
||||||
Note that the kodi user's home directory is `/var/lib/kodi/` in this example, NOT `/home/kodi/` like a regular user.
|
Note that the kodi user's home directory is `/var/lib/kodi/` in this example, NOT `/home/kodi/` like a regular user.
|
||||||
|
|
||||||
@ -39,7 +32,6 @@ Simply [start/enable](https://wiki.archlinux.org/index.php/Systemd#Using_units)
|
|||||||
* kodi (x11 or wayland or gbm)
|
* kodi (x11 or wayland or gbm)
|
||||||
* libinput and cage (for running wayland)
|
* libinput and cage (for running wayland)
|
||||||
* libinput (for running gbm)
|
* libinput (for running gbm)
|
||||||
* polkit
|
|
||||||
* xorg-server and xorg-xinit (for running x11)
|
* xorg-server and xorg-xinit (for running x11)
|
||||||
|
|
||||||
## Passing environment variables to the service
|
## Passing environment variables to the service
|
||||||
@ -49,9 +41,6 @@ Should the need arise, one can pass environment variables to the service by crea
|
|||||||
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).
|
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
|
## Tips and Tricks
|
||||||
### Pulseaudio
|
|
||||||
Currently, users of pulseaudio will need configure it to run in [system mode](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/) to work with these service files.
|
|
||||||
|
|
||||||
### Service not starting
|
### 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.
|
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.
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ m kodi optical
|
|||||||
m kodi video
|
m kodi video
|
||||||
|
|
||||||
# other groups, see: /usr/lib/sysusers.d/arch.conf or basic.conf
|
# other groups, see: /usr/lib/sysusers.d/arch.conf or basic.conf
|
||||||
# m kodi network
|
# m kodi network
|
||||||
# m kodi power
|
# m kodi power
|
||||||
# m kodi tty
|
# m kodi tty
|
||||||
# m kodi disk
|
# m kodi disk
|
||||||
# m kodi storage
|
# m kodi storage
|
||||||
|
|
||||||
# uncomment the following line for Ubunutu users needing access to /etc/ttyxxxx
|
# uncomment the following line for Ubunutu users needing access to /etc/ttyxxxx
|
||||||
# https://github.com/graysky2/kodi-standalone-service/issues/14
|
# https://github.com/graysky2/kodi-standalone-service/issues/14
|
||||||
|
Loading…
Reference in New Issue
Block a user