Environment variable configuration in Apple

Source: Internet
Author: User

Evironment can be used before mac OS x 10.7.4 environment variable configuration in apple. plist to control global environment variables. but after Lion, this method was abolished. at the same time, some ways to modify the configuration file will also affect the terminal's environment variables at most .. on Mountain Lion all the/etc/paths and/etc/launchd. conf editing doesn' t take any effect! Apple's Developer Forums say: "Change the Info. plist of the. app itself to contain an" LSEnvironment "dictionary with the environment variables you want .~ /. MacOSX/environment. plist is no longer supported. "how to configure the. app environment variables? At first, I used trick to run the app from the terminal. then the app inherits the terminal's environment variable... in the English world, find the following solution. change the Info. plist of. app itself to contain an "LSEnvironment" dictionary with the environment variables you want. there will be an Info. plist per application in WhatEver. app/Content/Info. plist. you can edit it. click the "+" on the Information Property List and add a dictionary called LSEnvironment. if you type it correctly it will rename it to Environment variables. and It changed to a dictionary. then you click the "+" by that for each environment variable you want to add under this dirctionary. QTDIR/Users /... close the application and restart it to take effect... the most critical step is to refresh your changes to the system. you need to force update the LaunchService database in the Terminal by using the lsregister command: Use the following command. /System/Library/Frameworks/CoreServices. framework/Frameworks/LaunchServices. framework/Support/lsregister-v-f/Applications/eclipse/XXXX. app

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.