• 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: detecting logout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting logout


  • Subject: Re: detecting logout
  • From: Pete Gontier <email@hidden>
  • Date: Tue, 01 Feb 2005 15:11:05 -0800

circa 2/1/05 2:14 PM, "Paul Nelson" <email@hidden> wrote:

>> Apple's QA1133 seems to be the available wisdom on knowing when users login
>> and logout... Unfortunately, this QA seems to be out of date.

> Look for documentation for
>   SCDynamicStoreKeyCreateConsoleUser
> and
>   SCDynamicStoreSetNotificationKeys
>
> You should get a notification whenever any user logs out of the "console"
> (anyone logged in with fast user switching too).  Your code will have to
> figure out who logged out.

You're referring to what's documented in QA1133, which as I explained has
proven inadequate. However, I did just think of an algorithm which involves
counting the processes which belong to the current user and quitting if
there is only one after asserting that it is me, but that seems quite
roundabout and indirect and may create a race with the user logging in
again. I will have to give it some consideration.

circa 2/1/05 2:14 PM, "Jerry Pendergraft" <email@hidden> wrote:

> Even though you can't reasonably modify each users login script you should
> be able to modify /etc/profile which is run by all logins - I think that
> includes ssh sessions.

I don't think it's a good idea for shrink-wrap software to modify said file.

circa 2/1/05 2:21 PM, "Chad Jones" <email@hidden> wrote:

> ...if you email Apple DTS they can send you some documentation I worked on
> just before leaving there. That is if you ask for the document by name:
> Technote 2077 (Fast User Switching  technote). The document wasn't completely
> done at my departure. However, it includes full sample code and documentation
> on SystemLoginItems and their use, along with description of other mechanisms
> you might be interested in.  ;-)

Have done.

  --

    Pete Gontier
    http://www.m-audio.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: detecting logout (From: Paul Nelson <email@hidden>)

  • Prev by Date: Re: detecting logout
  • Next by Date: Serial devices and cups printing
  • Previous by thread: Re: detecting logout
  • Next by thread: Re: detecting logout
  • Index(es):
    • Date
    • Thread