Do you want to turn off your monitor screen using a dedicated hotkey or shortcut key. Great, Just by using a simple python script you can customize your shortcut key in order to turn off your monitor screen easily. But first you need to install python and python-xlib packages.
Just have a glance at this article to find out how to turn off your monitor using shortcut key in Ubuntu 14.04.
Steps to turn off your monitor using shortcut key:
Step 1: First open your terminal by using “Ctrl + ALT + T” and then type: “sudo apt-get install python python-xlib”. Press enter.
Step 2: You’ll be prompted to provide your Ubuntu password for authentication. Just type your password and press enter.
Step 3: After that you may ask “Do you want to continue?”, just press ‘y'(yes) to continue.
Step 4: Type “exit” command in order to close your terminal.
Step 5: Now, open your Unity dash and type “gpedit”. You’ll see your text editor icon, just click on that to open.
Step 6: Type the following python script (as shown in the image below) into your text editor and save in a particular location.
Step 7: Now, go that saved file, right click on it and then click on properties. You may see a new window pops open. Under properties, go to “Permissions” tab.
Step 8: Under ‘Permissions’ tab, go to “Execute” option and then click on “Allow executing file as program” check box.
Step 9: Now, go to your Unity dash and then click on the gear icon in order to open “system settings”.
Step 10: Under ‘System settings’, click your keyboard icon as shown in the image below.
Step 11: Under ‘Keyboard’ option go to “Shortcuts” tab.
Step 12: Under ‘shortcuts’ tab, go to “custom shortcuts” and then press “+” sign to add your new shortcut. You may see a small window which contains name and command field.
Step 13: Now add the name and command of your shortcut key and then press “Apply” button.
Step 14: Finally to assign a shortcut key you need to click the row and press your key combination.
That’s all friends. Keep reading.
Leave a Reply