Set X11 keyboard configuration according to /etc/default/keyboard values

This commit is contained in:
Alexander Grothe 2017-12-17 10:38:12 +01:00
parent 1405c73c87
commit 7b685ebe98
2 changed files with 49 additions and 0 deletions

View File

@ -1475,6 +1475,23 @@ b'\xde\xad\xbe\xef'
- "/etc/systemd/system/x@.service.d/"
- "/etc/systemd/system/vdr.service.d/"
- "/etc/systemd/system/user@{{ vdr.uid }}.service.d/"
- "/etc/X11/xorg.conf.d/"
- name: shell | write keyboard configuration from /etc/default/keyboard to /etc/X11/xorg.conf.d/00-keyboard.conf
shell: |
source /etc/default/keyboard
mkdir -p /etc/X11/xorg.conf.d/
cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<EOF
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "${XKBLAYOUT}"
Option "XkbModel" "${XKBMODEL}"
Option "XkbVariant" ",${XKBVARIANT}"
Option "XkbOptions" "${XKBOPTIONS}"
EndSection
EOF
- name: systemd-drop-in | add dependency to X-server for vdr.service
template:
@ -1491,6 +1508,11 @@ b'\xde\xad\xbe\xef'
src: templates/systemd/vdr-environ.j2
dest: /etc/systemd/system/vdr.service.d/load-environ.conf
- name: systemd-drop-in | start vdr.service after network-online.target
template:
src: templates/systemd/network-online.j2
dest: /etc/systemd/system/vdr.service.d/network-online.conf
- name: systemd-drop-in | user@{{ vdr.uid }}.service depends on x@vt7.service
template:
src: templates/user@666.service.d/x-dependency.conf.j2
@ -2090,6 +2112,11 @@ EndSection
Environment=XDG_RUNTIME_DIR=/run/user/{{ vdr.uid }}/
EnvironmentFile=-/var/lib/vdr/.session-env
#+END_SRC
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/systemd/network-online.j2
[Unit]
After=network-online.target
#+END_SRC
**** Systemd User Session
***** yavdr-desktop.target
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/systemd/user/yavdr-desktop.target.j2 :mkdirp yes :padline no

View File

@ -8,6 +8,23 @@
- "/etc/systemd/system/x@.service.d/"
- "/etc/systemd/system/vdr.service.d/"
- "/etc/systemd/system/user@{{ vdr.uid }}.service.d/"
- "/etc/X11/xorg.conf.d/"
- name: shell | write keyboard configuration from /etc/default/keyboard to /etc/X11/xorg.conf.d/00-keyboard.conf
shell: |
source /etc/default/keyboard
mkdir -p /etc/X11/xorg.conf.d/
cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<EOF
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "${XKBLAYOUT}"
Option "XkbModel" "${XKBMODEL}"
Option "XkbVariant" ",${XKBVARIANT}"
Option "XkbOptions" "${XKBOPTIONS}"
EndSection
EOF
- name: systemd-drop-in | add dependency to X-server for vdr.service
template:
@ -24,6 +41,11 @@
src: templates/systemd/vdr-environ.j2
dest: /etc/systemd/system/vdr.service.d/load-environ.conf
- name: systemd-drop-in | start vdr.service after network-online.target
template:
src: templates/systemd/network-online.j2
dest: /etc/systemd/system/vdr.service.d/network-online.conf
- name: systemd-drop-in | user@{{ vdr.uid }}.service depends on x@vt7.service
template:
src: templates/user@666.service.d/x-dependency.conf.j2