Turning PC monitor on/off

View: New views
9 Messages — Rating Filter:   Alert me  

Turning PC monitor on/off

by Raseel Bhagat :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Turning PC monitor on/off

by ZeeGeek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/11/06, Raseel Bhagat <raseelbhagat@...> 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@...
> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Turning PC monitor on/off

by Henry Margies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

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

Re: Turning PC monitor on/off

by Raseel Bhagat :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

On 10/11/06, Henry Margies <henry.margies@...> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Turning PC monitor on/off

by Per Jessen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Raseel Bhagat wrote:

> Hi
>
> On 10/11/06, Henry Margies <henry.margies@...> 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@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Turning PC monitor on/off

by Markus Rechberger-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> wrote:

> Raseel Bhagat wrote:
> > Hi
> >
> > On 10/11/06, Henry Margies <henry.margies@...> 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@...
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


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

Re: Turning PC monitor on/off

by Raseel Bhagat :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks you guys, xset helped with X.

On 10/11/06, Per Jessen <per@...> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Turning PC monitor on/off

by Katelyn Rowlands :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Turning PC monitor on/off

by Raseel Bhagat :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html