Closed
Bug 743594
Opened 13 years ago
Closed 12 years ago
Stop 10.7 from restoring apps after a restart
Categories
(Infrastructure & Operations Graveyard :: CIDuty, task, P3)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 843545
People
(Reporter: philor, Assigned: coop)
References
Details
(Keywords: sheriffing-untriaged)
If you look at the screenshots we take when a test times out, every one on 10.7 will show iCal running, and nearly every one will show the Bluetooth Setup Assistant running (conveniently, we time out a lot in the hidden permaorange suites, so you can look at lots of pictures). We know that we open iCal and leave it running, bug 449763, but that only accounts for it running during whichever hunk of mochitest runs that test, not for everywhere. Every time I've mentioned the Bluetooth Setup Assistant dialog, I've been told that nobody was in the dc at the time who could possibly have been attaching a keyboard.
Well, wups, silly kitty that it is, Lion tries to be helpful by restoring running apps after a restart, even if getting rid of those running apps are a big part of the reason why we were restarting. Casual googling makes it sound like there's a checkbox in the "did you really want to restart?" dialog that may or may not actually work sometimes, and that you can close all apps and then get-info, lock, some plist in a location with a random string of numbers in it, but didn't find any satisfactory answer for automating not getting random apps restarted.
Comment 1•13 years ago
|
||
hmm, the article over at http://hints.macworld.com/article.php?story=20110918051930924 suggests that running the following command will turn off the feature. I don't know how effective this will be when using 'sudo reboot' instead of the graphical reboot tool.
defaults write com.apple.loginwindow TALLogoutSavesState -bool false
Comment 2•13 years ago
|
||
I wonder if using Apple script to uncheck the checkbox on the restart screen would be the way to go. I know nothing of applescript, but I've cobbled together the following:
tell application "System Events"
tell process "Finder"
tell menu bar 1
click menu "Apple"
tell menu "Apple"
click menu item "Restart…"
end tell
end tell
end tell
end tell
which is enough to bring up the dialog box. This is where I become lost.
Comment 3•13 years ago
|
||
-- Reboot 10.7 without restoring windows
-- Must enable assistive devices
-- sudo touch /private/var/db/.AccessibilityAPIEnabled
-- http://www.codemacs.com/coding/applescript/applescript-key-codes-reference.8288271.htm
tell application "System Events"
tell process "Finder"
tell menu bar 1
click menu "Apple"
tell menu "Apple"
click menu item "Restart…"
tell application "loginwindow" to activate
key code 49
key code 52
end tell
end tell
end tell
end tell
This is enough to start the reboot, but not enough to force all applications to quit instead of asking the user whether or not they want to reboot.
Assignee | ||
Comment 5•12 years ago
|
||
Has anyone tried the steps by hand with a lion slave to see whether they work first?
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → coop
Priority: -- → P3
Updated•12 years ago
|
Whiteboard: [sheriff-want]
Updated•12 years ago
|
Keywords: sheriffing-untriaged
Whiteboard: [sheriff-want]
Comment 6•12 years ago
|
||
I released a patch for this in bug 843545. This command seems to work
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Kim Moir [:kmoir] from comment #6)
> I released a patch for this in bug 843545. This command seems to work
>
> /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow
> LoginwindowLaunchesRelaunchApps -bool false
Does it need to be deployed anywhere else, or is this bug now a dupe?
Comment 8•12 years ago
|
||
I don't think it needs to be deployed anywhere else.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
Updated•6 years ago
|
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Updated•5 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•