2

Is there a way to have Night Light active on the GDM login screen, prior to any user logging in, using start and end times configured by an admin or root account?

Contents of /etc/gdm3/greeter.dconf-defaults...

# 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:///usr/share/themes/Adwaita/backgrounds/stripes.jpg'
# 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='/usr/share/images/vendor-logos/logo-text-version-128.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='Welcome'

# 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'

#NightLight
[org/gnome/settings-daemon/plugins/color]
night-light-enabled=true
night-light-schedule-from=23.0
night-light-schedule-to=6.0
Enterprise
  • 12,352

1 Answers1

0

This file is a self explanatory

/etc/gdm3/greeter.dconf-defaults

So add the below content at the end of the above file, Change the values from and to, to your wish..

#NightLight
[org/gnome/settings-daemon/plugins/color]
night-light-enabled=true
night-light-schedule-from=5.0
night-light-schedule-to=10.0

enter image description here

PRATAP
  • 22,460
  • I tired this, but it doesn't seem to work... I set night-light-schedule-from=23.0 (11 PM), and night-light-schedule-to=6.0 (6 AM). I tested at 8PM. My user account's night-light is set for sun-down to sun-up. In my test, I expected GDM to ~not~ have night light active. However, night-light was ~on~ in GDM. It seems as if GDM just follows the default settings (sun-down to sun-up), ignoring the greeter.dconf-defaults file? – Enterprise Oct 03 '19 at 00:08
  • I added the contents of /etc/gdm3/greeter.dconf-defaults in the original question. – Enterprise Oct 03 '19 at 00:27
  • can you uncomment banner message and put any message and reboot for testing purpose? – PRATAP Oct 03 '19 at 00:31
  • https://askubuntu.com/a/1123747/739431 – PRATAP Oct 03 '19 at 00:32
  • I un-commented the banner-message-enable=true and banner-message-text='Welcome'. Then I rebooted. When I click on my user in GDM, the word "Welcome" is displayed at the top. (Note, I only have one user on my system). – Enterprise Oct 03 '19 at 01:08
  • OK, you have seen Welcome message.. this confirms the file is working.. is night-light working in desktop session properly? I have seen some posts where night-light is not working with Desktop session.. may be similar in your case on GDM screen? – PRATAP Oct 03 '19 at 01:16