Can't get plasma to work

This commit is contained in:
myve 2025-01-20 09:13:22 +00:00
commit 1d6511b726
5 changed files with 0 additions and 177 deletions

View file

@ -1,8 +0,0 @@
# .env for myvnc KDE plasma webtop
MYVNC_KDEPLASMA_PORT=
MYVNC_KDEPLASMA_VNCPASS=
MYVNC_KDEPLASMA_CUSTOM_TITLE=
MYVNC_KDEPLASMA_PROXYPATH=
MYVNC_KDEPLASMA_VNCSHARING=

View file

@ -1,45 +0,0 @@
# syntax = docker/dockerfile:1
FROM quay.io/archlinux/archlinux:base-devel
USER root
# X session environment variable
ENV STARTXBIN=startplasma-x11
# Copy app folder
COPY entrypoint /entrypoint
# Install packages
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
pacman-key --init \
&& sed -i '/ParallelDownloads/c ParallelDownloads = 10' /etc/pacman.conf \
&& pacman -Sy --ask 4 archlinux-keyring \
&& pacman -Su --ask 4 --needed \
sudo bash-completion \
tigervnc \
cuda openssh vim pacman-contrib rsync git \
plasma konsole kate dolphin kompare kcalc \
jack2 ttf-dejavu \
firefox firefox-decentraleyes firefox-ublock-origin \
torbrowser-launcher \
shotwell ffmpegthumbs ark okular \
&& pacman -Scc --ask 4 \
&& useradd --create-home --gid users --shell /usr/bin/bash user \
&& printf '%s\n' 'user ALL=(ALL:ALL) NOPASSWD: /usr/bin/pacman' \
'Defaults lecture = never' >/etc/sudoers.d/zz-DOCKER \
&& passwd -l root >/dev/null 2>&1
# 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
# Default environment
USER user
WORKDIR /home/user
ENV HOME=/home/user
ENV DISPLAY=:0
ENV SHELL=/usr/bin/bash
ENV PS1="[\u@\h \W \$?]\$ "
# Docker entrypoint
ENTRYPOINT ["/entrypoint"]

View file

@ -1,39 +0,0 @@
services:
kdeplasma:
image: myvnc/webtop:plasma
container_name: kdeplasma
restart: unless-stopped
build: .
environment:
MYVNC_VNCPASS: ${MYVNC_KDEPLASMA_VNCPASS}
networks:
- kdeplasma
# Optional
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities:
- gpu
kdeplasma-novnc:
image: myvnc/base
container_name: kdeplasma-novnc
restart: unless-stopped
# shm_size: 2gb
ports:
- ${MYVNC_KDEPLASMA_PORT}:6900
environment:
MYVNC_CUSTOM_TITLE: ${MYVNC_KDEPLASMA_CUSTOM_TITLE}
MYVNC_PROXYPATH: ${MYVNC_KDEPLASMA_PROXYPATH}
MYVNC_VNCSHARING: ${MYVNC_KDEPLASMA_VNCSHARING}
MYVNC_VNCLISTEN_HOST: kdeplasma
MYVNC_VNCLISTEN_PORT: 5900
networks:
- kdeplasma
networks:
kdeplasma:
external: false

View file

@ -1,58 +0,0 @@
#!/usr/bin/env bash
# Create required home directories
[ -d ~/.vnc ] || mkdir -p ~/.vnc
[ -d ~/.ssh ] || mkdir -p ~/.ssh
[ -d ~/.config ] || mkdir -p ~/.config
# 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
# Launch Tigervnc
/usr/bin/dbus-launch vncserver :0

View file

@ -1,27 +0,0 @@
#!/usr/bin/env bash
# Docker build
# Optional buildtag
# DOCKER_BUILDKIT=1 \
# docker build . \
# --build-arg debug=${debug:-""} \
# --tag ${buildtag:-myvnc/novnc}
# Grab options
while [ ${1} ]
do
case ${1} in
-b | --build | b | build )
build="--build"
;;
-d | --detach | d | detach )
detach="--detach"
;;
bd | db )
build="--build"
detach="--detach"
;;
esac
shift
done
# Compose up
docker compose up ${build} ${detach}