Get Local Console User info

Charles E. Heizer1 heizer1 at llnl.gov
Thu May 31 09:56:36 PDT 2007


So I have an daemon that is running as root, and I want to open a ³Reboot²
dialog using the current logged in user info. The reboot dialog is using the
AppleEvent kAERestart to reboot the machine. The problem I found is that if
I launch the Reboot app as root the AppleEvent does not execute properly
because of the environment.

I hope this makes sense,

Thanks,
- Charles


On 5/31/07 1:51 AM, "Finlay Dobbie" <finlay.dobbie at gmail.com> wrote:

> On 31/05/07, Charles E. Heizer1 <heizer1 at llnl.gov> wrote:
>> I think I finally found it on ADC
>>
>> http://developer.apple.com/qa/qa2001/qa1133.html
>>
>> I'm going after the console user who is the user physically at the computer.
>
> This approach has largely been obsoleted by the CGSession API as of 10.3.
>
> See
> <http://developer.apple.com/documentation/MacOSX/Conceptual/BPMultipleUsers/Co
> ncepts/FastUserSwitching.html>
>
> What do you want this information for, anyway?
>
>  -- Finlay
>


------------------------------------------------------------------------
Charles Heizer
Systems Management Solutions Group
Lawrence Livermore National Laboratory
7000 East Ave.
L-285
Livermore, CA 94550
Phone: (925)422-0197
Fax:(925)422-2425
email: heizer1 at llnl.gov
------------------------------------------------------------------------






More information about the MacOSX-dev mailing list