Hello, I found the answer by the help of a fellow community member on the #ubuntu-mate IRC channel
The screen timeout can be changed by using xset dpms 1800
which means turn off screen after 30 minutes (1800 are seconds)
Add this command to the list of startup applications so it persists after reboot sleep 10; xset dpms 1800
If you want to turn off the screen after you press CTRL + ALT + L, add a new keyboard shortcut with this command bash lock.sh
(code below)
Basically the script locks the screen, sets the screen timeout to 5 seconds (to turn it off again fast if you accidentally move your mouse), wait for a login dbus event and when the user logs in it sets the screen timeout to 30 minutes
#!/bin/bash
# Only works with bash since dash does not support "< <"
# Configuration
LOCKED_TIMEOUT=5 # Screen timeout in seconds when account is locked
UNLOCKED_TIMEOUT=30 # Screen timeout in minutes when account is not locked
# Lock screen
if hash gnome-screensaver-command 2>/dev/null; then
echo "Using gnome-screensaver-command"
gnome-screensaver-command -l
elif hash mate-screensaver-command 2>/dev/null; then
echo "Using mate-screensaver-command"
mate-screensaver-command -l
else
echo "No screensaver or lock screen command found"
exit 0;
fi
# Set screen timeout to 5 seconds
xset dpms $LOCKED_TIMEOUT
# Wait for login to restore dpms
while read -r x; do
case "$x" in
*"boolean true"*)
echo SCREEN_LOCKED
;;
*"boolean false"*)
echo SCREEN_UNLOCKED
xset dpms $((UNLOCKED_TIMEOUT*60))
exit 0
;;
esac
done < <(dbus-monitor --session "type='signal',interface='org.mate.ScreenSaver'")
exit 0
# Ubuntu Gnome
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'"
# Ubuntu Unity
dbus-monitor --session "type=signal,interface=com.canonical.Unity.Session,member=Unlocked"
# Ubuntu Mate
dbus-monitor --session "type='signal',interface='org.mate.ScreenSaver'"