11

I am using xfce desktop in ubuntu 12.04 and added the shortcut keys in order to turn off my monitor.

The command "xset dpms force off" works fine in terminal.

But when it added in the keyboard shortcuts, the monitor turns off a second then turns on immediately.

The command "xset dpms force off" added in keyboard shortcuts

So how can I turn off the monitor using hotkeys?

Zanna
  • 72,312
zfz
  • 799

1 Answers1

16

I imagine it's because you're pressing a key... I'd consider setting the command to something that waits for a second, and then runs the command:

sh -c "sleep 1 && xset dpms force off"
Oli
  • 299,380