Use yavdr-xorg to control xlogin@vdr.service and x@vt7.service

This commit is contained in:
Alexander Grothe 2018-04-24 09:56:29 +02:00
parent a330dd00a2
commit 96d2cc9a08
6 changed files with 521 additions and 470 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1302,7 +1302,7 @@ ctl.!default {
#+END_SRC #+END_SRC
** yavdr-xorg ** yavdr-xorg
*** About the GUI session *** About the GUI session
The X-Server is started by using the two systemd units ~xlogin@.service~ and ~x@.service~ provided by the package *xlogin*. The former is enabled (and started) for the vdr user - which results (using the default settings for the user *vdr* with the uid *666*) in the activation of ~xlogin@vdr.service~ when reaching the graphical.target. The X-Server is started by using the two systemd units ~xlogin@.service~ and ~x@.service~ provided by the package *xlogin*. The former is enabled (and started) for the vdr user - which results (using the default settings for the user *vdr* with the uid *666*) in the activation of ~xlogin@vdr.service~ when reaching the graphical.target. To simplify starting and stopping the X-server and the desktop session a ~yavdr-xorg.service~ is provided by the package ~yavdr-xorg~, which depends on the two units mentioned before.
~x@vt7.service~ is started automatically as a dependency of ~xlogin@vdr.service~ and starts the X-server. ~xlogin@vdr.service~ also starts a systemd user session using ~user@666.service~. ~x@vt7.service~ is started automatically as a dependency of ~xlogin@vdr.service~ and starts the X-server. ~xlogin@vdr.service~ also starts a systemd user session using ~user@666.service~.
In order to use the keyboard layout configured during installation for the X-Server the script ~write-x11-keyboard-config~ reads the keyboard configuration from ~/etc/default/keyboard~ when starting ~x@.service~ and writes the file ~/etc/X11/xorg.conf.d/00-keyboard.conf~ (because systemd for Ubuntu (and Debian) has been patched not to create ~/etc/X11/xorg.conf.d/00-keyboard.conf~ according to the ~localectl~ settings). In order to use the keyboard layout configured during installation for the X-Server the script ~write-x11-keyboard-config~ reads the keyboard configuration from ~/etc/default/keyboard~ when starting ~x@.service~ and writes the file ~/etc/X11/xorg.conf.d/00-keyboard.conf~ (because systemd for Ubuntu (and Debian) has been patched not to create ~/etc/X11/xorg.conf.d/00-keyboard.conf~ according to the ~localectl~ settings).
@ -1779,6 +1779,7 @@ first_run: False
state: present state: present
with_items: with_items:
- xlogin - xlogin
- yavdr-xorg
- xorg - xorg
- xserver-xorg-input-all - xserver-xorg-input-all
- xserver-xorg-video-all - xserver-xorg-video-all
@ -1854,6 +1855,13 @@ first_run: False
enabled: yes enabled: yes
notify: ['Start VDR'] notify: ['Start VDR']
- name: Stop yavdr-xorg
systemd:
name: 'yavdr-xorg'
state: stopped
enabled: yes
notify: ['Start yavdr-xorg']
- name: Stop xlogin - name: Stop xlogin
systemd: systemd:
name: 'xlogin@{{ vdr.user }}.service' name: 'xlogin@{{ vdr.user }}.service'
@ -2483,10 +2491,10 @@ EnvironmentFile=-/var/lib/vdr/.session-env
dest: /var/lib/vdr/plugins/desktop/starter dest: /var/lib/vdr/plugins/desktop/starter
state: link state: link
- name: enable and start xlogin for the vdr user - name: enable and start yavdr-xorg for the vdr user
systemd: systemd:
daemon_reload: yes daemon_reload: yes
name: 'xlogin@{{ vdr.user }}' name: 'yavdr-xorg'
enabled: yes enabled: yes
state: started state: started
#+END_SRC #+END_SRC
@ -5170,6 +5178,15 @@ if __name__ == '__main__':
enabled: yes enabled: yes
register: vdr_start register: vdr_start
- name: Start yavdr-xorg
systemd:
daemon_reload: yes
name: 'yavdr-xorg'
enabled: yes
state: started
register: yavdr_xorg_start
- name: Stop xlogin - name: Stop xlogin
systemd: systemd:
name: xlogin@vdr.service name: xlogin@vdr.service

View File

@ -48,6 +48,15 @@
enabled: yes enabled: yes
register: vdr_start register: vdr_start
- name: Start yavdr-xorg
systemd:
daemon_reload: yes
name: 'yavdr-xorg'
enabled: yes
state: started
register: yavdr_xorg_start
- name: Stop xlogin - name: Stop xlogin
systemd: systemd:
name: xlogin@vdr.service name: xlogin@vdr.service

View File

@ -124,9 +124,9 @@
dest: /var/lib/vdr/plugins/desktop/starter dest: /var/lib/vdr/plugins/desktop/starter
state: link state: link
- name: enable and start xlogin for the vdr user - name: enable and start yavdr-xorg for the vdr user
systemd: systemd:
daemon_reload: yes daemon_reload: yes
name: 'xlogin@{{ vdr.user }}' name: 'yavdr-xorg'
enabled: yes enabled: yes
state: started state: started

View File

@ -18,6 +18,13 @@
enabled: yes enabled: yes
notify: ['Start VDR'] notify: ['Start VDR']
- name: Stop yavdr-xorg
systemd:
name: 'yavdr-xorg'
state: stopped
enabled: yes
notify: ['Start yavdr-xorg']
- name: Stop xlogin - name: Stop xlogin
systemd: systemd:
name: 'xlogin@{{ vdr.user }}.service' name: 'xlogin@{{ vdr.user }}.service'

View File

@ -59,6 +59,7 @@
state: present state: present
with_items: with_items:
- xlogin - xlogin
- yavdr-xorg
- xorg - xorg
- xserver-xorg-input-all - xserver-xorg-input-all
- xserver-xorg-video-all - xserver-xorg-video-all