• 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: LSEnvironment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LSEnvironment


  • Subject: Re: LSEnvironment
  • From: Greg Guerin <email@hidden>
  • Date: Sun, 5 Nov 2006 13:55:51 -0700

Dieter Oberkofler wrote:

>I'm trying to set some environment variables in an Carbon application
>bundle using the LSEnvironment key but the environment of the application
>does not seem to change at all.
>I checked the Apple documentation and it seems as if this should work.

It works for me, with either a Java program or a shell script that exec's
/usr/bin/printenv.  Tested on 10.4.7 and 10.3.5.

LSEnvironment only works on 10.3+.  And like other Info.plist keys, it only
has an effect when the app is launched.

Shell script:

#!/bin/sh
echo "## printenv.sh"
echo "args: " "$@"
printenv | sort

Put it in a file named "printenv.sh", then:
  chmod a+x printenv.sh

and change your Info.plist's CFBundleExecutable accordingly.  Output
appears on console log.

  -- GG


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

This email sent to email@hidden

  • Follow-Ups:
    • Re: LSEnvironment
      • From: Dieter Oberkofler <email@hidden>
  • Prev by Date: Re: Localising a Help File
  • Next by Date: Re: Builds cause iTunes to stutter
  • Previous by thread: LSEnvironment
  • Next by thread: Re: LSEnvironment
  • Index(es):
    • Date
    • Thread