I'm running Ubuntu 12.04 on my laptop and sometimes want to turn the display off immediately (without closing the lid and without waiting for it to turn off by itself). I'd prefer not to have to run a command to do this, so I created the "~/Documents/monitor-off.sh" script (making it executable):
#!/bin/bash sleep 2 xset dpms force off
I then created the "~/.local/share/applications/monitor-off.desktop" file (also making it executable):
[Desktop Entry] Name=Monitor Off Exec=/home/nrogers64/Documents/monitor-off.sh Icon=monitor Terminal=true Type=Application StartupNotify=true
I'm not very familiar with Ubuntu and am wondering if this was the correct way to go about solving this problem or if this solution is overkill. Thanks!