I have ACPI working great on my MythTV server. It turns on to record and then powers back off when it is done, however.... I need to throw a spanner in the works. I have the vanilla shutdown check script installed (shown at the end of this email) which I originally thought looked for users logged into the PC but apparently only looks for MythTV clients logged in. The problem is that my MythTV server is also my main desktop PC and as such I use it for other tasks from everyday email and internet to games and downloading (the PC I am using for the frontend is just barely capable of streaming the video without lag and would be no good as a server). Now it is fine for normal use because it will not shutdown while I am using it but downloading is the issue. I like to leave my PC on occasionally overnight or while I am at work to make use of the off-peak bandwidth offered by my ISP. When I try to leave it on MythTV shuts it down after 20mins or so of inactivity (idle time setting in MythTV). My current band-aid solution is to have a MythTV frontend client running in the background but I would like to make it a little more sophisticated. When ACPI powers on the PC it only ever gets to the login screen because there is no one there to login. When MythTV is done recording it times out and shuts down. THIS IS PERFECTLY FINE!!! I want MythTV ONLY to shutdown the PC if it times out on the login screen. If I am logged in and have applications running I don't want it to shutdown (or perhaps even just logged on would be enough to stop it shutting down). When I am finished downloading (or whatever) I can logout and let MythTV take control. I say logout because if I manually shutdown the PC it won't wakeup for the next recording. (As far as I can tell the only way that MythTV can set an ACPI wakeup time is to have it shut itself down. Is there anyway that I can initiate an immediate shutdown and have ACPI set?) Does anyone have any suggestions? Is there anyway to modify the shutdown check script (shown below) to check for a desktop login as well as a MythTV client login? #!/bin/bash # # MythShutdownCheck # # checks to see if any other user is # logged in before idle shutdown # # returns "1" if yes, stopping shutdown # returns "0" if ok to shutdown # if last | head | grep -q "pts/.*still logged in" # check for active *remote* login? then exit 1 else exit 0 fi