From 5304b7fd46bfd412d47b371426b6e602278e7a89 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Mon, 4 Jun 2018 22:13:22 +0000 Subject: [PATCH] better customization of login screen --- tasks/main.yml | 21 ++++++--- templates/lightdm-gtk-greeter.conf.j2 | 63 +++++++++++++++++++++++++++ templates/lightdm.conf.j2 | 2 + 3 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 templates/lightdm-gtk-greeter.conf.j2 diff --git a/tasks/main.yml b/tasks/main.yml index d84cdb9..f1359ff 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,13 +23,8 @@ - lightdm-gtk-greeter - yad - xbindkeys - -- name: uninstall wrong lightdm greeters - apt: - pkg: "{{ item }}" - state: absent - with_items: - - lightdm-kde-greeter + - onboard + notify: restart lightdm - include: mainentance.yml when: display_manager_state == 'mainentance' @@ -40,6 +35,18 @@ dest: /etc/lightdm/lightdm.conf notify: restart lightdm +- name: lightdm gtk-greeter configuration + template: + src: lightdm-gtk-greeter.conf.j2 + dest: /etc/lightdm/lightdm-gtk-greeter.conf + #notify: restart lightdm + +- name: download background image + get_url: + url: https://upload.wikimedia.org/wikipedia/commons/5/52/Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg + dest: /usr/share/lightdm/background.jpg + checksum: sha256:df1106e46a2cb9ec46fb50c415f9648270bafb11c0762072f9804f8d1705e4b5 + - name: lightdm started service: name: lightdm diff --git a/templates/lightdm-gtk-greeter.conf.j2 b/templates/lightdm-gtk-greeter.conf.j2 new file mode 100644 index 0000000..d9e0e0a --- /dev/null +++ b/templates/lightdm-gtk-greeter.conf.j2 @@ -0,0 +1,63 @@ +{{ ansible_managed | comment }} + +# LightDM GTK+ Configuration +# Available configuration options listed below. +# +# Appearance: +# theme-name = GTK+ theme to use +# icon-theme-name = Icon theme to use +# background = Background file to use, either an image path or a color (e.g. #772953) +# user-background = false|true ("true" by default) Display user background (if available) +# transition-duration = Length of time (in milliseconds) to transition between background images ("500" by default) +# transition-type = ease-in-out|linear|none ("ease-in-out" by default) +# +# Fonts: +# font-name = Font to use +# xft-antialias = false|true Whether to antialias Xft fonts +# xft-dpi = Resolution for Xft in dots per inch (e.g. 96) +# xft-hintstyle = none|slight|medium|hintfull What degree of hinting to use +# xft-rgba = none|rgb|bgr|vrgb|vbgr Type of subpixel antialiasing +# +# Login window: +# active-monitor = Monitor to display greeter window (name or number). Use #cursor value to display greeter at monitor with cursor. Can be a semicolon separated list +# position = x y ("50% 50%" by default) Login window position +# default-user-image = Image used as default user icon, path or #icon-name +# hide-user-image = false|true ("false" by default) +# +# Panel: +# panel-position = top|bottom ("top" by default) +# clock-format = strftime-format string, e.g. %H:%M +# indicators = semi-colon ";" separated list of allowed indicator modules. Built-in indicators include "~a11y", "~language", "~session", "~power", "~clock", "~host", "~spacer". Unity indicators can be represented by short name (e.g. "sound", "power"), service file name, or absolute path +# +# Accessibility: +# a11y-states = states of accessibility features: "name" - save state on exit, "-name" - disabled at start (default value for unlisted), "+name" - enabled at start. Allowed names: contrast, font, keyboard, reader. +# keyboard = command to launch on-screen keyboard (e.g. "onboard") +# keyboard-position = x y[;width height] ("50%,center -0;50% 25%" by default) Works only for "onboard" +# reader = command to launch screen reader (e.g. "orca") +# +# Security: +# allow-debugging = false|true ("false" by default) +# screensaver-timeout = Timeout (in seconds) until the screen blanks when the greeter is called as lockscreen +# +# Template for per-monitor configuration: +# [monitor: name] +# background = overrides default value +# user-background = overrides default value +# laptop = false|true ("false" by default) Marks monitor as laptop display +# transition-duration = overrides default value +# +[greeter] +background=/usr/share/lightdm/background.jpg +user-background=false +#theme-name= +#icon-theme-name= +#font-name= +#xft-antialias= +#xft-dpi= +xft-hintstyle=hintfull +#xft-rgba= +indicators=~session;~spacer;~host;~spacer;~clock;~spacer;~a11y;~power +clock-format=%Y-%m-%d W%W %H:%M %Z +keyboard=onboard +#reader= +#position= diff --git a/templates/lightdm.conf.j2 b/templates/lightdm.conf.j2 index b633d11..7061d3c 100644 --- a/templates/lightdm.conf.j2 +++ b/templates/lightdm.conf.j2 @@ -74,6 +74,8 @@ sessions-directory=/usr/local/share/mainentance # exit-on-failure = True if the daemon should exit if this seat fails # [Seat:*] +greeter-session=lightdm-gtk-greeter + {% if display_manager_state == "mainentance" %} autologin-user=mainentance autologin-user-timeout=0