Richard Bucker

Atom Shell was super easy

Posted at — Apr 23, 2015

The Atom Electron project, formerly known as Atom Shell, was easier to implement than I could have every imagined.download the binary from the release pagecreate a folder for your hello world projectcreate the 3 required files (see quick start docs)launch the electron binarydrag your folder onto the landing part of the executable’s windowAnd your application should just start running. The quick start page offers additional information for running the application from the command line etc.In my use-case I have two additional requirements:kiosk modedisable close window and quitAdding these features was trivial(full listing). Essentially I needed to capture the application quit (a) event and prevent the default action and capture the close window (b) event and prevent it’s default action.(a)app.on(‘before-quit’, function(event) {    event.preventDefault();});(b)mainWindow.on(‘close’, function(event) {    event.preventDefault();});And that was it.UPDATE: electron does not seem to work in my ubuntu 14.04 environment.