• 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: Launch agent runs as root immediately after install
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launch agent runs as root immediately after install


  • Subject: Re: Launch agent runs as root immediately after install
  • From: Arjun SM <email@hidden>
  • Date: Fri, 19 Mar 2010 15:53:22 +0530

Hi,

   Launch the agent in all logged in user context.
for userName in `/usr/bin/users`
do
su -l $userName -c "launchctl load -S Aqua /Library/LaunchAgents/com.yourcmpny.plist"
done
But there are some disadvantages when you have to support multiple logged in Users at the time of Install which I have discussed in the below link which you might want to take a look at.
http://old.nabble.com/launch_msg():-Socket-is-not-connected-td23923855.html

regards,
~Arjun

On Fri, Mar 19, 2010 at 3:28 PM, Chris Adamson <email@hidden> wrote:
We're installing a LaunchAgent that we want to get up and running immediately, so in a post-install script, we call "launchctl load /Library/LaunchAgents/path.to.our.agent.plist".

I've noticed that this runs the agent as root, whereas the agent will run as the user on subsequent logins.

Is there a way to get the agent running as the user who's performing the install, rather than root?

Thanks in advance.

--Chris

 _______________________________________________
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 arjun.sm@gmail.com

 _______________________________________________
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

  • Follow-Ups:
    • Re: Launch agent runs as root immediately after install
      • From: Xochitl Lunde <email@hidden>
References: 
 >Launch agent runs as root immediately after install (From: Chris Adamson <email@hidden>)

  • Prev by Date: Launch agent runs as root immediately after install
  • Next by Date: Re: Launch agent runs as root immediately after install
  • Previous by thread: Launch agent runs as root immediately after install
  • Next by thread: Re: Launch agent runs as root immediately after install
  • Index(es):
    • Date
    • Thread