Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
#!/bin/sh
(
time=$( zenity --scale --min-value=0 --max-value=20 --text="Pls Select Time in(s)")
)
&& sleep $time && xset dpms force off

I wanted to turn off display after n seconds, but this does not quite work... expert's advise please...

share|improve this question
    
just realized it was a very minor syntax error... [code]( time=$(zenity --scale --min-value=0 --max-value=20 --text="Pls Select Time in(s)") && sleep $time && xset dpms force off ) –  Linux Sudo Dec 6 '13 at 12:09
    
works like a charm –  Linux Sudo Dec 6 '13 at 12:16
add comment

1 Answer

up vote 0 down vote accepted

OP wrote:

just realized it was a very minor syntax error:

( time=$(zenity --scale --min-value=0 --max-value=20 --text="Pls Select Time in(s)") && sleep $time && xset dpms force off )
share|improve this answer
    
how did you do that ... the code part @radu ? (i'm new to this forum so i am a dummy) –  Linux Sudo Dec 6 '13 at 12:26
    
@LinuxSudo See askubuntu.com/editing-help –  Radu Rădeanu Dec 6 '13 at 12:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.