-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
35 lines (31 loc) · 1.05 KB
/
entrypoint.sh
File metadata and controls
35 lines (31 loc) · 1.05 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
29
30
31
32
33
34
35
#!/bin/bash
set -e
# P0-1: Entrypoint to start xpra and launch an application.
# This script starts a virtual framebuffer, then launches an xpra server
# that runs a given command (e.g., a browser).
# Set a writable runtime dir for the user
export XDG_RUNTIME_DIR=/home/appuser/.xdg_runtime_dir
# The xvfb command xpra should run.
# xpra will substitute %d for the display number.
XVFB_CMD="/usr/bin/Xvfb +extension RANDR -screen 0 720x720x24"
echo "Starting xpra server on display ${DISPLAY} and launching command: $*"
# Use 'exec' to replace the shell process with the xpra process.
# Let xpra manage Xvfb for a more robust startup.
# --no-input-devices: Fixes issues with uinput device permissions.
exec xpra start \
--xvfb="${XVFB_CMD}" \
--bind-tcp=0.0.0.0:14500 \
--html=on \
--no-daemon \
--pulseaudio=no \
--notifications=no \
--system-tray=no \
--bell=no \
--webcam=no \
--microphone=no \
--speaker=no \
--clipboard=yes \
--exit-with-children \
--input-devices=none \
--mdns=no \
--start-child="$*"