• 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: Running cmd as logged in user from admin script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running cmd as logged in user from admin script


  • Subject: Re: Running cmd as logged in user from admin script
  • From: Alexander Cohen <email@hidden>
  • Date: Fri, 07 Mar 2008 10:41:51 -0500

Nice, thank you.

AC

On 7-Mar-08, at 10:37 AM, Fritz Anderson wrote:

On 7 Mar 2008, at 9:31 AM, Alexander Cohen wrote:

I have an installer that has a script that runs after the install. The installer is run with admin privileges. From the script, i need to run a cmd as the currently logged in user. Is there a way to do that ?

su $USER -c "/path/to/command"

If it's an application:

su $USER -c "open /Applications/MyApplication.app"

	— F


_______________________________________________ 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: 
 >Running cmd as logged in user from admin script (From: Alexander Cohen <email@hidden>)
 >Re: Running cmd as logged in user from admin script (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Running cmd as logged in user from admin script
  • Next by Date: Trouble writing to InfoPlist.strings
  • Previous by thread: Re: Running cmd as logged in user from admin script
  • Next by thread: Trouble writing to InfoPlist.strings
  • Index(es):
    • Date
    • Thread