Environment variables for GUI apps

Hello,


I'm looking for a way to set environment variables for GUI applications like IntelliJ that are launched via the dock or Spotlight.

I've found launchctl setenv on Google, that only works until the next reboot. The /etc/launchd.conf doesn't exist on my MacOS Monterey.

So, can anybody tell me a way to set an env variable that's active after every reboot? In the best case it's only for the logged in user.

Thx in advance!

MacBook Pro 16″, macOS 12.3

Posted on May 6, 2022 4:18 AM

Reply
2 replies

May 9, 2022 8:15 AM in response to J.Holden

J.Holden wrote:

Hello,

I'm looking for a way to set environment variables for GUI applications like IntelliJ that are launched via the dock or Spotlight.
I've found launchctl setenv on Google, that only works until the next reboot. The /etc/launchd.conf doesn't exist on my MacOS Monterey.
So, can anybody tell me a way to set an env variable that's active after every reboot? In the best case it's only for the logged in user.
Thx in advance!


See if there is anything here of interest...(?)


What are cron and crontab, and how do I use them?

https://kb.iu.edu/d/afiz


how to—

https://betterprogramming.pub/how-to-execute-a-cron-job-on-mac-with-crontab-b2decf2968eb

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Environment variables for GUI apps

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.