[SOLVED] adding hotkey to turn off screen

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
kevin987
Level 5
Level 5
Posts: 801
Joined: Fri Dec 11, 2015 12:35 pm

[SOLVED] adding hotkey to turn off screen

Post by kevin987 »

Hello,

I'm using Linux Mint 19.3 and 20.1 both with Cinnamon desktop.

Under Power Management I have it set to turn off the screen when inactive for 5 minutes.

I would like to add a hotkey to do this manually.

The only thing I can find is using Crtl + Alt + L to blank the screen, but that is Screen Lock, and I'd rather just simply turn the screen off without locking the screen.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 20.3 (Cinnamon)
Linux Mint 19.3 (Cinnamon)
Bodhi Linux 6.0 (MokshaArcGreen)
Fedora 35 (Cinnamon)
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: adding hotkey to turn off screen

Post by Moonstone Man »

kevin987 wrote: Wed Jul 28, 2021 6:16 pm The only thing I can find is using Crtl + Alt + L to blank the screen, but that is Screen Lock, and I'd rather just simply turn the screen off without locking the screen.
In System Settings > Keyboard, you can create custom shortcuts, and you can create shortcuts to scripts.

Code: Select all

#! /bin/bash
sleep 2 ; xset dpms force off
Create a script with the above code, make the script executable then create your preferred shortcut to the script.
User avatar
kevin987
Level 5
Level 5
Posts: 801
Joined: Fri Dec 11, 2015 12:35 pm

Re: adding hotkey to turn off screen

Post by kevin987 »

Thanks for your response. I had never created a script, but was able to use online resources to figure it out.

I can now use Super key + s to tell the monitor to go to sleep.
Linux Mint 20.3 (Cinnamon)
Linux Mint 19.3 (Cinnamon)
Bodhi Linux 6.0 (MokshaArcGreen)
Fedora 35 (Cinnamon)
Locked

Return to “Cinnamon”