Sunday, 18 August 2019

macos - Editing the /etc/launchd.conf file in OS X


I am trying to run Android project using Maven in Mac 10.7.4, for that I need to set environment and path variables.


This are the steps I need to follow to run android using Maven


Maven 3.0.3+ installed,



Set environment variable ANDROID_HOME to the path of your installed Android SDK and add $ANDROID_HOME/tools as well as $ANDROID_HOME/platform-tools to your $PATH. (or on Windows %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools).


MacOS users: Note that for the path to work on the commandline and in IDE's started by launchd you have to set it in /etc/launchd.conf and NOT in .bashrc or something else



But I am very new to OS X so I don't know how to set it. I seen this post but I get stuck in Step 4, saving the etc/launchd.conf file after entering the paths.




  • How do I set environment variables globally?




  • What do I need to open, edit, save the etc/launchd.conf file?





Answer



Do you actually need system-wide variables? If variables in your user environment would suffice you could create a directory ~/.MacOSX and a file environment.plist in it, in case one of them doesn't exist, and then add your variables to environment.plist.


mkdir ~/.MacOSX
touch ~/.MacOSX/environment.plist
open ~/.MacOSX/environment.plist

Log off and back on for the changes to become active.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...