• 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: user home directory?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: user home directory?


  • Subject: Re: user home directory?
  • From: Doug Brown <email@hidden>
  • Date: Thu, 13 Oct 2011 15:02:46 +1000

On 13 October 2011 08:18, danchik <email@hidden> wrote:
I had similar issue with trying to determine the user that started the installer that has to install with admin priviliges. After user elevates it, the post script launched another program to do additional steps, but the program is not able to expand tildas in path to the correct user.  How does one get the user (or user home path) that started the installer once the installer has been elevated outside of the installer itself?

This will give you the current gui user's username and their home directory path:

currentguiusername=`ls -l /dev/console | awk '{print $3}'`
currentguiuserhomedirectory=`dscl localhost read /Local/Default/Users/$currentguiusername NFSHomeDirectory | awk '{print $2}'`

Cheers,
Doug
 _______________________________________________
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: 
 >user home directory? (From: Roy Nielsen <email@hidden>)
 >Re: user home directory? (From: Per Olofsson <email@hidden>)
 >Re: user home directory? (From: danchik <email@hidden>)

  • Prev by Date: Re: user home directory?
  • Next by Date: Environment variables question
  • Previous by thread: Re: user home directory?
  • Next by thread: Environment variables question
  • Index(es):
    • Date
    • Thread