diff --git a/.Xauthority b/.Xauthority new file mode 100644 index 0000000..e69de29 diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index bbcaf8e..397f1c1 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,9 +1,47 @@ FROM mcr.microsoft.com/devcontainers/base:ubuntu RUN apt update -RUN apt install --yes xfce4 xfce4-goodies gnome-icon-theme dbus-x11 xfce4-terminal tightvncserver + +# Set non-interactive mode to avoid prompts +ENV DEBIAN_FRONTEND=noninteractive + +# Update the package list and install necessary packages +RUN apt-get update && \ + apt-get install -y \ + mesa-utils \ + mesa-utils-extra \ + software-properties-common \ + build-essential \ + wget \ + libx11-dev \ + libxext-dev \ + libxdamage-dev \ + libxfixes-dev \ + libvulkan-dev \ + libdrm-dev \ + libgbm-dev \ + llvm-dev \ + llvm + +# Install Mesa with software rendering (LLVMPipe) +RUN add-apt-repository -y ppa:kisak/kisak-mesa && \ + apt-get update && \ + apt-get install -y \ + mesa-opencl-icd \ + libgl1-mesa-dri + +# Set environment variables to use LLVMPipe +ENV LIBGL_ALWAYS_SOFTWARE=1 +ENV MESA_LOADER_DRIVER_OVERRIDE=llvmpipe + +RUN apt install --yes xfce4 xfce4-goodies gnome-icon-theme dbus-x11 xfce4-terminal xvfb x11vnc # Register xfce4-terminal as an alternative for x-terminal-emulator RUN update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/xfce4-terminal 50 # Set xfce4-terminal as the default x-terminal-emulator RUN update-alternatives --set x-terminal-emulator /usr/bin/xfce4-terminal +# Create and set the XDG_RUNTIME_DIR +RUN mkdir -p /tmp/runtime + +# Set environment variables for the user +ENV XDG_RUNTIME_DIR=/tmp/runtime diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9102c23..ea274d5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [5901], + "forwardPorts": [5900], // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": "sudo ./.devcontainer/setup.sh", diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index f7478c0..e1f0964 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -1,9 +1,8 @@ #! /bin/bash -touch .Xauthority +Xvfb :1 -screen 0 1920x1080x24 & +export DISPLAY=:1 -umask 0077 -mkdir -p "$HOME/.vnc" -chmod go-rwx "$HOME/.vnc" -vncpasswd -f <<<"unipept" >"$HOME/.vnc/passwd" -vncserver -geometry 1920x1080 +startxfce4 & + +x11vnc -display :1