mirror of
https://git.myvelabs.com/novnc/alpine.git
synced 2025-12-17 21:26:21 +00:00
Switch from i3 to openbox WM
This commit is contained in:
parent
147280b82f
commit
05f054f088
4 changed files with 78 additions and 0 deletions
42
openbox/10-tigervnc.sh
Executable file
42
openbox/10-tigervnc.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Check for MYVNC_VNCPASS variable
|
||||||
|
if [ -z ${MYVNC_VNCPASS} ]
|
||||||
|
then
|
||||||
|
echo "MYVNC_VNCPASS env variable is missing"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure tigervnc auth
|
||||||
|
if [ ! -f ~/.vnc/passwd ]
|
||||||
|
then
|
||||||
|
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.vnc/passwd
|
||||||
|
chmod 0600 ~/.vnc/passwd
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove VNCPASS env
|
||||||
|
unset MYVNC_VNCPASS
|
||||||
|
|
||||||
|
# VNC xstartup
|
||||||
|
install /dev/stdin ~/.vnc/xstartup <<- xstartup
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
unset SESSION_MANAGER
|
||||||
|
unset DBUS_SESSION_BUS_ADDRESS
|
||||||
|
exec ${STARTXBIN}
|
||||||
|
xstartup
|
||||||
|
|
||||||
|
# Turn vnc sharing on/off
|
||||||
|
if [[ ${MYVNC_VNCSHARING} == "true" ]] || [[ ${MYVNC_VNCSHARING} == "1" ]]
|
||||||
|
then
|
||||||
|
_MYVNC_VNCSHARING=alwaysshared
|
||||||
|
else
|
||||||
|
_MYVNC_VNCSHARING=nevershared
|
||||||
|
fi
|
||||||
|
|
||||||
|
# VNC config
|
||||||
|
cat >~/.vnc/config <<- vncconfig
|
||||||
|
session=openbox
|
||||||
|
geometry=1920x1080
|
||||||
|
framerate=60
|
||||||
|
depth=32
|
||||||
|
${_MYVNC_VNCSHARING}
|
||||||
|
vncconfig
|
||||||
3
openbox/90-tigervnc.sh
Executable file
3
openbox/90-tigervnc.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Launch Tigervnc
|
||||||
|
vncserver :0 &
|
||||||
26
openbox/Dockerfile
Normal file
26
openbox/Dockerfile
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
# syntax = docker/dockerfile:1
|
||||||
|
FROM myvnc/alpine/base
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Build ARG: use "root" for debugging
|
||||||
|
ARG debug
|
||||||
|
|
||||||
|
# X session environment variable
|
||||||
|
ENV STARTXBIN=openbox-session
|
||||||
|
|
||||||
|
# Run
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
tigervnc \
|
||||||
|
openbox \
|
||||||
|
font-dejavu \
|
||||||
|
&& sed '/<\/applications>/i\ \
|
||||||
|
<application class="*">\ \
|
||||||
|
<maximized>true</maximized>\ \
|
||||||
|
<decor>no</decor>\ \
|
||||||
|
</application>' -i /etc/xdg/openbox/rc.xml
|
||||||
|
|
||||||
|
# Tigervnc initialization scripts
|
||||||
|
COPY *.sh /app/init.d/
|
||||||
|
|
||||||
|
# Reset user
|
||||||
|
USER ${debug:-user}
|
||||||
7
openbox/build
Executable file
7
openbox/build
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Docker build
|
||||||
|
# Optional: buildtag
|
||||||
|
DOCKER_BUILDKIT=1 \
|
||||||
|
docker build . \
|
||||||
|
--build-arg debug=${debug:-""} \
|
||||||
|
--tag ${buildtag:-myvnc/alpine/openbox}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue