Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Restart on Logout?

Restart on Logout?
Thread Tools
lyoko37
Fresh-Faced Recruit
Join Date: Oct 2010
Status: Offline
Reply With Quote
Oct 6, 2010, 01:40 PM
 
I've been searching the Internet and have not had any luck.

I work at a school and we have iMacs that need to restart after the user logs off so it can get back to the dual-boot screen.

Is there a way to either remove the logout button or tie the restart functionality to the logout button?
     
ibook_steve
Moderator
Join Date: Oct 2001
Location: San Jose, CA
Status: Offline
Reply With Quote
Oct 6, 2010, 10:17 PM
 
Hmm. Can you provide more details on exactly what you want to do? Why do you need to reboot the machines? And why don't you ask the users to restart instead of just logging off? If you're managing a bunch of machines, maybe net booting and Mac OS X Server would be the best way to go. I haven't used it, but I'm sure others will chime in.

Steve
Celebrating 10 years and 4000 posts on MacNN!
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Oct 6, 2010, 10:39 PM
 
From the description, I think he has shared iMacs that must return to the boot selector after each person uses it. So the next person can choose between OS X and Linux.

Looks like Login Logout Tasks would do what you want. Just add an applescript to reboot.
     
Art Vandelay
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Oct 6, 2010, 10:42 PM
 
Or you can just use a LogoutHook which is probably what Login Logout Tasks is doing.
Vandelay Industries
     
chabig
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Oct 7, 2010, 01:24 AM
 
I thought the user had to hold down the option key to get to the dual boot screen, no?
     
Art Vandelay
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Oct 7, 2010, 12:26 PM
 
There are ways of getting it to come up. There are also OS X utilities that load at boot and present a boot selector that reboot to the desired OS.
Vandelay Industries
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Oct 30, 2010, 04:01 PM
 
If you can't use (or don't want to trust) logout hooks for this, then your best option depends on how you have your system setup:

1) If you have an auto-login set, then your best option is probably going to be to create a LaunchAgent that reboots the system and set the LimitLoadToSessionType key to an array with the only item being the string "LoginWindow". This will mean that every time the loginwindow would appear it will instead reboot. There may be consequences for this, so this is definitely not all environments.

2) If you have people loggin in with their own credentials, then you either use #1, but have a flag file that gets placed the first time it runs (and then looks for this flag file for the second instance), or you have to rely on a logout hook or a daemon process that starts when the user logs in, and reboots when it gets the quit signal (the latter being more work, but very reliable).

Oh, this is probably not the best forum for this sort of question. Better forums would be afp548.com's forum, or the MacEnterprise mailing list. Apple also has some lists, but they are not quite as good.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:18 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,