Commit 722b5976 authored by nimrod's avatar nimrod
Browse files

Kodi: Use GBM and some updates.

Use GBM and remove X.org. Some small updates too.
parent 0bbf773e
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
# vim: filetype=systemd
[Unit]
Description=Kodi Media Center on %i
After=systemd-user-sessions.service sound.target network-online.target xorg.service
After=systemd-user-sessions.service sound.target network-online.target

# Require the library to be mounted.
After=srv-library.mount
@@ -18,8 +18,11 @@ User=kodi
PAMName=login
SupplementaryGroups=audio
SupplementaryGroups=cdrom
SupplementaryGroups=input
SupplementaryGroups=render
SupplementaryGroups=video
Environment="DISPLAY=:0"
ExecStart=flatpak run --device=all --share=network --filesystem=/etc/group --filesystem=/srv/library tv.kodi.Kodi --standalone --windowing=x11 -fs
ExecStart=flatpak run --device=all --share=network --filesystem=/etc/group --filesystem=/srv/library tv.kodi.Kodi --standalone --windowing=gbm -fs
Type=simple
Restart=always
RestartSec=5
+0 −44
Original line number Diff line number Diff line
# vim: filetype=systemd
[Unit]
Description=X Windows display server
After=systemd-user-sessions.service

# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
After=dbus.socket

Conflicts=getty@tty7.service
Before=graphical.target

# On systems without virtual consoles, don't start
ConditionPathExists=/dev/tty7

[Service]
User=kodi
SupplementaryGroups=input
SupplementaryGroups=tty
SupplementaryGroups=video
PAMName=login
ExecStart=startx
Type=simple
Restart=on-abort
RestartSec=5
KillMode=control-group

# A virtual terminal is needed.
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

# Fail to start if not controlling the tty.
StandardOutput=tty
StandardInput=tty
StandardError=journal

# Log this user with utmp, letting it show up with commands 'w' and 'who'.
UtmpIdentifier=tty7
UtmpMode=user

[Install]
WantedBy=graphical.target
+1 −17
Original line number Diff line number Diff line
@@ -12,9 +12,7 @@
      - plymouth-themes
      - firmware-linux
      - udisks2
      - unison
      - upower
      - xorg
    state: present
    update_cache: true

@@ -32,8 +30,7 @@
- name: Enable boot splash
  ansible.builtin.lineinfile:
    backup: true
    # yamllint disable-line rule:line-length
    line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"
    line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    path: /etc/default/grub
  notify:
    - Update GRUB
@@ -86,29 +83,16 @@
    system: true
    uid: '{{ 900 + idx }}'
  notify:
    - Restart Xorg
    - Restart Kodi

- name: Configure rootless Xorg
  ansible.builtin.copy:
    backup: true
    content: |
      allowed_users=anybody
    dest: /etc/X11/Xwrapper.config
    mode: 0o0644
  notify:
    - Restart Xorg

- name: Copy services
  with_items: &services
    - xorg.service
    - kodi.service
  ansible.builtin.copy:
    dest: /etc/systemd/system/
    mode: preserve
    src: '{{ item }}'
  notify:
    - Restart Xorg
    - Restart Kodi

- name: Enable services