How to blackout screen or start screensaver with shortcut keys?

7,100

Use the gnome-screensaver-command. Read the man page (man gnome-screensaver-command) to learn about other features.

For example, to simply blackout the screen (without locking) in a terminal run:

 gnome-screensaver-command -a

Now you just need to add this command as a custom shortcut under the Keyboard settings.

Share:
7,100

Related videos on Youtube

Adil Saribay
Author by

Adil Saribay

Updated on September 18, 2022

Comments

  • Adil Saribay
    Adil Saribay over 1 year

    I'm often reading a hardcopy paper/book and taking notes on the laptop. I like to save energy (and battery) when the laptop is just waiting for me to read. My laptop unfortunately doesn't have a function key that blacks out the screen (which my previous laptop had, such a great idea) --not to mention that my function keys don't work with Ubuntu anyways.

    As simple as this is, I haven't found the optimal solution: How do I blackout the screen (or start a screensaver, that's fine, too) with a shortcut key combination? I would really like to avoid loading an application to RAM (at startup). This should be a simple function that can be performed on demand. But, if you are strongly convinced that there is no way, then please be kind enough to state that so I can go figure out how to do this with xscreensaver or whatever.

    Note that I'm not trying to lock the screen. Indeed, I'm trying to avoid locking the screen so that I don't have to keep on typing my password everytime I want to start the screen to take a note.

    I'm on Ubuntu 13.04 64-bit with a Toshiba Satellite L830-135.

    • web.learner
      web.learner almost 11 years
      @edwin Do you want to add that as an answer?
  • Adil Saribay
    Adil Saribay almost 11 years
    Thanks but this doesn't work for me. It does blackout the screen, but open returning it requires my password. I can already do this. I need to only blackout the screen without locking out, i.e., I need to be able to get the screen back without having to enter my password.
  • edwin
    edwin almost 11 years
    What do you mean by "open returning"? Do you close your laptop lid?