How to set OSX to wait longer before giving up on reboot?
#1
I'm setting up my OSX 10.7 based XBMC media center to reboot every morning, just to make sure that everything is clean and tidy when it's actually needed.

However the reboot is often failing because applications (including xbmc) sometimes take too long to close. OSX waits tells them to quit and they take a little too long, and the system pops up an error saying logout canceled because XXX program failed to quit.

It would seem the first thing I need to change is the length of this timeout. Anyone know where this is stored and how to change it?

Suppressing shutdown errors is another task but if anyone has suggestions let me know....

Thanks in advance for any help.
Reply
#2
I dont know of a hack but try a search for a shutdown app for mac. There are several and see if any of them have a built in function to manage this issue. It will be trial and error. May I ask why you are rebooting daily ?
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply
#3
Thanks for the reply, activate.

To answer your question, once I've installed XBMC, a handful of addons, DVD and CD ripping software, torrenting, file renaming and sorting app, iTunes etc plus all of their interconnections and auto-updating, it's only 100% reliable if it's rebooted every so often. I've settled on once a day because i dont want to ever have to VNC in and do it myself when an actual problem does happen.

If you've been able to set up a COMPLETE media center on a mac and guarantee 100% reliability, with everything ALWAYS in the state it's in after a reboot, I'm all ears... please post the instructions!
Reply
#4
The media centre that I have setup combines htpc and server functions and is similar to yours, but probably with a different set of applications. Example of its functions:

* Eye tv
* Downloaders
* itunes managing all ios devices via wifi
* Telephone integration
* Security camera monitoring
* Skype
* Air receiver
* Separate youtube and vimeo apps
* Local and remote, video, photo, music server.
* Apps to simulate some cool transition effects.
* There are quite a few more, growl, omnigrowl, logmein, antivirus, backups, iCloud etc.

One thing that I rarely use is video conversion simply because inter device compatibility and xbmc means that there is almost no need to. No doubt, its been progressive work to reach this point but I can run all of the above with the amp remote and schedule downloads from any number of clients. The mac is only restarted when an OS update requires it to or if I have to do a power cycle i.e.. probably once every few months. When it is restarted, everything comes into place and you dont have to leave the couch to start using it.

Now, I really haven't done anything brilliant but I'll put forward some suggestions.

1. Firstly, just make sure that the system is stable as far as resources. If there are cpu or memory issues then there is a greater likely hood of applications not responding as expected.
2. I have set the mac to be always on. The monitor (tv) ofcourse is switched off when not in use.
3. I have disabled crash notification by using this command: defaults write com.apple.CrashReporter DialogType none. You can also disable the dialogue when a new app is run. I can find it later if you like.
4. The notification center is turned off through the growl app. You can also disable them through system pref.
5. I have automatic updates switched to off on almost all apps. Updates is the only thing that I vnc in to do. This is also on purpose because I do not want to to update adhoc. Usually updates are minor and when you have as many apps as you or I have, they can cause conflicts. I try to test the new update on another mac before updating it on the server.
6. I run Onyx every couple of months. Clamxav also runs in the background as does macscan.
7. Recently, I added 'alt command escape' to the remote via flirc as a fallback so even if I have to force quit an app, I can do it from the remote. Works very well.
8. The primary thing is that whenever I have added an app, I have ensured that it behaves exactly as I want so that it doesn't disturb the gui.
9. XBMC is always on and is assigned to a desktop as are all the primary apps. All of the apps are media based and touch wood, the audio causes no issues coming out from the amp when I switch from one to another. That is a blessing.
10. There are apps like lingon that automatically restart the app when it crashes but I am not even using that now.

So, address each app and work out a way to keep it 'quiet'. If I can help with you with anyone of them, let me know.
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply
#5
Interesting, I will try to add some of the missing parts (growl etc) from my system

I wonder what you do when you insert a CD to be ripped and itunes says "The song names for this CD could not be found online. Do you still want to import the songs?" Just the kind of thing I want to establish rules for (in the case of itunes, answer yes on my behalf)
Reply
#6
itunes: In your case, if you open itunes preferences and click on the option for import settings, I think you will find one that suits you. In my case, I either purchase music from another mac and the server mac is setup to automatically download new music. Otherwise I can import the cd from another mac and copy it directly to the 'Automatically add to iTunes' folder on the server mac, all in the background.

growl: Obviously growl is not a necessary app. However, if you like the idea of seeing a little (or large) pop up when you get an email or a download is finished when you are watching a movie and disappears by itself, it is fantastic. You'll be amazed how much you can do with it.
Macmini Server 2011 i7 Quad Core, OS 10.8.2, Amp Onkyo TX-SR308 USB WD drives 3x2TB TV Samsung Plasma 720p EyeTV Integration
There are only 10 kinds of people in this world, those who understand binary, and those who don't.



Reply
#7
I run a 2011 MacMini running 10.7.5 2.3 GHz with an Intel Core i5 and 8GB RAM connected to a TV that serves the following functions:

• XBMC
• Plex Media Center
• rTorrent Extended and ruTorrent web interface with RSS feed for auto-downloading
• HTML, FTP, SFTP, SMB, AFP filesharing
• VNC Server (Screen Sharing)
• A myriad of launchctl scripts that do a number of things like running clamav, updating macports, and a million other things even I can't remember
• Google Chrome to run Netflix (XBMCFlix doesn't work for me)
• Wireless Xbox360 controller adapter for playing games like Arkham Asylum, Bioshock and some other mac games that natively support the controller
• Also run a bunch of emulators (have yet to set up the xbmc plugin for this purpose though)
• iSat Server and Menus
• Little Snitch
• Peerguardian
• Growl/HardwareGrowler
• EasyVPN
• Airfoil Speakers
• fLux
• Rowmote Helper

This all runs without a hitch. I've gone for months without a reboot, and only to install updates or add software not because of any instability.

To answer your dilema though: launchctl is your answer. A System Daemon running the command "shutdown -r now" once every 24 hours will do the trick. This will override any gui issues and will do a nice graceful, clean reboot. There is a program called Lingon that can be used to create launchctl daemons in a nice gui. Just add a new daemon in either /Library/LaunchAgents or /System/Library/LaunchAgents (so it will run as root), give it a identifier, set the program arguments as "shutdown -r now" and set it to run every 24 hours (you can even set a specific time). Save, reboot, and your good to go.
Reply

Logout Mark Read Team Forum Stats Members Help
How to set OSX to wait longer before giving up on reboot?0