How to install Electron app on Raspberry Pi? - linux

I have created an Electron app. I want to install it on a Raspberry Pi so it can be displayed on a small, portable screen. How do I install my electron app on a Raspberry Pi?
What I have tried:
I have used electron-packager to create a linux package for my app. (Note: I can use electron-packager and create a .dmg or .exe for Mac or Windows with no problems)
I have downloaded Raspberry Pi OS on my Raspberry Pi and copied the app package onto the desktop.
Next, I used electron-installer-debian to create a .deb file on the Desktop of the Raspberry Pi.
Finally, I double clicked on the .deb file on the Raspberry Pi's desktop and it installs successfully!
However, when I click on the application to open it, I get the error: invalid desktop entry file.
I have checked out the .desktop file that was created on the Raspberry Pi and it looks normal and valid to me...
Commands I used:
electron-packager . --platform=linux --arch=arm64 (My Raspberry Pi is arm64)
electron-installer-debian --src myApp-linux-arm64 --dest ./ --arch x64
I am not familiar with Linux at all. I just want my electron app to run on a Raspberry Pi. Any help would be appreciated!

Related

How to build node.js project for Raspberry pi with PKG(npm) from Windows 10 or Ubuntu 20.04?

I need to make an executable of my node.js project for Raspberry Pi.
I installed npm, node, and pkg successfully.
https://www.npmjs.com/package/pkg
sudo npm install -g pkg
When I call the below command the process starts and hangs for more than 10 hours at
sudo pkg MyApp.js --target linux-armv7
.....
make [ ] 0%
Same project if I build from Windows10 VS Studio Code with Windows Node.js.
Also from Ubuntu 20.04 system, I get the result in 2 seconds.
But Windows/Ubuntu build doesn't support --target linux-armv7
If I set --target linux I get the executable in 2 seconds.
And that executable doesn't work in Raspberry pi because it doesn't build for Armv7.
There should be some tweaking to make a --target linux-armv7 from Window10 or Ubuntu Linux.
We can't spend 24 hours on a single executable build.
If any future correction on the code again takes 24 hours.
Answer on the behalf of OP:
I have finally found a solution for my issue by adding node version on the -t option.

PyQt for Beaglebone

I am trying to develop a GUI application on a Beaglebone Black (BBB) using PyQt, but I don't know if it is necessary to install this application on the BBB or if I can do it using a remote application such as VMware (Ubuntu). I investigated and found out that PyQt is already installed on the latest Debian image for the BBB, so I tried to install this application by using the command line sudo apt-get install PyQt4, but I receive a message saying "this file was not found".
Is installing this program on the BBB the best option, or is it better doing it remotely with VMware? Thanks in advance.
Install putty on your local machine, then you can SSH to the BBB using address 192.168.7.2 if you are powering it via USB from your system. And then start anything you want to do on BBB
Try the following command to install:
sudo apt-get install python3-pyqt4
Use apt-cache search PyQt4 to list all available packages related to PyQt and select the exact package(s) you want to install. You must install the basic package on the BBB board if you want your application to run on the BBB board directly. If your application is a web client (communicates with the BBB board by socket), you can install the application anywhere you want.

Can I develop Linux based Raspberry Pi apps in Visual Studio 2015 or on a Mac (Eclipse or XCode)?

I know there's a lot you can do in VS2015 as far as cross platform mobile dev, but I am not sure if it can do Linux, specifically for the Raspberry Pi Raspbian OS.
Can it?
If not, can I use something like Eclipse on my Mac or something else on my Windows machine?
I've done some mobile work before in iOS and a tiny bit of exploration in Droid so I imagine it's close to one of those.
Yes you can.
Raspian is a pretty complete OS, so you could run apps compiled by any language like Python/node/C/C++/C#. (Raspberry Pi 2 can now run Ubuntu)
Run Windows Apps
The easiest way to do it would be to load Windows IoT Core onto Raspberry Pi and create UWP apps in Visual Studio. This gives you remote deployment, debugging and powerful APIs from the get go. Windows Iot Core for Raspberry Pi
Python & Node
Write in VS using
nodejstools
python tools
Then you just copy paste the code to rpi, and run it using node/python
C/C++
Simply use VS to develop, and build using the Windows toolchain for Raspberry Pi.
C#
I haven't played around it too much, try mono
You can also use the "Visual C++ for Linux Development" extension for Visual studio 2015
I use my Raspberry Pi to write desktop programs in C#.Net. I use Mono to run the program and MonoDevelop to write it. Mono supports using System.Windows.Forms on the Raspberry Pi, but MonoDevelop only supports GTK for a gui. To use System.Windows.Forms, you need to code it directly instead of dropping controls on a form.
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
sudo apt-get install monodevelop
Needed for debugging of console applications:
sudo apt-get install xterm
sudo apt-get dist-upgrade

PVFS2 on Raspberry Pi B+

is it possible to install PVFS2/OrangeFS on a Raspberry Pi cluster?
I already installed it on Linux but i really dont know how to install it on a Raspberry. Anyone got an idea or is it simple as installing it on the build system?

Install Lazarus on Raspberry Pi

I want to develop with Lazarus on Raspberry Pi, but until now I can't.
Here I've read this:
In the Raspbian OS it is easy to install Lazarus and Free Pascal. In order to do this simply open a terminal window and type:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fpc
sudo apt-get install lazarus
I've tryed to install FPC for Linux ARM, but the installer didn't work.
Moreover I dont't know where to get Lazarus for Linux ARM.
It seems that Lazarus and FPC for Linux are target to x86/x64 and not fot ARM.
Can someone help me where can I download one single bundled of binaries (Lazarus + FPC) that install out of the box (without the need of source compilation) in the same way as the Windows version?
Another question: is that possible to cross-compile from Windows to Raspbian?
I've done cross-compilations many times but between other OSs.
Thank you
If you use the shell commands from above (those that begin with "sudo apt-get") you don't have to install anything in addition. Lazarus and FPC should be readily installed and available from the "Programming" section of the LXDE start menu.

Resources