On Thursday 21 August 2008 23:23:28 Neil wrote:
On 8/20/08, Ian
wrote: Hi, I'm trying to find a way to get opensuse to suspend when no-one is logged in. Both gnome & kde provide front ends to pm-utils that can suspend a machine after a period of inactivity, but in my case, we have several computers that are used by numerous people that come and go 24 hours a day, 7 days a week & we'd like the machines to suspend if they aren't in use for a while (meaning there is no-one logged in & the computer is sitting at the GDM screen).
Does anyone here have any idea how we might achieve that? (Or some other mailing list that might be a better place to ask this question?)
Cheers, -- Ian gpg key: http://home.swiftdsl.com.au/~imoore/no-spam.asc
Hi.
I do not have the answer in full, but it may be solved by a script. Something like: <pseudo code>
if(#users=0 && idletime=600s) s2ram endif
Insert a working version of this into the crontab and I guess you would solve this
Could someone create a working version of of this?
This requires at least that the number of users that is currently logged in to be available
Neil
(yeah I do know this isn't really a solution, but no-one replied for a day, so I thought I might get the right people to look at it) (hmm, decent scripting should be the next thing I learn. Buying the Bash Cookbook would be a good start?)
Thanks for the reply Neil. idletime hey? Sounds like it could be the go. I'll have a look at using that & post my results back, unless someone else can come up with a better suggestion. Cheers, -- Ian gpg key: http://home.swiftdsl.com.au/~imoore/no-spam.asc