linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Turning PC monitor on/off
@ 2006-10-11  6:04 Raseel Bhagat
  2006-10-11  7:05 ` ZeeGeek
  2006-10-11  8:11 ` Henry Margies
  0 siblings, 2 replies; 9+ messages in thread
From: Raseel Bhagat @ 2006-10-11  6:04 UTC (permalink / raw)
  To: C programming list

Hi,
 I want to write a C code for toggling my PC monitor on/off in Linux.
Can some one point to any reading material or a hint or line of thought ?

-- 
Raseel.
http://www.opensourcedeal.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11  6:04 Turning PC monitor on/off Raseel Bhagat
@ 2006-10-11  7:05 ` ZeeGeek
  2006-10-11  8:11 ` Henry Margies
  1 sibling, 0 replies; 9+ messages in thread
From: ZeeGeek @ 2006-10-11  7:05 UTC (permalink / raw)
  To: Raseel Bhagat; +Cc: C programming list

On 10/11/06, Raseel Bhagat <raseelbhagat@gmail.com> wrote:
> Hi,
>  I want to write a C code for toggling my PC monitor on/off in Linux.
> Can some one point to any reading material or a hint or line of thought ?

You need to look into the X library or whatever screensaver library
you are using.

>
> --
> Raseel.
> http://www.opensourcedeal.com
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
My blog: http://ihome.ust.hk/~cs_snx/blog/

Ning Shi
URH 0706 Oglesby Hall
1005 College Ct.
Urbana, IL 61801
(217) 332-5238

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11  6:04 Turning PC monitor on/off Raseel Bhagat
  2006-10-11  7:05 ` ZeeGeek
@ 2006-10-11  8:11 ` Henry Margies
  2006-10-11  9:26   ` Raseel Bhagat
  1 sibling, 1 reply; 9+ messages in thread
From: Henry Margies @ 2006-10-11  8:11 UTC (permalink / raw)
  To: C programming list

On Wed, 2006-10-11 at 11:34 +0530, Raseel Bhagat wrote:
> Hi,
>  I want to write a C code for toggling my PC monitor on/off in Linux.
> Can some one point to any reading material or a hint or line of thought ?
> 

Maybe it also helps to look at the sources of xset program  of X11.

xset dpms force off

Turns off the monitor (until you press a key or so).


Henry


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11  8:11 ` Henry Margies
@ 2006-10-11  9:26   ` Raseel Bhagat
  2006-10-11 10:02     ` Per Jessen
  0 siblings, 1 reply; 9+ messages in thread
From: Raseel Bhagat @ 2006-10-11  9:26 UTC (permalink / raw)
  To: C programming list

Hi

On 10/11/06, Henry Margies <henry.margies@gmx.de> wrote:
> Maybe it also helps to look at the sources of xset program  of X11.
>
> xset dpms force off
>
> Turns off the monitor (until you press a key or so).

But what if I'm not on the X-window ?
As in, I'm running this program from console, or one of the virtual terminals ?


-- 
Raseel.
http://raseel.livejournal.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11  9:26   ` Raseel Bhagat
@ 2006-10-11 10:02     ` Per Jessen
  2006-10-11 10:20       ` Markus Rechberger
  2006-10-11 10:25       ` Raseel Bhagat
  0 siblings, 2 replies; 9+ messages in thread
From: Per Jessen @ 2006-10-11 10:02 UTC (permalink / raw)
  To: C programming list

Raseel Bhagat wrote:
> Hi
> 
> On 10/11/06, Henry Margies <henry.margies@gmx.de> wrote:
>> Maybe it also helps to look at the sources of xset program  of X11.
>>
>> xset dpms force off
>>
>> Turns off the monitor (until you press a key or so).
> 
> But what if I'm not on the X-window ?
> As in, I'm running this program from console, or one of the virtual 
> terminals ?

You said you wanted to look at the code and xset is probably a good 
example.  Whether it'll also work from the commandline with no active X 
system, that's for you to find out :-)


/Per Jessen, Zurich

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11 10:02     ` Per Jessen
@ 2006-10-11 10:20       ` Markus Rechberger
  2006-10-11 10:25       ` Raseel Bhagat
  1 sibling, 0 replies; 9+ messages in thread
