1

I have several macs that I login to remotely periodically and sometimes the login will hang and display a spinning wheel. Currently, I have to ssh to the system and run sudo pkill loginwindow which also logs out other users. I would like to avoid interrupting anything currently running but still be able to log in via VNC.

The other solutions have suggested removing authentication which I would prefer not to do.

New contributor
ukkuhrmakhai is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

1

I found a solution which works for me.

TL;DR: use sudo pkill -9 -u 0 -fx '/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow' instead of sudo pkill loginwindow

I originally used the answer from MacOS Mojave remote access login screen stuck on infinite loading spinner but logging out everything became a problem. I ran pgrep loginwindow and found I was killing two processes.

ps -f on those two PIDs gave me:

UID PID PPID C STIME TTY TIME CMD
XXX XXX 1 0 11:28PM ?? 0:06.58 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
0 XXX XXX 0 5:47PM ?? 0:00.21 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow

Killing the nonconsole process allowed the VNC connection to succeed with no spinning wheel.

My new process is:

  1. Close VNC/Screen Sharing Window
  2. Connect via ssh: ssh user@host
  3. Run sudo pkill -9 -u 0 -fx '/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow'
  4. Connect using VNC as usual
New contributor
ukkuhrmakhai is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .