mirror of
https://git.myvelabs.com/novnc/archlinux.git
synced 2025-12-18 09:16:20 +00:00
Optimize build parameters
This commit is contained in:
parent
a7ad922ad3
commit
65312a688b
218 changed files with 182 additions and 258 deletions
36
base/app/init.d/10-novnc.sh
Executable file
36
base/app/init.d/10-novnc.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env bash
|
||||
# Turn vnc sharing on/off
|
||||
if [[ ${MYVNC_VNCSHARING} == "true" ]] || [[ ${MYVNC_VNCSHARING} == "1" ]]
|
||||
then
|
||||
_MYVNC_VNCSHARING=true
|
||||
else
|
||||
_MYVNC_VNCSHARING=false
|
||||
fi
|
||||
|
||||
# Always default to remote scaling
|
||||
sed -i "/UI.initSetting\|resize/ s/resize', '.*');/resize', 'scale');/" /app/novnc/app/ui.js
|
||||
|
||||
# Always default to autoconnect=true
|
||||
sed -i "/let autoconnect/ s/autoconnect', .*);/autoconnect', true);/" /app/novnc/app/ui.js
|
||||
|
||||
# Change vnc shared view settings (defaults to false/off)
|
||||
sed -i "/UI.initSetting\|shared/ s/shared', .*);/shared', ${_MYVNC_VNCSHARING});/" /app/novnc/app/ui.js
|
||||
|
||||
# NoVNC custom title
|
||||
sed -i "/<title>noVNC<\/title>/ s/noVNC/${MYVNC_CUSTOM_TITLE:-noVNC}/g" /app/novnc/*.html
|
||||
|
||||
# Apply subpath to websocket
|
||||
if [[ ${MYVNC_PROXYPATH} == "/" ]]
|
||||
then
|
||||
unset _MYVNC_PROXYPATH
|
||||
elif [ ${MYVNC_PROXYPATH} ]
|
||||
then
|
||||
_MYVNC_PROXYPATH=$(echo ${MYVNC_PROXYPATH%/} | sed "s|^.*/||")
|
||||
sed -i "/UI.initSetting/ s|websockify|${_MYVNC_PROXYPATH}/&|" /app/novnc/app/ui.js
|
||||
fi
|
||||
|
||||
# Start NoVNC
|
||||
/app/novnc/utils/novnc_proxy \
|
||||
--listen 6080 \
|
||||
--vnc ${MYVNC_VNCSERVER_HOST:-localhost}:${MYVNC_VNCSERVER_PORT:-5900} \
|
||||
--file-only &
|
||||
Loading…
Add table
Add a link
Reference in a new issue