You are not logged in.

#1 2010-05-17 20:47:10

Interoperable
Member
Registered: 2010-04-14
Posts: 2

Preventing suspend mode while a task is running

Hello all,

I have a fairly simple problem, but I'm a fairly simple person so I need some help. I'm using my old laptop as a media center PC and one of its key functions is to play music over my stereo using MPD. The trouble is that it goes to sleep during playback and I'd like to fix that. The solution that I have so far is to use cron to run a script that queries MPD's status (easy so far) and makes a dummy input to X to reset the suspend timer if MPD is playing. Not elegant, but it should work.

My question is: how can I make an input to X from a script that will not interfere with anything else? If anyone has any more elegant solutions I'd be eager to hear it as well. I'd like the laptop to suspend sooner or later to save power and I never remember to manually change settings after I stop the play back.

Offline

Board footer

Powered by FluxBB