Hey mates! I’ve been trying to solve this myself for some time now, but I’ve exhausted all of my (meager) knowledge so I’m hoping someone here can help.
I maintain the termination package which provides a terminal instance in Atom – it was forked from platformio-terminal and looks like terminal-plus, if you’re familiar with either, and this “bug” affects all of them. The trouble I’m
having is that it is impossible to open a file with the
atom command or otherwise manipulate atom:
$ atom AUTHORS $ electron: bad option: --app=/usr/lib/atom electron: bad option: --executed-from=/home/fred/Git/Termination electron: bad option: --pid=3824
LSOpenURLsWithRole() failed for the application /Applications/Atom.app with error -10810. projects $ atom README.md LSOpenURLsWithRole() failed for the application /Applications/Atom.app with error -10810.
After doing some digging it appears that electron is being set to run as node (and then this affects Atom - I’m not sure exactly how yet) so that when
atom is passed into the terminal,
node is called instead. You can see this when you compare the output of commands run inside termination:
$ atom --version v6.5.0 $ electron --version v6.5.0 $ node --version v7.3.0
to commands run in a dedicated system terminal
$ atom --version Atom : 1.12.7 Electron: 1.4.13 Chrome : 53.0.2785.143 Node : 6.5.0 $ electron --version v1.4.13 $ node --version v7.3.0
I believe that this is the Atom code that causes this to happen.
Further supporting this is the fact that if
unset ELECTRON_RUN_AS_NODE is run from inside termination,
atom and other commands behave ordinarily.
I’d like to remove this behavior, but I’m not sure exactly how to go about that. I’ve tried setting up the termination initialisation code to pass
unset ELECTRON_RUN_AS_NODE through the system shell whenever a terminal is generated, but that seemed to just freeze termination.
I’ve also tried modifying process.coffee to contain
env.ELECTRON_RUN_AS_NODE = 0 but this has had absolutely no effect.
can someone please help me figure out what’s going on here and what I should do so that
atom doesn’t run as electron/node? I’d be extremely grateful for any help!
Relevant issues and discussions: