Start XDM at boot and only set up MATE when it's running

This commit is contained in:
Anthony Rose 2019-10-12 10:49:20 +01:00
parent e307606e9d
commit 252698982c
2 changed files with 22 additions and 2 deletions

View file

@ -11,6 +11,7 @@
state: present state: present
vars: vars:
packages: packages:
- dbus
- emacs - emacs
- firefox-esr - firefox-esr
- fusefs-ntfs - fusefs-ntfs
@ -36,3 +37,15 @@
- vim - vim
- xinput - xinput
- zsh - zsh
- name: Start DBUS service
become: true
service:
name: dbus
state: started
enabled: yes
- name: Enable XDM
become: true
lineinfile:
path: /etc/ttys
regexp: '^ttyv8 .*'
line: 'ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure'

View file

@ -6,26 +6,33 @@
dest: "{{ prefix }}/share/mate-panel/layouts/acp.layout" dest: "{{ prefix }}/share/mate-panel/layouts/acp.layout"
vars: vars:
prefix: "{{ '/usr/local' if ansible_distribution == 'FreeBSD' else '/usr' }}" prefix: "{{ '/usr/local' if ansible_distribution == 'FreeBSD' else '/usr' }}"
- name: Detect running mate-panel process
pids:
name: mate-panel
register: mate_panel
- name: Set default panel layout - name: Set default panel layout
dconf: dconf:
key: /org/mate/panel/general/default-layout key: /org/mate/panel/general/default-layout
value: "'acp'" value: "'acp'"
register: layout_changed register: layout_changed
ignore_errors: yes when: mate_panel.pids | length > 0
- name: Reset panel - name: Reset panel
command: mate-panel --reset || true command: mate-panel --reset || true
when: layout_changed.changed when: layout_changed.changed and mate_panel.pids | length > 0
ignore_errors: yes ignore_errors: yes
changed_when: false changed_when: false
- name: Add cities to clock applet - name: Add cities to clock applet
dconf: dconf:
key: /org/mate/panel/objects/clock/prefs/cities key: /org/mate/panel/objects/clock/prefs/cities
value: ['<location name="" city="Luton" timezone="Europe/London" latitude="51.866669" longitude="-0.366667" code="EGGW" current="true"/>', '<location name="" city="Washington" timezone="America/New_York" latitude="38.848331" longitude="-77.034164" code="KDCA" current="false"/>', '<location name="" city="San Francisco" timezone="America/Los_Angeles" latitude="37.619720" longitude="-122.364723" code="KSFO" current="false"/>', '<location name="UTC" city="" timezone="GMT" latitude="-0.000000" longitude="-0.000000" code="-" current="false"/>'] value: ['<location name="" city="Luton" timezone="Europe/London" latitude="51.866669" longitude="-0.366667" code="EGGW" current="true"/>', '<location name="" city="Washington" timezone="America/New_York" latitude="38.848331" longitude="-77.034164" code="KDCA" current="false"/>', '<location name="" city="San Francisco" timezone="America/Los_Angeles" latitude="37.619720" longitude="-122.364723" code="KSFO" current="false"/>', '<location name="UTC" city="" timezone="GMT" latitude="-0.000000" longitude="-0.000000" code="-" current="false"/>']
when: mate_panel.pids | length > 0
- name: Set workspace switcher to two rows - name: Set workspace switcher to two rows
dconf: dconf:
key: /org/mate/panel/objects/workspace-switcher/prefs/num-rows key: /org/mate/panel/objects/workspace-switcher/prefs/num-rows
value: 2 value: 2
when: mate_panel.pids | length > 0
- name: Expand locations in clock - name: Expand locations in clock
dconf: dconf:
key: /org/mate/panel/objects/clock/prefs/expand-locations key: /org/mate/panel/objects/clock/prefs/expand-locations
value: 'true' value: 'true'
when: mate_panel.pids | length > 0