Best way to create an electron device


#1

Hi All.

So I am currently working on a little project and I was wondering what the best way would be to create a device that loads electron on startup and cannot be escaped. Its an application for a friends restaurant to sit in the doorway and handle all his table bookings with a touch screen. Currently I am running it on ubuntu desktop 16.04, and when its first turned on he selects the application and starts it up.

I have three problems I want to solve so any help would be fantastic.

  1. Ubuntu error messages still show up.
  2. Ubuntu screen gestures can exit the app.
  3. I would like to auto update his app, whats the best way to do this?

Maybe it would be better to use a different OS entirely. If so any recommendations on this would be great.

The optimal end product would be for him to plug in the computer and my app to auto start on startup that auto updates when new versions are on the server.


#2

Stock Ubuntu is a very feature-rich distro. The specific problems you’re having are associated with the desktop environment, so an immediate and easy step that you could take would be to move to a version that’s packaged with a more lightweight DE, like Xubuntu (which runs XFCE). The less obtrusive the DE is, the better, and Unity is designed to be very involved with the user.

I feel like a more precise and powerful tool for what you want would be Manjaro (which is based on Arch and comes with XFCE by default), but that would involve more work from you in learning how to use its features. If you do decide to take the plunge, Arch offers a unique package management system and you can create a repository on your server, install the package with your code from that repository, and then simply automate the update command (pacman -Syu in a shell script running as root) to run on boot or overnight. The Arch User Repository (AUR) has a variety of Electron applications already as packages, so you can scope out how they’re set up.

I do not know the procedure for hiding or disabling error messages in XFCE/GTK 2. However, I would be surprised if it wasn’t possible.


#3

If you want an out of the box solution to updating and maintaining remote machines I would consider looking into Resin IO. Its based on Arch Linux and runs your electron app inside a docker container that can be updated by simply running a git push.

I think it solves all of your problems and probably gives you a couple of extra bonuses like being able to live view the logs and open up terminal on the machine thats out in the wild. Only downsides would be that it can only be used (with ease) on the boards that its been built for and if you had more than 5 machines running you would have to start paying a subscription.

Have a look here - https://resin.io/


#4

After scanning the Resin.io site, I change my original answer. That would be a more powerful and focused tool to use for this purpose. Some other random Arch install would be the hard-mode way to accomplish the same sort of thing.


#5

Thanks! Resin looks perfect, I was already using a NUC so no problems there. Thanks again.