jbranchaud / splitting-atoms

:dizzy_face: a community-built, community-driven guide to hacking on the Atom editor
http://jbranchaud.github.io/splitting-atoms/
MIT License
354 stars 29 forks source link

Add note about running Atom in cli vs. icon #26

Open rgbkrk opened 10 years ago

rgbkrk commented 10 years ago

As surfaced in https://github.com/rgbkrk/atom-script/issues/5#issuecomment-36551740, running Atom via the icon/Applications will load the environment used by launchctl rather than your shell.

Running Atom from the terminal is the way to go if you want access to virtualenv, rvm, nvm, etc.

jbranchaud commented 10 years ago

Interesting. Any thoughts on a way to configure Atom to launch with your preferred environment from the icon?

rgbkrk commented 10 years ago

It kind of makes me wonder if it should be part of the ~/.atom setup. That way when atom comes out for Windows, you've got what you need setup.

The only suggestion I would have for people is to mirror env vars they want into ~/.launchd.conf, which follows a setenv format:

setenv KEY 'value'

For script we'll be adding a way to set up the env you need on run. Right now it defaults to using process.env.

tresni commented 10 years ago

I am using the init script idea from #62 and it works beautifully from me. launchd.conf and everything else people suggest just didn't seam to work for me on Mavericks.