Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron not working on Raspberry Pi

At the moment, I am developing a "kiosk" application for my Raspberry Pi. I decided to use Electron as it offers the key feature I need: Combining a web based UI with direct system an I/O access via node.js.

However, Electron refuses to run on my Raspberry Pi whereas it works just fine on the computer I am using for development. Nothing happens after issuing electron . in the terminal, the program just exits without showing a window or any errors in the command line. Any clues? I couldn't find any on the web so far. I installed Electron via npm install electron-prebuilt -g, which downloaded and installed the latest ARM-version.

If this is an unresolvable compatibility problem: Are there any good alternatives for Electron?

Thanks in advance!

like image 945
stoeffn Avatar asked Aug 10 '15 19:08

stoeffn


3 Answers

Unfortunately the reason for that error is that Electron currently does not support ARM devices. We will have to wait until it is implemented

See this issue https://github.com/atom/electron/issues/1702

-- Update

As noted by @skeggse, Electron now does support ARM.

  • 1 Get the dependecies going apt-get install libgtk2.0-0 libnotify4 libgconf2-4 libnss3 node npm

  • 2 Download the latest arm release called electron-...-linux-arm.zip from here

  • 3 unzip electron-...-linux-arm.zip

  • 4 go inside the folder and double click the file named electron

  • 5 Have fun!

like image 92
Marcelo Lazaroni Avatar answered Oct 31 '22 23:10

Marcelo Lazaroni


Depending on which Raspberry Pi you have it may be an incompatible binary. The electron prebuilt binaries, I believe, target armv7-hf. Try building electron from source. The instructions can be found here https://github.com/atom/electron/blob/master/docs/development/build-instructions-linux.md

Note that if you are interested in using hardware float support (at least prior to RPiB+) you might want to run Raspbian or another port with hard-float support. (ref)

like image 1
user650881 Avatar answered Nov 01 '22 00:11

user650881


Connect to Raspberry SSH as user pi, and execute this:

# Clone this repository
git clone https://github.com/electron/electron-quick-start
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install
# Set display
export DISPLAY=:0
# Run the app
npm start
like image 1
GAMELASTER Avatar answered Nov 01 '22 00:11

GAMELASTER