1.2.2 • Published 3 years ago

balena-electronjs v1.2.2

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
3 years ago

balena-electronjs

This is work in progress

What

Provides stuff that may be missing when running electron apps in kiosk mode (with no desktop environment):

  • a wifi configuration dialog
  • a file picker
  • an on-screen keyboard (onboard)
  • a dialog for mounting / umounting removable drives

How

  • Build this project's docker image docker build -t bejs .;
  • In your electron app project create a Dockerfile that uses the image you built above: FROM bejs;
  • Put your electron app in /usr/src/app in this Dockerfile.

This works by running a window manager (metacity for now), dbus, an on-screen keyboard (onboard) and requiring some js code before your application.

The required js code replaces the file picker, adds buttons for opening the additional dialogs and injects some javascript in each window to summon the on-screen keyboard when an input is focused.

Components

Wifi configuration

Works by communicating with NetworkManager via DBus.

File picker

Replaces the default electron gtk file picker, can be constrained with BALENA_ELECTRONJS_CONSTRAINT_PATH.

On-screen keyboard

onboard is summoned via the session dbus each time an input is focused.

Mounting / umounting of removable drives

Watches and allows to mount / umount removable drives in BALENA_ELECTRONJS_MOUNTS_ROOT.

Environment variables:

NameDescriptionDefault Value
BALENA_ELECTRONJS_MOUNTS_ROOTWhere the removable drives should be mounted/tmp/media
BALENA_ELECTRONJS_CONSTRAINT_PATHOnly files in this path will be accessible through the file picker
DBUS_SYSTEM_BUS_ADDRESSDBus address for communicating with NetworkManagerunix:path=/host/run/dbus/system_bus_socket
USE_XVFBUse Xvfb instead of startx if non empty
XVFB_RESOLUTIONXvfb resolution and color depth (only useful if USE_XVFB is set)1366x768x24
VNC_PASSWORDVnc password, will start x11vnc if non empty
XRANDR_ROTATIONRotate the screen with xrandr -o $XRANDR_ROTATION
1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago