1
0
Fork 0

More improvements to GDM

master
Ambrose Chua 2020-03-07 17:14:10 +08:00
parent 8f646dfd47
commit 85009f760e
Signed by: ambrose
GPG Key ID: BC367D33F140B5C2
17 changed files with 173 additions and 30 deletions

View File

@ -11,11 +11,13 @@ Looking for the [video recorder's guide](guide.html)?
For the recording machines, get a fresh copy of Debian, and install it with the following settings:
- Keyboard: American
- Username: opentech
- Hostname: model-increment
- Example: x220-01
- Add GNOME Desktop
- Add OpenSSH Server
- Leave Print & System Utilities enabled
If a GNOME Desktop and SSH daemon is already installed, a reinstall is not required but recommended.
@ -94,11 +96,12 @@ ansible -Kf 8 -kc paramiko -b -i event all -a reboot
Now, plays can be run like so:
```
./play [inventory] [playbook]
# Which executes the following command
ansible-playbook -Kf 4 -i [inventory] [playbook]
# Example:
./play event recorders.yml
ansible-playbook -Kf 4 -i event recorders.yml
ansible-playbook -Kf 4 -i event recorders-stop.yml
ansible-playbook -Kf 4 -i event reboot.yml
ansible-playbook -Kf 4 -i event upgrade.yml
```
## Install Wireless Drivers

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 KiB

View File

@ -1,3 +1,6 @@
[recorders]
x220-01 ansible_host=fd11:f055:a514::2 ansible_user=opentech room_id= room_type=
x230-01 ansible_host=fd11:f055:a514::3 ansible_user=opentech room_id=EH2-1 room_type=EH2
x240-01 ansible_host=fd11:f055:a514::4 ansible_user=opentech room_id= room_type=
x240-02 ansible_host=fd11:f055:a514::5 ansible_user=opentech room_id= room_type=
x240-03 ansible_host=fd11:f055:a514::6 ansible_user=opentech room_id= room_type=

View File

@ -1,5 +0,0 @@
#!/bin/sh
set -e
ansible-playbook -Kf 4 -i "$1" "$2"

View File

@ -1,4 +0,0 @@
---
- hosts: recorders
roles:
- productivity

7
ansible/reboot.yml Normal file
View File

@ -0,0 +1,7 @@
---
- hosts: all
tasks:
- name: reboot machines
become: yes
reboot:

View File

@ -1,6 +1,7 @@
---
- hosts: recorders
roles:
- role: laptop
- role: recorder
- role: monitoring-client
vars:

View File

@ -1,5 +1,10 @@
---
- hosts: recorders
roles:
- productivity
- hosts: recorders
roles:
- role: laptop
- role: recorder
- role: monitoring-client

View File

@ -0,0 +1,28 @@
---
- name: copy gdm3 greeter logo
become: yes
copy:
src: "../../../artwork/{{ item }}.png"
dest: "/opt/{{ item }}.png"
with_items:
- login-logo
- name: write gdm3 greeter config
become: yes
template:
src: greeter.dconf-defaults
dest: /etc/gdm3/greeter.dconf-defaults
owner: root
group: root
mode: u=rw,g=r,o=r
- name: reconfigure gdm3
become: yes
command: dpkg-reconfigure gdm3
- name: install firmware-iwlwifi
become: yes
apt:
state: present
name: firmware-iwlwifi

View File

@ -0,0 +1,47 @@
# These are the options for the greeter session that can be set
# through GSettings. Any GSettings setting that is used by the
# greeter session can be set here.
# Note that you must configure the path used by dconf to store the
# configuration, not the GSettings path.
# Theming options
# ===============
# - Change the GTK+ theme
[org/gnome/desktop/interface]
# gtk-theme='Adwaita'
# - Use another background
[org/gnome/desktop/background]
# picture-uri='file:///opt/login-background.png'
# picture-options='zoom'
# - Or no background at all
[org/gnome/desktop/background]
# picture-options='none'
# primary-color='#000000'
# Login manager options
# =====================
[org/gnome/login-screen]
logo='/opt/login-logo.png'
# - Disable user list
# disable-user-list=true
# - Disable restart buttons
# disable-restart-buttons=true
# - Show a login welcome message
banner-message-enable=true
banner-message-text='Hostname: {{ ansible_hostname }}\nUsername: opentech Password: opentech\nUsername: mixer Password: mixer\n{% if autostart %}Mixer Autostart Enabled{% endif %}'
# Automatic suspend
# =================
[org/gnome/settings-daemon/plugins/power]
# - Time inactive in seconds before suspending with AC power
# 1200=20 minutes, 0=never
# sleep-inactive-ac-timeout=1200
# - What to do after sleep-inactive-ac-timeout
# 'blank', 'suspend', 'shutdown', 'hibernate', 'interactive' or 'nothing'
# sleep-inactive-ac-type='suspend'
# - As above but when on battery
# sleep-inactive-battery-timeout=1200
# sleep-inactive-battery-type='suspend'

View File

@ -1,7 +0,0 @@
---
- name: restart systemd-logind
become: yes
service:
name: systemd-logind
state: restarted

View File

@ -41,3 +41,27 @@
mode: u=rw,g=r,o=r
become: yes
become_user: mixer
- name: ensure autostart folder exists
file:
path: "{{ mixer_user.home }}/.config/autostart"
state: directory
become: yes
become_user: mixer
- name: automatically start OBS on login
file:
path: "{{ mixer_user.home }}/.config/autostart/obs-autostart.desktop"
src: /usr/share/applications/obs.desktop
state: link
become: yes
become_user: mixer
when: autostart
- name: do not automatically start OBS on login
file:
path: "{{ mixer_user.home }}/.config/autostart/obs-autostart.desktop"
state: absent
become: yes
become_user: mixer
when: not autostart

View File

@ -24,6 +24,22 @@
group: root
mode: u=rw,g=r,o=r
- name: create Pictures directory for wallpaper
file:
dest: "{{ mixer_user.home }}/Pictures"
state: directory
mode: u=rwx,g=rx,o=rx
become: yes
become_user: mixer
- name: copy wallpaper
copy:
src: "../../../artwork/wallpaper.png"
dest: "{{ mixer_user.home }}/Pictures/wallpaper.png"
mode: u=rw,g=r,o=r
become: yes
become_user: mixer
- name: check sleep settings
command:
cmd: /usr/bin/gsettings get org.gnome.desktop.session idle-delay
@ -48,13 +64,25 @@
- /usr/bin/gsettings set org.gnome.desktop.lockdown disable-printing true
- /usr/bin/gsettings set org.gnome.desktop.lockdown disable-print-setup true
- /usr/bin/gsettings set org.gnome.desktop.lockdown disable-save-to-disk true
- /usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
- /usr/bin/gsettings set org.gnome.shell favorite-apps "['obs.desktop', 'org.gnome.Nautilus.desktop', 'firefox.desktop']"
- /usr/bin/gsettings set org.gnome.desktop.session idle-delay 0
become: yes
become_user: mixer
#when: "'uint32 0' not in idle_delay_setting.stdout"
- name: customize GNOME
command:
cmd: "{{ item }}"
environment:
# Required only when setting gsettings
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ mixer_user.uid }}/bus"
with_items:
- /usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
- /usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://{{ mixer_user.home }}/Pictures/wallpaper.png'
- /usr/bin/gsettings set org.gnome.shell favorite-apps "['obs.desktop', 'org.gnome.Nautilus.desktop', 'firefox-esr.desktop']"
become: yes
become_user: mixer
#when: "'uint32 0' not in idle_delay_setting.stdout"
# Credits: SuperQ, gerryd
- name: prevent laptop from sleeping when lid is closed
@ -64,7 +92,6 @@
regexp: "^HandleLidSwitch"
line: "HandleLidSwitch=ignore"
state: present
notify: restart systemd-logind
when: autostart
- name: allow laptop to sleep when lid is closed
@ -74,5 +101,4 @@
regexp: "^HandleLidSwitch"
line: "HandleLidSwitch=ignore"
state: absent
notify: restart systemd-logind
when: not autostart

View File

@ -1,5 +1,3 @@
# MANAGED BY ANSIBLE
# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.
@ -8,10 +6,13 @@
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false
{% if autostart %}
# Enabling automatic login
{% if autostart %}
AutomaticLoginEnable = true
AutomaticLogin = mixer
{% else %}
# AutomaticLoginEnable = true
# AutomaticLogin = mixer
{% endif %}
# Enabling timed login

View File

@ -447,7 +447,8 @@
"push-to-talk": false,
"push-to-talk-delay": 0,
"settings": {
"key_color_type": "green",
"key_color": "4294639610",
"key_color_type": "custom",
"similarity": 1,
"smoothness": 1
},
@ -610,7 +611,8 @@
"push-to-talk": false,
"push-to-talk-delay": 0,
"settings": {
"key_color_type": "green",
"key_color": "4294639610",
"key_color_type": "custom",
"similarity": 1,
"smoothness": 1
},
@ -920,7 +922,8 @@
"push-to-talk": false,
"push-to-talk-delay": 0,
"settings": {
"key_color_type": "green",
"key_color": "4294639610",
"key_color_type": "custom",
"similarity": 1,
"smoothness": 1
},
@ -1116,7 +1119,8 @@
"push-to-talk": false,
"push-to-talk-delay": 0,
"settings": {
"key_color_type": "green",
"key_color": "4294639610",
"key_color_type": "custom",
"similarity": 1,
"smoothness": 1
},

10
ansible/upgrade.yml Normal file
View File

@ -0,0 +1,10 @@
---
- hosts: all
tasks:
- name: upgrade packages
become: yes
apt:
autoclean: yes
autoremove: yes
update_cache: yes
upgrade: yes