瀏覽代碼

better customization of login screen

master
父節點
當前提交
5304b7fd46
共有 3 個檔案被更改,包括 79 行新增7 行删除
  1. +14
    -7
      tasks/main.yml
  2. +63
    -0
      templates/lightdm-gtk-greeter.conf.j2
  3. +2
    -0
      templates/lightdm.conf.j2

+ 14
- 7
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


+ 63
- 0
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=

+ 2
- 0
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


Loading…
取消
儲存