-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
28 lines (24 loc) · 1.29 KB
/
Copy pathstart.sh
File metadata and controls
28 lines (24 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
export URL_LAUNCHER_NODE=1
export NODE_ENV=production
# By default docker gives us 64MB of shared memory size but to display heavy
# pages we need more.
umount /dev/shm && mount -t tmpfs shm /dev/shm
# using local electron module instead of the global electron lets you
# easily control specific version dependency between your app and electron itself.
# the syntax below starts an X istance with ONLY our electronJS fired up,
# it saves you a LOT of resources avoiding full-desktops envs
rm /tmp/.X0-lock &>/dev/null || true
# Adding this to see if I can get container/host communication working
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
# Specific configuration for raspberry pi: set up and start using the pi TFT LCD;
# If no LCD attached, assume we're using the built-in HDMI output.
if [ ! -c /dev/fb1 ] && [ "$TFT" = "1" ]; then
modprobe spi-bcm2708 || true
modprobe fbtft_device name=pitft verbose=0 rotate=${TFT_ROTATE:-0} || true
sleep 1
mknod /dev/fb1 c $(cat /sys/class/graphics/fb1/dev | tr ':' ' ') || true
FRAMEBUFFER=/dev/fb1 startx /usr/src/app/node_modules/electron/dist/electron /usr/src/app --enable-logging --no-sandbox --disable-gpu
else
startx /usr/src/app/node_modules/electron/dist/electron /usr/src/app --enable-logging --no-sandbox
fi