Skip to content

Commit

Permalink
Edit invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Mar 30, 2024
1 parent f76aaeb commit 718cb68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
vainfo \
intel-gpu-tools \
radeontop && \
if [ "$(grep VERSION_ID= /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then apt-get install --no-install-recommends -y xcvt; fi && \
if [ "$(grep VERSION_ID= /etc/os-release | cut -d= -f2 | tr -d '\"')" \> "20.04" ]; then apt-get install --no-install-recommends -y xcvt; else apt-get install --no-install-recommends -y mesa-utils-extra; fi && \
rm -rf /var/lib/apt/lists/* && \
# Automatically fetch the latest selkies-gstreamer version and install the components
SELKIES_VERSION="1.5.2" && \
Expand Down Expand Up @@ -526,7 +526,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
rm -rf /var/lib/apt/lists/* && \
groupadd -g 1000 user && \
useradd -ms /bin/bash user -u 1000 -g 1000 && \
usermod -a -G adm,audio,cdrom,dialout,dip,fax,floppy,input,lp,lpadmin,plugdev,pulse-access,scanner,ssl-cert,sudo,tape,tty,video,voice user && \
usermod -a -G adm,audio,cdrom,dialout,dip,fax,floppy,input,lp,lpadmin,plugdev,pulse-access,render,scanner,ssl-cert,sudo,tape,tty,video,voice user && \
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
chown user:user /home/user && \
echo "user:${PASSWD}" | chpasswd && \
Expand Down
5 changes: 2 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sudo rm -rf /tmp/.X* ~/.cache
# Change time zone from environment variable
sudo ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" | sudo tee /etc/timezone > /dev/null
# Add Lutris and VirtualGL directories to path
export PATH="${PATH}:/usr/local/games:/usr/games:/opt/VirtualGL/bin"
export PATH="${PATH}:/usr/local/games:/usr/games"
# Add LibreOffice to library path
export LD_LIBRARY_PATH="/usr/lib/libreoffice/program:${LD_LIBRARY_PATH}"

Expand Down Expand Up @@ -48,9 +48,8 @@ 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"
/usr/bin/vglrun +wm /usr/bin/dbus-launch /usr/bin/startplasma-x11 &
/usr/bin/vglrun -d "${VGL_DISPLAY:-egl}" +wm /usr/bin/dbus-launch /usr/bin/startplasma-x11 &
else
/usr/bin/dbus-launch /usr/bin/startplasma-x11 &
fi
Expand Down
15 changes: 1 addition & 14 deletions selkies-gstreamer-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
. /opt/gstreamer/gst-env

# Set default display
export DISPLAY="${DISPLAY:-:0}"
export DISPLAY="${DISPLAY:-\:0}"

# Configure joystick interposer
sudo mkdir -pm755 /dev/input
Expand All @@ -24,19 +24,6 @@ echo "Waiting for X socket"
until [ -S "/tmp/.X11-unix/X${DISPLAY/:/}" ]; do sleep 1; done
echo "X socket is ready"

# Write Progressive Web App (PWA) configuration
export PWA_APP_NAME="Selkies WebRTC"
export PWA_APP_SHORT_NAME="selkies"
export PWA_START_URL="/index.html"
sudo sed -i \
-e "s|PWA_APP_NAME|${PWA_APP_NAME}|g" \
-e "s|PWA_APP_SHORT_NAME|${PWA_APP_SHORT_NAME}|g" \
-e "s|PWA_START_URL|${PWA_START_URL}|g" \
/opt/gst-web/manifest.json && \
sudo sed -i \
-e "s|PWA_CACHE|${PWA_APP_SHORT_NAME}-webrtc-pwa|g" \
/opt/gst-web/sw.js

# Clear the cache registry
rm -rf "${HOME}/.cache/gstreamer-1.0"

Expand Down

0 comments on commit 718cb68

Please sign in to comment.