0

Having an issue every time I reboot my Mac.

Even though the "Reopen windows when logging back in" box is unticked and I've removed everything from ~/Library/Saved Application State and locked the folder, I end up with Spotify, Mail, Finder, System Preferences and Safari open in the foreground. I also have nothing in System Preferences > Users & Groups > Login Items. I'm thinking of doing a clean install as it is very frustrating.

This is the thread I'm coming from: Disable OS X feature to reopen windows at login time

I've already tried everything mentioned there.

Any help is appreciated.

  • Have you try a Safe Boot (push shift key at boot) then reboot normally ? –  Oct 29 '21 at 04:19
  • Yes. It didn't change anything. – Ryder Cragie Oct 29 '21 at 04:29
  • Is it always the same application? –  Oct 29 '21 at 04:37
  • Yep. The same ones every single time. I listed just a few. – Ryder Cragie Oct 29 '21 at 04:37
  • Have you try check the box "Reopen windows when logging back in" , then reboot your Mac and uncheck this box? –  Oct 29 '21 at 04:43
  • Just tried that. Seems like when I tick it and reboot, it's then not ticked by default again, even though it should be. Not that I want it to be. Everything still opens when I boot up. – Ryder Cragie Oct 29 '21 at 04:59
  • Have you tried repairing your user's file permissions withe the terminal command : diskutil resetuserpermissions / $(id -u). Else, have you the same problem with another user on this Mac? –  Oct 29 '21 at 05:45
  • Just tried that. Still having the same issue. It only has one user (me). – Ryder Cragie Oct 29 '21 at 06:15
  • Are they reopening, as in returning to the exact running state they were in at shut down… or are they launching, even if they were quit manually before shut down? Also, check System Prefs > General for 'Ask to keep changes…" & Close windows…". You probably need those checked to prevent apps from returning to their pre-quit state. – Tetsujin Oct 29 '21 at 06:46
  • Even if I manually quit them they still reopen. And I already have that option checked. – Ryder Cragie Oct 29 '21 at 07:03
  • Can you give the results (text) of a Etrecheck scan in a Pastebin Link? –  Oct 29 '21 at 07:18
  • If they reopen after being manually quit, then you're looking in all the wrong places. That's not 'reopen after reboot', that's 'launch at login' behaviour. Totally different thing. See https://superuser.com/a/969821/347380 – Tetsujin Oct 29 '21 at 07:38
  • But it never used to do this. What's caused it to happen? – Ryder Cragie Oct 29 '21 at 08:36
  • Plus, I just checked those 2 folders and the apps that are launching aren't even in there. So it's nothing to do with that. – Ryder Cragie Oct 29 '21 at 08:38
  • Have you done a Etrecheck report ? https://cdn.etrecheck.com/EtreCheckPro.zip –  Oct 29 '21 at 09:53
  • My linked answer has *6* places to check, not 2. Spotify has its own launch at login pref in advanced. Finder will always launch at login. Mail, System prefs & Safari ought to follow the standard system rules, unless you've got them in Login Items or in a launch .plist, they should behave. – Tetsujin Oct 29 '21 at 10:39
  • Yep. I checked all 6. And I already checked the Spotify settings — it's turned off there too. None of them should be opening in the foreground at startup with everything being configured correctly, which it is. It doesn't make any sense to me and I'm deeply considering a clean install. – Ryder Cragie Oct 29 '21 at 10:51
  • Quick test. Quit all running applications [just normal apps, not Finder & not any system processes] Quit using Cmd/Q, not just by closing all their windows. Wait 5 minutes [this is because the timer on 're-open at startup' can take a few minutes to register what is & isn't running]. Restart [not shutdown]. What launches at login? – Tetsujin Oct 29 '21 at 11:20
  • I'll do that when my 50 GB backup has completed. And if that doesn't fix it, I'll probably reinstall macOS. It might take a few hours to compete. I'll try it as soon as I can. – Ryder Cragie Oct 29 '21 at 12:44
  • Okay, I'm ready. Should I tick the "Reopen windows when logging back in" box? – Ryder Cragie Oct 29 '21 at 13:53
  • Just tried it with the box ticked while everything had been closed for about an hour. It still opened apps that weren't open before the reboot. – Ryder Cragie Oct 29 '21 at 15:56
  • Why would you tick the "Reopen windows when logging back in" box when a) that is explicitly not the behaviour you want & b) has already been eliminated as the cause of your issue? Your issue has already been determined to be one of login items [in some form or other] not a 'reopen' issue as in your original question. The test was just to confirm what was already considered. – Tetsujin Oct 29 '21 at 16:58
  • Think about it. If I had nothing open and I select "Reopen windows", then nothing should open. Right? – Ryder Cragie Oct 29 '21 at 17:03
  • Just tried it again. I waited 5 minutes with everything closed and rebooted it with the box UNCHECKED. Everything still reopened. – Ryder Cragie Oct 29 '21 at 17:07
  • You're still insisting that these things are re-opening. They're not. They're opening or launching. That is a totally different thing. I was trying to steer you towards that with the simple test, but you seem determined to still think in terms of 'reopening'. You need to further investigate the .plist angle & forget the 'reopen' pref altogether. – Tetsujin Oct 29 '21 at 17:48
  • There's nothing in the names of the plist files that are related to the applications that keep opening. You can check for yourself. Here's a screen recording: https://RyderCragie.com/AppsLaunchingOnBoot – Ryder Cragie Oct 29 '21 at 18:58

1 Answers1

0

In Spotify, go to Menu Bar > Spotify > Preferences > Show Advanced Settings and change the Open Spotify automatically after you log into the computer to No.

Right click / control-click each of the App icons in your dock that are opening at startup/login and make sure Options > Open at Login is unchecked.

Go to System Preferences > Users & Groups and click the Login Items tab and remove any apps form the list that you don't want to start on login.

Check /Library/LaunchAgents, /Library/LaunchDaemons, and ~/Library/LaunchAgents. Use the launchctl list and launchctl remove to remove these items, or (not recommended) delete the unwanted plist files out of these directories.

  • Update: A few hours ago I reinstalled macOS and the issues still occurred. I've now completely reset it, which resulted in a kernel panic when I finished the setup process (seems fairly common for my Mac lately) and now everything is fine in terms of apps starting up at launch. I also noticed before that preferences in apps weren't actually taking effect. When I'd change my Safari Start Page and reboot it would change back. The same thing happened for other apps. I think it's better that I've started again anyway. Who knows what junk has accumulated over the last year and a half. – Ryder Cragie Oct 31 '21 at 03:34
  • Thanks everyone anyway for your help! I'll save your comment @Adam Bulgatz just in case it happens again. – Ryder Cragie Oct 31 '21 at 03:35