-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·69 lines (53 loc) · 1.43 KB
/
entrypoint.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env bash
set -e
DIR=$(dirname "${BASH_SOURCE[0]}")
cd "$DIR"
NCA_LAYER_ARCHIVE="ncalayer.zip"
NCA_LAYER_DIR="ncalayer"
NCA_LAYER_HOME_DIR=~/"NCALayer"
NCA_LAYER_SCRIPT="ncalayer.sh"
NCA_LAYER_LOG=~/".config/NCALayer/ncalayer.log"
export XDG_RUNTIME_DIR=~
export XDG_SESSION_TYPE="wayland"
export WAYLAND_DISPLAY="wayland-1"
export DISPLAY=":0"
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
# Starting sway.
WLR_BACKENDS="headless" \
WLR_RENDERER="pixman" \
WLR_LIBINPUT_NO_DEVICES="1" \
sway -c "sway.conf" --unsupported-gpu &
# Starting vnc server.
wayvnc "0.0.0.0" &
# Downloading ncalayer archive.
yarn install
echo "Downloading ncalayer archive"
yarn download
# Unpacking ncalayer archive.
rm -rf "$NCA_LAYER_DIR"
mkdir -p "$NCA_LAYER_DIR"
unzip "$NCA_LAYER_ARCHIVE" -d "$NCA_LAYER_DIR"
# Fixes and workarounds.
chmod +x "${NCA_LAYER_DIR}/${NCA_LAYER_SCRIPT}"
mkdir -p ~/.local/share/applications
# Starting dbus.
dbus-uuidgen --ensure
export $(dbus-launch)
# Starting mako.
mako &
# Installing ncalayer.
./install.expect "$NCA_LAYER_DIR" "$NCA_LAYER_SCRIPT"
# Starting ncalayer.
"${NCA_LAYER_HOME_DIR}/${NCA_LAYER_SCRIPT}" --run &
tail -F -f -n +1 "$NCA_LAYER_LOG" &
# Staring google chrome stable.
google-chrome-stable \
--enable-features="UseOzonePlatform" \
--ozone-platform="wayland" \
--disable-dev-shm-usage \
--disabled-setupid-sandbox \
--no-sandbox \
--start-maximized \
&
echo "ncalayer is ready"
wait