Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ARD and screen sharing become unresponsive when switching users

I wanted to repost this question because surely I cannot be the only person who's had this problem.

I manage a number of Leopard (10.5.8) and Snow Leopard (10.6.1) servers and desktops via ARD. Whenever I'm sharing the screen of those servers and I return to the login window by switching users, the screen sharing window closes and I am unable to reconnect to screen sharing on the server until I reboot it. Killing all loginwindow processes from ssh also restores ARD's ability to reconnect to the server, but also obviously kills the sessions of users logged in.

I have made sure this is not a problem with my admin machine. I have followed Apple's instructions to remove ARD admin from my admin machine, cleared caches, repaired permissions, deleted preference files, and done all the usual troubleshooting steps. This leads me to believe that the problem lies with the servers and not the admin station.

On the servers, the following entries appear in the system log when the client attempts to reconnect:

Sep 26 21:09:38 Mac-mini AppleVNCServer[1540]: kCGErrorIllegalArgument: CGSGetDisplayBounds (display 503550)
Sep 26 21:09:38 Mac-mini com.apple.RemoteDesktop.agent[1523]: Sat Sep 26 21:09:38 Mac-mini.local AppleVNCServer[1540] <Error>: kCGErrorIllegalArgument: CGSGetDisplayBounds (display 503550)


I have found this problem only happens on servers that have no monitor plugged in.

What is causing screen sharing to become unresponsive? Is there any way to correct this issue?

Message was edited by: Aaron Adams

MacBook Pro, Mac OS X (10.6.1)

Posted on Sep 26, 2009 6:30 PM

Reply
23 replies

Jan 16, 2010 11:12 AM in response to Aaron Adams

The bug is actually in loginwindow, and it has nothing to do with ARD.

The only workaround I've found so far is always end user's session with "Login Window" (and not by switching to another user's session). After that you need to kill -9 the loginwindow process, owned by root, and the problem solved.

OpenRadar is actually open radar implementation, useful to track bugs, as there's no other way to know, if the bug has been already reported. However, Apple does not allow to disclose some of the info in their radar, so OpenRadar has several limitations.

Feb 24, 2010 3:15 PM in response to Farcaller

Hi Farcaller,

I'm having exactly the same situation when remoting into my wife's practice, using Vine Viewer. I'll try your suggestion about going to the login window when exiting.

As I'm a newbie with this is the kill -9 something you enter into terminal on the remote machine or your local machine. Sorry if that's a dumb question.

Many Thanx

Feb 28, 2010 3:08 AM in response to jonathan.clarke

I think I've worked out what Farcaller is suggesting, but unfortunately it does not fix Fast User Switching, it simply allow you to gain access again without having to restart.

Before you can kill a process with -9 you first need to find the process id with the following command line:

ps auxwww|grep loginwindow

This should give you an an output like this:

root 925 0.0 0.1 2503556 5580 ?? Us 3:05AM 0:00.08 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
jc 953 0.0 0.0 2425708 276 s000 R+ 3:05AM 0:00.00 grep loginwindow

You may have a few different lines, but essentially you're looking for the root line, the process id in my case is 925. In which case the kill -9 command would look like this:

sudo kill -9 953

After that you should be able to reconnect with the Screen Sharing client and see the GUI.

Feb 28, 2010 3:22 AM in response to jonathan.clarke

Hi Jonathan,

Sorry to be a newbie but my remote access experience is fairly limited. I'm using Vine server and viewer to VNC into the remote machine and experiencing the same symptoms.

The terminal commands you're referring to, where are they entered? Is it into terminal on my machine or is it a feature of ARD that you can enter them into the remote machines terminal?

Many Thanx

Mar 31, 2010 1:45 PM in response to jonathan.clarke

Following your advice, plus a little experimentation, I found that if you kill the loginwindow process (not the loginwindow console process) you will NOT kill the user's login session. The loginwindow process starts when you select the "Login Window..." item from the fast user switching menu and is owned by root, so you'll have to use "sudo kill - 9 <process id>" to end it.

If you run ps again, you'll see that the process starts again almost immediately. Quitting Screen Sharing on your VNC client machine and connecting to the host again will take you to the login screen.

As a bonus, fast user switching between the two accounts now works... at least while I'm still logged into both of the accounts.

ARD and screen sharing become unresponsive when switching users

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.