Skip to content

Commit

Permalink
Update Selkies-GStreamer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Sep 6, 2023
1 parent a11e158 commit 0d328e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
wmctrl \
jq \
gdebi-core \
glib-networking \
libopus0 \
libgdk-pixbuf2.0-0 \
libgtk2.0-bin \
libgl-dev \
Expand All @@ -421,18 +419,22 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
xserver-xorg-core \
wayland-protocols \
libwayland-dev \
libwayland-egl-backend-dev \
libwayland-egl1 \
libx11-xcb1 \
libxkbcommon0 \
libxdamage1 \
libxml2-dev \
libwebrtc-audio-processing1 \
libsoup2.4-1 \
libsoup-gnome2.4-1 \
libsrtp2-1 \
libcairo-gobject2 \
lame \
libopus0 \
libwebrtc-audio-processing1 \
pulseaudio \
libpulse0 \
libcairo-gobject2 \
libpangocairo-1.0-0 \
libgirepository1.0-dev \
libgirepository1.0-1 \
libopenjp2-7 \
libjpeg-dev \
libwebp-dev \
libvpx-dev \
Expand Down
11 changes: 7 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,35 @@ source /opt/gstreamer/gst-env
# Default display is :0 across the container
export DISPLAY=":0"
# Run Xvfb server with required extensions
Xvfb "${DISPLAY}" -ac -screen "0" "8192x4096x${CDEPTH}" -dpi "${DPI}" +extension "RANDR" +extension "GLX" +iglx +extension "MIT-SHM" +render -nolisten "tcp" -noreset -shmem &
/usr/bin/Xvfb "${DISPLAY}" -ac -screen "0" "8192x4096x${CDEPTH}" -dpi "${DPI}" +extension "RANDR" +extension "GLX" +iglx +extension "MIT-SHM" +render -nolisten "tcp" -noreset -shmem &

# Wait for X11 to start
echo "Waiting for X socket"
until [ -S "/tmp/.X11-unix/X${DISPLAY/:/}" ]; do sleep 1; done
echo "X socket is ready"

# Resize the screen to the provided size
selkies-gstreamer-resize "${SIZEW}x${SIZEH}"
/usr/local/bin/selkies-gstreamer-resize "${SIZEW}x${SIZEH}"

# Run the x11vnc + noVNC fallback web interface if enabled
if [ "${NOVNC_ENABLE,,}" = "true" ]; then
if [ -n "$NOVNC_VIEWPASS" ]; then export NOVNC_VIEWONLY="-viewpasswd ${NOVNC_VIEWPASS}"; else unset NOVNC_VIEWONLY; fi
x11vnc -display "${DISPLAY}" -passwd "${BASIC_AUTH_PASSWORD:-$PASSWD}" -shared -forever -repeat -xkb -snapfb -threads -xrandr "resize" -rfbport 5900 ${NOVNC_VIEWONLY} &
/usr/local/bin/x11vnc -display "${DISPLAY}" -passwd "${BASIC_AUTH_PASSWORD:-$PASSWD}" -shared -forever -repeat -xkb -snapfb -threads -xrandr "resize" -rfbport 5900 ${NOVNC_VIEWONLY} &
/opt/noVNC/utils/novnc_proxy --vnc localhost:5900 --listen 8080 --heartbeat 10 &
fi

# Use VirtualGL to run the KDE desktop environment with OpenGL if the GPU is available, otherwise use OpenGL with llvmpipe
if [ -n "$(nvidia-smi --query-gpu=uuid --format=csv | sed -n 2p)" ]; then
export VGL_DISPLAY="${VGL_DISPLAY:-egl}"
export VGL_REFRESHRATE="$REFRESH"
vglrun +wm /usr/bin/dbus-launch /usr/bin/startplasma-x11 &
/usr/bin/vglrun +wm /usr/bin/dbus-launch /usr/bin/startplasma-x11 &
else
/usr/bin/dbus-launch /usr/bin/startplasma-x11 &
fi

# Start Fcitx input method framework
/usr/bin/fcitx &

# Add custom processes right below this line, or within `supervisord.conf` to perform service management similar to systemd

echo "Session Running. Press [Return] to exit."
Expand Down

0 comments on commit 0d328e3

Please sign in to comment.