Author Topic: Turn off a Laptop screen with a very simple icon.  (Read 2002 times)

Offline Dr Qui?

  • Full Member
  • ***
  • Posts: 61
    • My rubbish homepage
Turn off a Laptop screen with a very simple icon.
« on: December 28, 2011, 10:43:18 AM »
hey all,

I finally had to do the obligatory wipe and reinstall on the laptop after almost 3 years of happy running, both my windows and PCLinuxOS partitions had accumulated enough redundant folders and things that i was not sure if it was OK to delete. so an evening well spent had a fresh install of PCLinuxOS and a fresh reinstall of XP for the limited gaming I do.

Anyways I then had the do the usual thing of adding in the programs and things that I personal like to use.

After about 20 mins or so tinkering around I had things almost back to normal. the only thing I could not figure out ow to do was turn the laptop screen, I had originally a command aligned to the scroll lock key but I could not figure out how to do this in KDE4. I like to be able to turn the screen off completely when I listen to audiobooks or music.

I checked around on the interweb and found a little snippet that said that if "acpi" (was installed by default on the live CD) is installed if you type "xset dpms force off" in konsole will turn off the screen.

So all you have to do is create a new link to application, call it Turn off Screen or what ever you like, right click on the icon then go to the properties and on the application tab type "xset dpms force off" (without the inverted commas) in the command box. and that's it.

You can leave the Icon on the desktop or dump it in the home folder or wherever and drag it onto the panel.

I'm not sure if anyone has posted this pit before, but if not I hope that some folks will find it useful.



« Last Edit: December 28, 2011, 10:48:45 AM by Dr Qui? »

Offline AndrzejL

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 12799
  • RLU #490933
    • Wordpress On The Wardrobe...
Re: Turn of a Laptop screen with a very simple icon.
« Reply #1 on: December 28, 2011, 10:48:10 AM »
Hehe VERY cool :). Any side effects? :)

Offline Dr Qui?

  • Full Member
  • ***
  • Posts: 61
    • My rubbish homepage
Re: Turn off a Laptop screen with a very simple icon.
« Reply #2 on: December 28, 2011, 10:54:53 AM »
Nope no side affects that I know of, is much the same method as I was using before only i had the command linked to the scroll lock key, when I updated to KDE4 I couldn't figure out how to map a command to a key and had lost the little txt file that had all the instructions on.

This method is way easier to do. 

It cuts the power from the screen completely, i like this for when i listen audio books if i'm having trouble falling asleep and don't want the back light illuminating the room.

Offline psibod

  • Jr. Member
  • **
  • Posts: 16
Re: Turn off a Laptop screen with a very simple icon.
« Reply #3 on: December 28, 2011, 11:31:38 AM »
Another way of doing this is via Configure your desktop/Hardware/Power Profiles and setting "When laptop lid closed" to turn off screen.

As always there are many ways of doing things.

psibod

Offline Georgetoon

  • Hero Member
  • *****
  • Posts: 3194
  • Don't rush the bacon.:)
    • Georgetoon Cartoons!
Re: Turn off a Laptop screen with a very simple icon.
« Reply #4 on: December 28, 2011, 12:32:56 PM »
And how do you turn back on?
Toonfully,

Mark
-----------
Lenovo 14" ThinkPad Edge (0578F5U) with Core i3 Processor(i3-370M) 2.40 GHz 4GB RAM
Acer Aspire 9300 Laptop
Desktop Icy Dock system with AMD PHENOM X4 QUADCORE 9650 2.3GHZ 4MB L1 , ‎NVidia GEFORCE 9400GT 1GB 2X DVI PCIE graphics card, 22" Chimei monitor.

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Turn off a Laptop screen with a very simple icon.
« Reply #5 on: December 28, 2011, 12:36:09 PM »
xset -dpms works not for you?

xset q shows current configuration.


To fast read...  ::)

« Last Edit: December 28, 2011, 03:50:36 PM by Leiche »

Offline AndrzejL

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 12799
  • RLU #490933
    • Wordpress On The Wardrobe...
Re: Turn off a Laptop screen with a very simple icon.
« Reply #6 on: December 28, 2011, 12:38:37 PM »
And how do you turn back on?

Move the mouse :)

Online parnote

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4437
  • The truth is out there ... PCLinuxOS!
