From 4cb0af88a5c8026bb1a9b2488f112d74b18e4769 Mon Sep 17 00:00:00 2001 From: myve Date: Sun, 21 Jul 2024 01:29:21 +0000 Subject: [PATCH] Add archlinux plasma Dockerfile --- archplasma/10-tigervnc.sh | 51 +++++++++++++++++++++++++++++++++++++++ archplasma/90-tigervnc.sh | 3 +++ archplasma/build | 6 +++++ 3 files changed, 60 insertions(+) create mode 100755 archplasma/10-tigervnc.sh create mode 100755 archplasma/90-tigervnc.sh create mode 100755 archplasma/build diff --git a/archplasma/10-tigervnc.sh b/archplasma/10-tigervnc.sh new file mode 100755 index 0000000..8a0ddf5 --- /dev/null +++ b/archplasma/10-tigervnc.sh @@ -0,0 +1,51 @@ +#!/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 +dpi=192 +geometry=1920x1080 +framerate=60 +depth=32 +${_MYVNC_VNCSHARING} +vncconfig + +# Disable KDE screenlock +cat >~/.config/kscreenlockerrc <<- 'kscreenlockerrc' +[Daemon] +Autolock=false +LockOnResume=false +Timeout=0 +kscreenlockerrc diff --git a/archplasma/90-tigervnc.sh b/archplasma/90-tigervnc.sh new file mode 100755 index 0000000..c187a37 --- /dev/null +++ b/archplasma/90-tigervnc.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +# Launch Tigervnc +/usr/bin/dbus-launch vncserver :0 & diff --git a/archplasma/build b/archplasma/build new file mode 100755 index 0000000..71d1008 --- /dev/null +++ b/archplasma/build @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Docker build +# Optional: buildtag +DOCKER_BUILDKIT=1 \ +docker build . \ + --tag ${buildtag:-archlinux/webtop:plasma}