Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Apr 2014, 06:32
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
[Solved]Howto screen blank on command? (NOT automatically)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
jtwdyp


Joined: 04 Oct 2013
Posts: 137

PostPosted: Thu 02 Jan 2014, 18:52    Post subject:  [Solved]Howto screen blank on command? (NOT automatically)  

I use either slacko 5.6 or precise 5.7.1 depending on which flash drive I boot.
I don't like time based screen blanking. Though the ability to put a command on a hot key to
blank the screen instantly on command would be nice...

I Frequently I use my laptop as a hulu or youtube source for my tv. When I do so. it needs to
play (unattended) for hours at a time. I know I can use pupx to stop the screen saver on a per
session basis. I'm going to experiment with a script in /root/Startup containing:
Code:
xset s off

Or maybe
Code:
xset s off -dpms


Which should work for that part. But is there a command that would do the screen blanking on
demand? (preferably without reactivating the automatic screen saving function.) Something I
could put in a script along with something to spindowm the harddrive? I'd like to avoid a
full "suspend" though, because I'd like to do this without severing the wlan connection.

_________________

--
JtWdyP



Last edited by jtwdyp on Tue 07 Jan 2014, 01:04; edited 1 time in total
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 7208

PostPosted: Thu 02 Jan 2014, 19:33    Post subject:  

xset dpms force off
sould come up with mouse or keyboard...not sure if it recommences auto blanking...

hdparm -S 12 /dev/sdx
..spindown after 1 minute.... n times 5....

mike
Back to top
View user's profile Send private message 
jtwdyp


Joined: 04 Oct 2013
Posts: 137

PostPosted: Sat 04 Jan 2014, 17:27    Post subject:  

mikeb wrote:
xset dpms force off
sould come up with mouse or keyboard...not sure if it recommences auto blanking...


Works great... And quick empirical testing says that according to the screen saver check box in the pupX gui, it doesn't re-enable what
Code:
xset s off -dpms

has disabled... Very Happy

Quote:
hdparm -S 12 /dev/sdx
..spindown after 1 minute.... n times 5....

This also works, at least for any prenamed hard drive(s)

But since my Puppy's are all on portable flash drives I can't be sure how many drives etc... might be in the next machine I plug my fash drive into. So I'd want to somehow search for "x" Do you know if this hdparm command can adversly affect anything fdisk would call a "Disk" ???

IE would this kludge be safe???
Code:

#!/bin/bash
# ParkEm root script to force spindown on all found harddrives
#
# WARNING: Untested code!

for Parkit in $(fdisk -l |grep "Disk /dev/[hs]d[a-z]:")
do
     Parkit=$(echo $Parkit|cut -f1 -s -d:)
    case $Parkit in
      '/'*)hdparm -S 12 $Parkit;;
   esac
done

_________________

--
JtWdyP


Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 7208

PostPosted: Sat 04 Jan 2014, 18:07    Post subject:  

As far as my limited knowledge goes anything to which the command is meaningless to would be ignored. (perhaps add a 2>/dev/null)

Assumes of course that anything that can be spun down after the time period will be....... It sometimes annoys file sharing that's all but not destructivly.

Note that hdparm DOES have some low level commands that can cause upset so careful with your spelling and syntax and CaSe.

mike
Back to top
View user's profile Send private message 
jtwdyp


Joined: 04 Oct 2013
Posts: 137

PostPosted: Sun 05 Jan 2014, 01:00    Post subject:  

mikeb wrote:
As far as my limited knowledge goes anything to which the command is meaningless to would be ignored. (perhaps add a 2>/dev/null)
Hmmn nah, If I do this it will be in the same script as the
Code:
xset dpms force off
command which would normally be called with something like
Code:
<Key mask="SC" key="End">exec:/root/bin/blanknow</Key>
So I doubt any error messages will get to clutter up anything anyway...

Quote:
Assumes of course that anything that can be spun down after the time period will be....... It sometimes annoys file sharing that's all but not destructivly.
Not to worry, if it's my puppy key that's been booted, file sharing won't be an issue. I'm thinking that as long as It won't hurt flash and/or solid state drives to be told by hdparm to spin down this way, I'm probably good to go with it...

Quote:
Note that hdparm DOES have some low level commands that can cause upset so careful with your spelling and syntax and CaSe.

I'm guessing I wouldn't like "-s" here...

Not to worry, copy/paste is my friend.

Thanks

_________________

--
JtWdyP


Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0571s ][ Queries: 11 (0.0031s) ][ GZIP on ]