You might try checking for any telltale running processes, or checking the output of lsof -i for any open sockets that are indicative of a VNC or ARD connection. That might have to run sudo'd as root.
http://www.akadia.com/services/lsof_quickstart.txt On Feb 26, 2010, at 18:53 PM, Joe Jones wrote: > That's what I thought. > > Why? So we can limit certain functionality over a remote connection. We do > this for Terminal Services connections on Windows and I was asked about doing > it for Mac. > > Thanx, > joe > > ________________________________________ > From: Matthew Lindfield Seager [matt...@sagacity.com.au] > Sent: Friday, February 26, 2010 1:41 PM > To: Joe Jones > Cc: cocoa-dev@lists.apple.com > Subject: Re: Is there any Cocoa API (or other way) to determine if an > application is running in a VNC or ARD session? > > On Saturday, February 27, 2010, Joe Jones <jo...@microsoft.com> wrote: >> >> Thanx, >> Joe > > Why? What are you trying to achieve? > > I doubt it though! AFAIK you can only have a remote console (i.e. > screen sharing) so the app isn't running in the VNC session, it's > running normally on the host computer. > > Your question only makes sense in the context of "Terminal Services" > style connections which aren't available on Snow Leopard [Server] > without third party software. > > Even if you could know if a user is currently connected via VNC/RDP > and even if you could tell whether the remote or local session (or > both at the same time) are currently controlling the computer that > still wouldn't take into consideration other sharing solutions (e.g. > LogMeIn). > > Matt > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/jonhendry%40mac.com > > This email sent to jonhen...@mac.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com