-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to get software OpenGL rendering to work
- Loading branch information
Showing
4 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |