Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This script will lock the screen and turn the display in to standby mode (switch off the screen). Tested on ubuntu 13.04 and will work on gnome environment.
#!/bin/bash
# This script will lock the screen and turn the
# display in to standby mode (switch off the screen).
#
# Thilina Piyasundara
# 2013-08-31
# last updated on : 2013-10-13
# lock the gnome screen
gnome-screensaver-command -l
# force the screen to standby mode.
xset dpms force standby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.