From: Markus Rechberger @ 2006-10-11 10:20 UTC (permalink / raw)
  To: Per Jessen; +Cc: C programming list

Hi,

first of all it might be useful how DPMS works,
http://webpages.charter.net/dperr/dpms.htm

Instead of using X you could try to use some kind of Vesa feature.
Maybe your bios has a revealed interface in Linux for that feature too

Markus

On 10/11/06, Per Jessen <per@computer.org> wrote:
> Raseel Bhagat wrote:
> > Hi
> >
> > On 10/11/06, Henry Margies <henry.margies@gmx.de> wrote:
> >> Maybe it also helps to look at the sources of xset program  of X11.
> >>
> >> xset dpms force off
> >>
> >> Turns off the monitor (until you press a key or so).
> >
> > But what if I'm not on the X-window ?
> > As in, I'm running this program from console, or one of the virtual
> > terminals ?
>
> You said you wanted to look at the code and xset is probably a good
> example.  Whether it'll also work from the commandline with no active X
> system, that's for you to find out :-)
>
>
> /Per Jessen, Zurich
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Markus Rechberger

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11 10:02     ` Per Jessen
  2006-10-11 10:20       ` Markus Rechberger
@ 2006-10-11 10:25       ` Raseel Bhagat
  2006-10-11 11:06         ` Katelyn Rowlands
  1 sibling, 1 reply; 9+ messages in thread
From: Raseel Bhagat @ 2006-10-11 10:25 UTC (permalink / raw)
  To: Per Jessen; +Cc: C programming list

Thanks you guys, xset helped with X.

On 10/11/06, Per Jessen <per@computer.org> wrote:
> You said you wanted to look at the code and xset is probably a good
> example.  Whether it'll also work from the commandline with no active X
> system, that's for you to find out :-)
>

But it doesn't work on console.

-- 
Raseel.
http://raseel.livejournal.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11 10:25       ` Raseel Bhagat
@ 2006-10-11 11:06         ` Katelyn Rowlands
  2006-10-11 11:30           ` Raseel Bhagat
  0 siblings, 1 reply; 9+ messages in thread
From: Katelyn Rowlands @ 2006-10-11 11:06 UTC (permalink / raw)
  To: Raseel Bhagat; +Cc: linux-c-programming

On Wed, Oct 11, 2006 at 03:55:33PM +0530, Raseel Bhagat wrote:
> Thanks you guys, xset helped with X.
> 
> But it doesn't work on console.

You could take a look at the dpmsctl program, located at
http://forums.gentoo.org/viewtopic.php?t=154996. It does the same as xset, but
works in the console. 

I don't know if it only works for the Inspiron 510m laptop though. I never tried
it with anything else.

- Katelyn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Turning PC monitor on/off
  2006-10-11 11:06         ` Katelyn Rowlands
@ 2006-10-11 11:30           ` Raseel Bhagat
  0 siblings, 0 replies; 9+ messages in thread
From: Raseel Bhagat @ 2006-10-11 11:30 UTC (permalink / raw)
  To: Katelyn Rowlands; +Cc: linux-c-programming

I think I got my keywords, VESA and/or frame-buffers.
Not to mention DPMS.
I think I'll google from here on.


On 10/11/06, Katelyn Rowlands <knr@uid0x00.org> wrote:
> On Wed, Oct 11, 2006 at 03:55:33PM +0530, Raseel Bhagat wrote:
> > Thanks you guys, xset helped with X.
> >
> > But it doesn't work on console.
>
> You could take a look at the dpmsctl program, located at
> http://forums.gentoo.org/viewtopic.php?t=154996. It does the same as xset, but
> works in the console.
>
> I don't know if it only works for the Inspiron 510m laptop though. I never tried
> it with anything else.
>
> - Katelyn
>


-- 
Raseel.
http://raseel.livejournal.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-10-11 11:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-11  6:04 Turning PC monitor on/off Raseel Bhagat
2006-10-11  7:05 ` ZeeGeek
2006-10-11  8:11 ` Henry Margies
2006-10-11  9:26   ` Raseel Bhagat
2006-10-11 10:02     ` Per Jessen
2006-10-11 10:20       ` Markus Rechberger
2006-10-11 10:25       ` Raseel Bhagat
2006-10-11 11:06         ` Katelyn Rowlands
2006-10-11 11:30           ` Raseel Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).