• 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: How to execute script as root, and then an another script on behalf of an ordinary user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to execute script as root, and then an another script on behalf of an ordinary user


  • Subject: Re: How to execute script as root, and then an another script on behalf of an ordinary user
  • From: Greg Neagle <email@hidden>
  • Date: Wed, 5 Jan 2011 08:20:05 -0800

On Jan 5, 2011, at 7:46 AM, eveningnick eveningnick wrote:

This is difficult to do correctly in all instances. See http://stackoverflow.com/questions/1106638/starting-stopping-a-launchd-agent-for-all-users-with-gui-sessions

Thanks a lot for the link!
What do you mean by "all instances"? As far as i understand, i need to
find a pid of some process that was launched by the current logged in
user. Finder, for example. And then execute launchctl bsexec
[finderPID] "/tmp/myloadscript". Or i am wrong? Are there any
additional pitfalls?

What about the case of additional users logged in via Fast User Switching?
And make sure you handle the case of no user logged in at all...

-Greg

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

This email sent to email@hidden

References: 
 >How to execute script as root, and then an another script on behalf of an ordinary user (From: eveningnick eveningnick <email@hidden>)
 >Re: How to execute script as root, and then an another script on behalf of an ordinary user (From: Greg Neagle <email@hidden>)
 >Re: How to execute script as root, and then an another script on behalf of an ordinary user (From: eveningnick eveningnick <email@hidden>)

  • Prev by Date: Re: Iceberg Package installing into /tmp by default?
  • Next by Date: Re: How to execute script as root, and then an another script on behalf of an ordinary user
  • Previous by thread: Re: How to execute script as root, and then an another script on behalf of an ordinary user
  • Next by thread: Re: How to execute script as root, and then an another script on behalf of an ordinary user
  • Index(es):
    • Date
    • Thread