-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain
More file actions
executable file
·50 lines (39 loc) · 679 Bytes
/
Copy pathmain
File metadata and controls
executable file
·50 lines (39 loc) · 679 Bytes
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
#!/bin/sh
preface (){
N="$1"; shift
E="$1"; shift
F=$((10**$E))
M=$(($N+$F))
O="${M:1}"
echo "$O"
}
exposeui (){
N="$1"; shift
M="$1"; shift
while true; do
socat TCP-LISTEN:59$(preface $M 2),reuseaddr,fork TCP-CONNECT:127.0.0.1:59$(preface $N 2)
sleep 60
done
}
launchui (){
N="$1"; shift
SIZE="$1"; shift
while true; do
/opt/victronenergy/gui/gui -nomouse -display VNC:refreshrate=60:depth=32:size=$SIZE:$N
sleep 60
done
}
ui ()(
N="$1"; shift
SIZE="$1"; shift
launchui "$N" "$SIZE" &
exposeui "$N" "$(($N + 10))" &
wait
)
echo 'Waiting for initial UI...'
sleep 60
exposeui 0 10 &
ui 1 840x476 &
ui 2 840x476 &
ui 3 1280x800 &
wait