• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CGSessionCopyCurrentDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGSessionCopyCurrentDictionary


  • Subject: Re: CGSessionCopyCurrentDictionary
  • From: Mike Paquette <email@hidden>
  • Date: Thu, 10 Nov 2005 08:09:17 -0800


On Nov 10, 2005, at 6:28 AM, Jeff Schindler wrote:

There is no valid user name at that point. No user has logged in yet.

To check the login state of the session, use the key kCGSessionLoginDoneKey. The value will be kCFBooleanFalse if no user has logged in yet, and kCFBooleanTrue if a user is logged in.


OK, that makes sense and I expected as such. But it seems as though the behavior has changed in 10.4.3 and doesn't work as the headers describe.

The headers will be corrected. The old behavior was incorrect, and considered to be a bug.


Is kCGSessionLoginDoneKey guaranteed to be a valid key to check in both 10.3 and 10.4?

Yes. The keys kCGSessionLoginDoneKey and kCGSSessionOnConsoleKey are present and valid in 10.3 and 10.4.


I suspect that what is happening in 10.4.3 is that CGSessionCopyCurrentDictionary is returning non-null prior to login, which I believe is not the case pre-10.4.3 - is that possible?

CGSessionCopyCurrentDictionary() can return NULL if the caller is not running within a security session associated with a graphical user interface. You can get this result wen running a program from SSH, for example.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: CGSessionCopyCurrentDictionary
      • From: "Jeff Schindler" <email@hidden>
References: 
 >CGSessionCopyCurrentDictionary (From: "Jeff Schindler" <email@hidden>)
 >Re: CGSessionCopyCurrentDictionary (From: Mike Paquette <email@hidden>)
 >Re: CGSessionCopyCurrentDictionary (From: "Jeff Schindler" <email@hidden>)

  • Prev by Date: Re: refreshing the header title for an NSTableColumn
  • Next by Date: Re: Core Data bug? (storing a "special" char sequence)
  • Previous by thread: Re: CGSessionCopyCurrentDictionary
  • Next by thread: Re: CGSessionCopyCurrentDictionary
  • Index(es):
    • Date
    • Thread