Skip to content

Instantly share code, notes, and snippets.

@thilinapiy
Created October 13, 2013 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thilinapiy/6958238 to your computer and use it in GitHub Desktop.
Save thilinapiy/6958238 to your computer and use it in GitHub Desktop.
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