Recently Gnome came up with a new feature of Night Light. It is really helpful.
It feels too time-consuming that I need to go to settings (and then display) and activate it each time. Is there any terminal command that can simply turn on the night light feature?
Manual and/or sunrise to sunset option aren't really helpful as even I don't know when I will be needing that particular feature to turn on or off.
I tried to google but, found nothing related to command.
Might not matter, but just in case, I am using Kali Linux.
This is the feature I am talking about.
-
2You mean gnome, right? This is a gnome feature, not a kernel feature.– ZipOct 23, 2017 at 22:10
-
Yes! That's right.– UgnesOct 23, 2017 at 22:11
-
@Zip if this is Gnome feature then why I didnt found it in Ubuntu ?– Infinite LoopsNov 25, 2018 at 7:40
-
@InfiniteLoops Which version fo Ubuntu are you using?– UgnesNov 26, 2018 at 14:11
-
Another way (cron+redshift) described here: askubuntu.com/questions/991832/…– Anatolii KurotychDec 23, 2020 at 17:22
1 Answer
Yes, you can turn it on with
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true
or
dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled true
Same commands with false
instead of true
will turn it off.
If you list the keys under the org.gnome.settings-daemon.plugins.color
schema you'll see that you can also configure the schedule (auto: on/off, manual: from/to) as well as the night light temperature. A very convenient way to set the latter is via the night light slider extension.
-
The first command is now giving the error: GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. The second one is working fine. What could be the reason?– UgnesNov 9, 2017 at 19:38
-
1@Ugnes - google for that error and you'll see there are plenty of possible causes. FWIW I can't reproduce it... works fine here. Nov 9, 2017 at 21:14
-
@don_crissti I am able to execute the commands that you mentioned as follows:
$ gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true; $ gsettings get org.gnome.settings-daemon.plugins.color night-light-enabled; true
. But nothing happens. I opened dconf-editor GUI, and the value doesn't change there, even though usinggsettings get
outputs changed value. What should be done? Feb 7, 2020 at 20:10