Re: Turn off a Laptop screen with a very simple icon.
« Reply #7 on: December 28, 2011, 01:07:50 PM »
PCLinuxOS Magazine Chief Editor

Linux Registered User #485009

In a world without walls, who needs Windows?

PCLinuxOS Wiki: Contribute tips/tricks/how-to's!

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10644
  • MLUs Forever!
Re: Turn off a Laptop screen with a very simple icon.
« Reply #8 on: December 28, 2011, 01:29:36 PM »
Nope no side affects that I know of, is much the same method as I was using before only i had the command linked to the scroll lock key, when I updated to KDE4 I couldn't figure out how to map a command to a key and had lost the little txt file that had all the instructions on.

This method is way easier to do. 

It cuts the power from the screen completely, i like this for when i listen audio books if i'm having trouble falling asleep and don't want the back light illuminating the room.

In case you didn't find it since ......

KDE CC - Shortcuts & Gestures - Custom Shortcuts - Preset Actions ....  right click, New ...

Assign a key combo to global shortcut/command
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Dr Qui?

  • Full Member
  • ***
  • Posts: 61
    • My rubbish homepage
Re: Turn off a Laptop screen with a very simple icon.
« Reply #9 on: December 28, 2011, 03:42:08 PM »
Another way of doing this is via Configure your desktop/Hardware/Power Profiles and setting "When laptop lid closed" to turn off screen.

As always there are many ways of doing things.



I have a Toshiba Equium laptop, they don't seem to have that little switch that other laptops have that turns the screen off when the lid is closed, also the sound gets somewhat muffled when the lid is closed
 

Offline Dr Qui?

  • Full Member
  • ***
  • Posts: 61
    • My rubbish homepage
Re: Turn off a Laptop screen with a very simple icon.
« Reply #10 on: December 28, 2011, 03:50:47 PM »
And how do you turn back on?

Move the mouse :)

Also works if you press the Any key :)

Glad to see that so folks have found this to be useful.

Offline Dr Qui?

  • Full Member
  • ***
  • Posts: 61
    • My rubbish homepage
Re: Turn off a Laptop screen with a very simple icon.
« Reply #11 on: December 28, 2011, 04:20:32 PM »


In case you didn't find it since ......

KDE CC - Shortcuts & Gestures - Custom Shortcuts - Preset Actions ....  right click, New ...

Assign a key combo to global shortcut/command
[/quote]

I take it you mean  the Configure your Desktop icon when you say KDE CC?

Shortcuts & Gestures - Custom Shortcuts - Preset Actions ....  right click, New  - Global shortcut - Command/URL 

in the comment tab name it screen off or something.

in the trigger tab chose a redundant key such as scroll lock.

in the Action tab add "xset dpms force off" without quotes.


Cheers Just18,  I now have both a key and an icon


Offline GuypronouncedGuynotGuy

  • Hero Member
  • *****
  • Posts: 1706
  • I used to suffer from migraines. So I gave up MS.
Re: Turn off a Laptop screen with a very simple icon.
« Reply #12 on: December 28, 2011, 08:59:27 PM »
Very handy, thank you for this!

Added bonus is using a Dvorak layout.  I drove my 13yr old nuts by telling him the key combo is CTRL-SHIFT-B and he still couldn't get it to work.  As the B key is the labelled N key I could show him repeatedly that it does indeed work by making it look like I was pressing the B key, and he just wasn't pushing the button right.  Sometimes I love being a devious dad!

:)

The idea that Bill Gates has appeared like a knight in shining armour to lead all customers out of a mire of technological chaos neatly ignores the fact that it was he, by peddling second-rate technology, who led them into it in the first place. - Douglas Adams (1952 - 2001)

Offline seaplane_tux

  • Full Member
  • ***
  • Posts: 102
Re: Turn off a Laptop screen with a very simple icon.
« Reply #13 on: December 28, 2011, 09:29:06 PM »


   Thanks for the tip... Works great!

Acer Aspire 5102WLMi
AMD Turion 64x2  1.5GHz, 2 GB RAM
15.4 1280 x 800, ATI Radeon Xpress 1100
Dual Boot PCLinuxOS 2013 and Win XP

Offline AndrzejL

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 12799
  • RLU #490933
    • Wordpress On The Wardrobe...
Re: Turn off a Laptop screen with a very simple icon.
« Reply #14 on: December 28, 2011, 09:50:13 PM »