Where Should I Set Environmental Variables For Use By Sublime Text 3

2

I have a Sublime Text 3 package that will only work if a particular environmental variable is set. The env is currently set in my .bash_profile, so if I launch Sublime Text from the Terminal, this env is available to it. I'm on OSX.

However if I don't launch it from the Terminal it isn't.

So How can I make an environmental variable available to Sublime Text 3?

Undistraction

Posted 2013-08-29T15:34:51.827

Reputation: 121

1what operating system are you using? – MattDMo – 2013-08-29T17:10:46.103

and what is the package? There may be an option to set the variable in a config file... – MattDMo – 2013-08-29T17:49:01.997

@MattDMo It's unrelated to the package. Just happens that a quirk of my system means that for the package to run a command successfully it needs the Env to be set. – Undistraction – 2013-08-29T19:16:42.333

OK, but the more information you provide the better the answer will be. Can you at least tell us what OS you're using? – MattDMo – 2013-08-29T19:22:08.340

Answers

0

use ~/.pam_environment

This file uses a special format: see http://man.cx/pam_env(5) , http://man.cx/pam_env(8)

glenn jackman

Posted 2013-08-29T15:34:51.827

Reputation: 18 546

Does this work on OSX? It isn't listed in the man page.

– Gilles 'SO- stop being evil' – 2014-12-29T23:49:02.620