generated from oci/template
make it smol.
nuked the VNC server as that added, i shit ye not, 350mb
This commit is contained in:
parent
348d637948
commit
f9c58ca098
3 changed files with 10 additions and 41 deletions
29
vnc.sh
29
vnc.sh
|
@ -1,34 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Prepare variables
|
||||
: "${VNC_BUILTIN_WIDTH:=1024}"
|
||||
: "${VNC_BUILTIN_HEIGHT:=786}"
|
||||
: "${VNC_BUILTIN_PIXELDEPTH:=32}"
|
||||
: "${VNC_BUILTIN_DISABLED:=true}"
|
||||
|
||||
if [ "${VNC_BUILTIN_DISABLED}" = true ]; then
|
||||
echo "Builtin VNC is disabled. You must ensure the DISPLAY variable is set and the target display is accessible"
|
||||
echo "Using display ${DISPLAY}"
|
||||
else
|
||||
echo "Builtin VNC is enabled. The DISPLAY variable will be ignored and overwritten"
|
||||
export DISPLAY=":0"
|
||||
|
||||
echo "Using display ${DISPLAY} with size of ${VNC_BUILTIN_WIDTH}x${VNC_BUILTIN_HEIGHT} and pixel depth ${VNC_BUILTIN_PIXELDEPTH}"
|
||||
Xvfb ${DISPLAY} -screen 0 "${VNC_BUILTIN_WIDTH}x${VNC_BUILTIN_HEIGHT}x${VNC_BUILTIN_PIXELDEPTH}" &
|
||||
fi
|
||||
|
||||
# Wait for the display to become ready
|
||||
while ! xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; do
|
||||
echo "Waiting for display ${DISPLAY} to become ready..."
|
||||
sleep 1
|
||||
done
|
||||
echo "Display ${DISPLAY} is ready!"
|
||||
|
||||
# Launch the VNC server if enabled
|
||||
if [ "${VNC_BUILTIN_DISABLED}" != true ]; then
|
||||
x11vnc -bg -forever -nopw -display ${DISPLAY} &
|
||||
fi
|
||||
|
||||
# Launch i3 window manager
|
||||
/usr/bin/i3
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue