I would like my system to automatically switch to dark mode after dusk. After some searching I came across this topic. However, I get the following when I attempt to run the commands it mentioned.
No such schema “org.mate.desktop.interface”
I figure a new thread is appropriate, since this is a different version of Ubuntu MATE and possibly a different way of accomplishing this task.
I have this script which sets it to dark mode:
#!/bin/bash
PATH='/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin'
dconf read /org/mate/desktop/interface/gtk-theme
dconf write /org/mate/marco/general/theme "'Ambiant-MATE-Dark'"
dconf write /org/mate/desktop/interface/gtk-theme "'Ambiant-MATE-Dark'"
The script works flawlessly when ran standalone, but fails when put into the crontab as follows:
* * * * * /home/mike/Documents/Scripts/Ambiant-MATE-Dark.sh 1> /home/mike/log.txt 2> /home/mike/err.txt
It puts the following error in my log file:
error: Cannot autolaunch D-Bus without X11 $DISPLAY
Any thoughts?