-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.sh
executable file
·41 lines (38 loc) · 956 Bytes
/
start.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
LAST_DISPLAY=$(ls /tmp/.X11-unix/ | sort | tail -n 1 | tail -c +2 | head -c -1)
DISPLAY=$((LAST_DISPLAY+1))
vt=$2
mkdir -p ~/portal_data
chown -R 1000:1000 ~/portal_data
Xorg -configure
Xorg :$DISPLAY vt$vt \
-dpms -s off -retro \
+extension RANDR \
+extension RENDER \
+extension GLX \
+extension XVideo \
+extension DOUBLE-BUFFER \
+extension SECURITY \
+extension DAMAGE \
-extension X-Resource \
-extension XINERAMA -xinerama \
-extension MIT-SHM \
-nolisten tcp \
+extension Composite +extension COMPOSITE \
-extension XTEST -tst \
-dpi 96 \
-verbose \
-quiet &
docker run \
--name PORTAL_$vt \
-e DISPLAY=:$DISPLAY \
-v /tmp/.X11-unix/X$DISPLAY:/tmp/.X11-unix/X$DISPLAY:rw \
--rm \
-v ${PWD}/run:/home/worker/.run:ro \
-v ~/portal_data:/home/worker/data:rw \
-v /dev:/dev \
-v /etc/localtime:/etc/localtime:ro \
--net=host \
--ipc=host \
--privileged \
-d \
$1