mirror of
https://git.myvelabs.com/novnc/alpine.git
synced 2025-12-18 00:06:21 +00:00
Add kdeplasma
This commit is contained in:
parent
4e3c053d54
commit
43b35b07be
4 changed files with 84 additions and 0 deletions
50
plasma/10-tigervnc.sh
Executable file
50
plasma/10-tigervnc.sh
Executable file
|
|
@ -0,0 +1,50 @@
|
||||||
|
#!/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=plasmax11
|
||||||
|
geometry=1920x1080
|
||||||
|
framerate=60
|
||||||
|
depth=32
|
||||||
|
${_MYVNC_VNCSHARING}
|
||||||
|
vncconfig
|
||||||
|
|
||||||
|
# Disable KDE screenlock
|
||||||
|
cat >~/.config/kscreenlockerrc <<- 'kscreenlockerrc'
|
||||||
|
[Daemon]
|
||||||
|
Autolock=false
|
||||||
|
LockOnResume=false
|
||||||
|
Timeout=0
|
||||||
|
kscreenlockerrc
|
||||||
3
plasma/90-tigervnc.sh
Executable file
3
plasma/90-tigervnc.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Launch Tigervnc
|
||||||
|
vncserver :0 &
|
||||||
25
plasma/Dockerfile
Normal file
25
plasma/Dockerfile
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
# syntax = docker/dockerfile:1.2
|
||||||
|
FROM alpine/base
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# X session environment variable
|
||||||
|
ENV STARTXBIN startplasma-x11
|
||||||
|
|
||||||
|
# Run
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
tigervnc \
|
||||||
|
plasma-desktop-meta \
|
||||||
|
font-dejavu \
|
||||||
|
firefox \
|
||||||
|
&& printf '%s\n' 'permit nopass user as root cmd /sbin/apk add' >/etc/doas.conf
|
||||||
|
|
||||||
|
# configure nvidia container runtime
|
||||||
|
# https://github.com/NVIDIA/nvidia-container-runtime#environment-variables-oci-spec
|
||||||
|
ENV NVIDIA_VISIBLE_DEVICES all
|
||||||
|
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
|
||||||
|
|
||||||
|
# Tigervnc initialization scripts
|
||||||
|
COPY *.sh /app/init.d/
|
||||||
|
|
||||||
|
# Reset user home directory
|
||||||
|
USER user
|
||||||
6
plasma/build
Executable file
6
plasma/build
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Docker build
|
||||||
|
# Optional: buildtag
|
||||||
|
DOCKER_BUILDKIT=1 \
|
||||||
|
docker build . \
|
||||||
|
--tag ${buildtag:-alpine/webtop:plasma}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue