Setting environment variables via launchd.conf no longer works in OS X Yosemite/El Capitan/macOS Sierra/Mojave?

前端 未结 9 1387
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 08:07

It looks like the launchd.conf does not load my environment variable anymore. Has anyone else noticed that?

Is there another solution to permanently set

9条回答
  •  一向
    一向 (楼主)
    2020-11-22 08:41

    The solution is to add your variable to /etc/profile. Then everything works as expected! Of course you MUST do it as a root user with sudo nano /etc/profile. If you edit it with any other way the system will complain with a damaged /etc/profile, even if you change the permissions to root.

提交回复
热议问题