PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 24, 2012, 06:45:05 AM


Login with username, password and session length


Pages: [1] 2   Go Down
  Print  
Author Topic: Turn off a Laptop screen with a very simple icon.  (Read 969 times)
Dr Qui?
Full Member
***
Offline Offline

Posts: 61



WWW
« on: December 28, 2011, 12:43:18 PM »

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.



Logged
AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11992


Registered Linux User #490933


WWW
« Reply #1 on: December 28, 2011, 12:48:10 PM »

Hehe VERY cool Smiley. Any side effects? Smiley
Logged

Dr Qui?
Full Member
***
Offline Offline

Posts: 61



WWW
« Reply #2 on: December 28, 2011, 12:54:53 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.
Logged
psibod
Jr. Member
**
Offline Offline

Posts: 16



« Reply #3 on: December 28, 2011, 01:31:38 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.

Logged

psibod
Georgetoon
Hero Member
*****
Offline Offline

Posts: 2489



WWW
« Reply #4 on: December 28, 2011, 02:32:56 PM »

And how do you turn back on?
Logged

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.
Leiche
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2701


God knows, i'm not an Angel!


WWW
« Reply #5 on: December 28, 2011, 02:36:09 PM »

xset -dpms works not for you?

xset q shows current configuration.


To fast read...  Roll Eyes

Logged

AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11992


Registered Linux User #490933


WWW
« Reply #6 on: December 28, 2011, 02:38:37 PM »

And how do you turn back on?

Move the mouse Smiley
Logged

parnote
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 3958


The truth is out there ... PCLinuxOS!


« Reply #7 on: December 28, 2011, 03:07:50 PM »

And how do you turn back on?

Move the mouse Smiley

Sweet! Nice one!
Logged

PCLinuxOS Magazine Chief Editor

Linux Registered User #485009

In a world without walls, who needs Windows?

PCLinuxOS Wiki: Contribute tips/tricks/how-to's!
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4587


MLUs Forever!


« Reply #8 on: December 28, 2011, 03: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
Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 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 ‎DVB-T 2 USB DTT
Dr Qui?
Full Member
***
Offline Offline

Posts: 61



WWW
« Reply #9 on: December 28, 2011, 05: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
 
Logged
Dr Qui?
Full Member
***
Offline Offline

Posts: 61



WWW
« Reply #10 on: December 28, 2011, 05:50:47 PM »

And how do you turn back on?

Move the mouse Smiley

Also works if you press the Any key Smiley

Glad to see that so folks have found this to be useful.
Logged
Dr Qui?
Full Member
***
Offline Offline

Posts: 61



WWW
« Reply #11 on: December 28, 2011, 06: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

Logged
GuypronouncedGuynotGuy
Hero Member
*****
Offline Offline

Posts: 1706


I used to suffer from migraines. So I gave up MS.


WWW
« Reply #12 on: December 28, 2011, 10: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!

Smiley

Logged

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)
seaplane_tux
Full Member
***
Offline Offline

Posts: 102


« Reply #13 on: December 28, 2011, 11:29:06 PM »



   Thanks for the tip... Works great!

Logged

Acer Aspire 5102WLMi
AMD Turion 64x2  1.5GHz, 2 GB RAM
15.4 1280 x 800, ATI Radeon Xpress 1100
Dual Boot PCLinuxOS 2010 and Win XP
AndrzejL
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11992


Registered Linux User #490933


WWW
« Reply #14 on: December 28, 2011, 11:50:13 PM »

And how do you turn back on?

Move the mouse Smiley

Also works if you press the Any key Smiley

Could not find Any key... Tongue
Logged

Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM