• 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
Getting the User/Owner of another process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the User/Owner of another process


  • Subject: Getting the User/Owner of another process
  • From: "John Farmer" <email@hidden>
  • Date: Tue, 30 Sep 2003 07:51:42 -0700

I need to be able to get the User/Owner of another process, like Finder. I
need to do this because I need to get the user name of the person currently
logged in. Now before you berate me, I did try to use NSUserName(),
NSFullUserName() functions.

There seems to be a very subtle bug in these functions. These functions were
unsuccessful because I am trying to get the user name of the person currently
logged in, in the Startup Item I am using, but contrary to the documentation
for these two functions, they do not get the User Name of the user currently
logged in they get the User Name of WHOEVER HAS OWNERSHIP OF THE APPLICATIONS
PROCESS (for Startup Items this seems always to be Root).

So I need to someway get the name of the person logged in, in a Startup Item
so I can setup the last preferences for the app and driver I am writing. The
only way I have thought of to do this, is to be able to get the User Name of
the user that owns the Finder process (which always seems to have the current
logged in user as the owner of that process... see the Process Viewer). Does
anyone have any suggestions on how to do this, or how to otherwise get the
current users login name in a Startup Item?

Thanks,

John D. Farmer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Getting the User/Owner of another process
      • From: David Remahl <email@hidden>
    • Re: Getting the User/Owner of another process
      • From: "Alastair J.Houghton" <email@hidden>
  • Prev by Date: Call CFM shlb from Cocoa
  • Next by Date: Re: Address Book Helper code released to public domain
  • Previous by thread: Re: Call CFM shlb from Cocoa
  • Next by thread: Re: Getting the User/Owner of another process
  • Index(es):
    • Date
    • Thread