stweil / OSXvnc

VNC Server for macOS
GNU General Public License v3.0
208 stars 69 forks source link

Cannot log out #40

Open romanprocopie opened 5 years ago

romanprocopie commented 5 years ago

Although I can see there is subscription to NSWorkspaceSessionDidResignActiveNotification and I also tried to add a subscription to NSWorkspaceWillPowerOffNotification,enforcing a rfbShutDown and a clean exit, the user cannot accomplish the logout/reboot.

At some point Mac OS pops up a message saying Vine is preventing it.

If you close the session or stop the listening server the logout/reboot will continue instantly.

I thought it might be because I am running it as a launch agent (just a guess) but I can see same behaviour when running it manually from the GUI session.

Are there any ideas of why it may happen ? I am happy to continue googling as of why the notifications don't work, but so far it turns out that the code already has implemented all bright suggestions (except for subscription to NSWorkspaceWillPowerOffNotification whihc I did with not much luck)

stweil commented 5 years ago

I have no idea, but it would be great if someone finds a solution and sends a pull request.