Revert to installing steam as a .deb package
Flatpak seems to complicate Steam's execution of Proton
This commit is contained in:
@@ -186,6 +186,9 @@ RUN \
|
|||||||
|
|
||||||
# Install X Server requirements
|
# Install X Server requirements
|
||||||
# TODO: Refine this list of packages to only what is required.
|
# TODO: Refine this list of packages to only what is required.
|
||||||
|
ENV \
|
||||||
|
XORG_SOCKET_DIR="/tmp/.X11-unix" \
|
||||||
|
XDG_RUNTIME_DIR="/tmp/.X11-unix/run"
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** Update apt database ****" \
|
echo "**** Update apt database ****" \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
@@ -230,6 +233,9 @@ RUN \
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
# Install audio requirements
|
# Install audio requirements
|
||||||
|
ENV \
|
||||||
|
PULSE_SOCKET_DIR="/tmp/pulse" \
|
||||||
|
PULSE_SERVER="unix:/tmp/pulse/pulse-socket"
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** Update apt database ****" \
|
echo "**** Update apt database ****" \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
@@ -297,7 +303,8 @@ RUN \
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
# Add support for flatpaks
|
# Add support for flatpaks
|
||||||
# TODO: Remove bridge-utils
|
ENV \
|
||||||
|
XDG_DATA_DIRS="/home/default/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/"
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** Update apt database ****" \
|
echo "**** Update apt database ****" \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
@@ -499,6 +506,25 @@ RUN \
|
|||||||
&& \
|
&& \
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# Install Steam
|
||||||
|
RUN \
|
||||||
|
echo "**** Update apt database ****" \
|
||||||
|
&& apt-get update \
|
||||||
|
&& \
|
||||||
|
echo "**** Install Intel media drivers and VAAPI ****" \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
steam \
|
||||||
|
&& \
|
||||||
|
echo "**** Section cleanup ****" \
|
||||||
|
&& apt-get clean autoclean -y \
|
||||||
|
&& apt-get autoremove -y \
|
||||||
|
&& rm -rf \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/var/tmp/* \
|
||||||
|
/tmp/* \
|
||||||
|
&& \
|
||||||
|
echo
|
||||||
|
|
||||||
# Add FS overlay
|
# Add FS overlay
|
||||||
COPY overlay /
|
COPY overlay /
|
||||||
|
|
||||||
@@ -510,19 +536,10 @@ ENV \
|
|||||||
DISPLAY_SIZEW="1600" \
|
DISPLAY_SIZEW="1600" \
|
||||||
DISPLAY_VIDEO_PORT="DFP" \
|
DISPLAY_VIDEO_PORT="DFP" \
|
||||||
DISPLAY=":55"
|
DISPLAY=":55"
|
||||||
ENV \
|
|
||||||
XORG_SOCKET_DIR="/tmp/.X11-unix" \
|
|
||||||
XDG_RUNTIME_DIR="/tmp/.X11-unix/run" \
|
|
||||||
XDG_DATA_DIRS="/home/default/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/"
|
|
||||||
ENV \
|
ENV \
|
||||||
NVIDIA_DRIVER_CAPABILITIES="all" \
|
NVIDIA_DRIVER_CAPABILITIES="all" \
|
||||||
NVIDIA_VISIBLE_DEVICES="all"
|
NVIDIA_VISIBLE_DEVICES="all"
|
||||||
|
|
||||||
# Set pulseaudio environment variables
|
|
||||||
ENV \
|
|
||||||
PULSE_SOCKET_DIR="/tmp/pulse" \
|
|
||||||
PULSE_SERVER="unix:/tmp/pulse/pulse-socket"
|
|
||||||
|
|
||||||
# Set container configuration environment variables
|
# Set container configuration environment variables
|
||||||
ENV \
|
ENV \
|
||||||
MODE="primary" \
|
MODE="primary" \
|
||||||
@@ -530,12 +547,13 @@ ENV \
|
|||||||
ENABLE_VNC_AUDIO="true" \
|
ENABLE_VNC_AUDIO="true" \
|
||||||
NEKO_PASSWORD=neko \
|
NEKO_PASSWORD=neko \
|
||||||
NEKO_PASSWORD_ADMIN=admin \
|
NEKO_PASSWORD_ADMIN=admin \
|
||||||
|
ENABLE_STEAM="true" \
|
||||||
|
STEAM_ARGS="-silent" \
|
||||||
ENABLE_SUNSHINE="false" \
|
ENABLE_SUNSHINE="false" \
|
||||||
ENABLE_EVDEV_INPUTS="false"
|
ENABLE_EVDEV_INPUTS="false"
|
||||||
|
|
||||||
# Configure required ports
|
# Configure required ports
|
||||||
ENV \
|
ENV \
|
||||||
PORT_SSH="" \
|
|
||||||
PORT_NOVNC_WEB="8083" \
|
PORT_NOVNC_WEB="8083" \
|
||||||
NEKO_NAT1TO1=""
|
NEKO_NAT1TO1=""
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo "**** Configure Steam /mnt/games steamapps folder ****"
|
|
||||||
|
|
||||||
# Upon first execution of this container, /opt/scripts/install_steam.sh will create a library location named "Mounted
|
|
||||||
# Games into the /mnt/games/GameLibrary/SteamLibrary location, but not create the required steamapps folder"
|
|
||||||
# Check /mnt/games to see if it is configured as a Steam Library, and if it is, make sure the steamapps folder exists
|
|
||||||
MNT_LIBRARY_PATH="/mnt/games/GameLibrary/SteamLibrary"
|
|
||||||
|
|
||||||
if [ -f "$MNT_LIBRARY_PATH/libraryfolder.vdf" ] && [ ! -d "$MNT_LIBRARY_PATH/steamapps" ]; then
|
|
||||||
mkdir -pm 777 "$MNT_LIBRARY_PATH/steamapps"
|
|
||||||
fi
|
|
||||||
@@ -26,8 +26,6 @@ if [[ "${is_privileged}" == "true" ]]; then
|
|||||||
echo "**** Configure container to run udev management ****";
|
echo "**** Configure container to run udev management ****";
|
||||||
# Enable supervisord script
|
# Enable supervisord script
|
||||||
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/udev.ini
|
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/udev.ini
|
||||||
# Make startup script executable
|
|
||||||
chmod +x /usr/bin/start-udev.sh
|
|
||||||
# Configure udev permissions
|
# Configure udev permissions
|
||||||
if [[ -f /lib/udev/rules.d/60-steam-input.rules ]]; then
|
if [[ -f /lib/udev/rules.d/60-steam-input.rules ]]; then
|
||||||
sed -i 's/MODE="0660"/MODE="0666"/' /lib/udev/rules.d/60-steam-input.rules
|
sed -i 's/MODE="0660"/MODE="0666"/' /lib/udev/rules.d/60-steam-input.rules
|
||||||
|
|||||||
18
overlay/etc/cont-init.d/90-configure_steam.sh
Normal file
18
overlay/etc/cont-init.d/90-configure_steam.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
echo "**** Configure Steam ****"
|
||||||
|
|
||||||
|
if [ "${ENABLE_STEAM:-}" = "true" ]; then
|
||||||
|
echo "Enable Steam service"
|
||||||
|
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/steam.ini
|
||||||
|
# Remove old autostart script. We should be starting steam with the supervisor service
|
||||||
|
mkdir -p "${USER_HOME:?}/.config/autostart"
|
||||||
|
# if grep "Exec=/usr/bin/flatpak" "${USER_HOME:?}/.config/autostart/Steam.desktop" &> /dev/null; then
|
||||||
|
# rm -fv "${USER_HOME:?}/.config/autostart/Steam.desktop"
|
||||||
|
# fi
|
||||||
|
rm -fv "${USER_HOME:?}/.config/autostart/Steam.desktop"
|
||||||
|
else
|
||||||
|
echo "Disable Steam service"
|
||||||
|
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/steam.ini
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "DONE"
|
||||||
@@ -10,8 +10,7 @@ autorestart=true
|
|||||||
startretries=50
|
startretries=50
|
||||||
user=%(ENV_USER)s
|
user=%(ENV_USER)s
|
||||||
directory=/home/%(ENV_USER)s
|
directory=/home/%(ENV_USER)s
|
||||||
# command=/usr/games/steam -bigpicture
|
command=/usr/games/steam %(STEAM_ARGS)s
|
||||||
command=/usr/games/steam
|
|
||||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
|
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
|
||||||
stopsignal=INT
|
stopsignal=INT
|
||||||
stdout_logfile=/home/%(ENV_USER)s/.cache/log/steam.log
|
stdout_logfile=/home/%(ENV_USER)s/.cache/log/steam.log
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo "**** Installing/upgrading Steam via flatpak ****"
|
|
||||||
|
|
||||||
# Install Steam client
|
|
||||||
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
||||||
flatpak --user install --assumeyes --or-update flathub com.valvesoftware.Steam
|
|
||||||
# Configure any required overrides
|
|
||||||
flatpak --user override --filesystem=/mnt/games com.valvesoftware.Steam
|
|
||||||
# TODO: Check if we should add /dev/dri here??
|
|
||||||
|
|
||||||
# Configure default steam library paths
|
|
||||||
echo "Configure Steam default libraries..."
|
|
||||||
mkdir -p /mnt/games/GameLibrary/SteamLibrary
|
|
||||||
libraryfolders="$(cat <<EOF
|
|
||||||
"libraryfolders"
|
|
||||||
{
|
|
||||||
"0"
|
|
||||||
{
|
|
||||||
"path" "${USER_HOME:?}/.var/app/com.valvesoftware.Steam/.local/share/Steam"
|
|
||||||
"label" ""
|
|
||||||
"contentid" "5619710282499379610"
|
|
||||||
"totalsize" "0"
|
|
||||||
"update_clean_bytes_tally" "0"
|
|
||||||
"time_last_update_corruption" "0"
|
|
||||||
"apps"
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"1"
|
|
||||||
{
|
|
||||||
"path" "/mnt/games/GameLibrary/SteamLibrary"
|
|
||||||
"label" "Mounted Games"
|
|
||||||
"contentid" "4437054932394438372"
|
|
||||||
"totalsize" "0"
|
|
||||||
"update_clean_bytes_tally" "0"
|
|
||||||
"time_last_update_corruption" "0"
|
|
||||||
"apps"
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
if [[ ! -f ${USER_HOME:?}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/libraryfolders.vdf ]]; then
|
|
||||||
mkdir -p ${USER_HOME:?}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps
|
|
||||||
echo "${libraryfolders}" > ${USER_HOME:?}/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/libraryfolders.vdf
|
|
||||||
fi
|
|
||||||
if [[ ! -f ${USER_HOME:?}/.var/app/com.valvesoftware.Steam/.local/share/Steam/config/libraryfolders.vdf ]]; then
|
|
||||||
mkdir -p ${USER_HOME:?}/.var/app/com.valvesoftware.Steam/.local/share/Steam/config
|
|
||||||
echo "${libraryfolders}" > ${USER_HOME:?}/.var/app/com.valvesoftware.Steam/.local/share/Steam/config/libraryfolders.vdf
|
|
||||||
fi
|
|
||||||
# Remove old autostart script if pointing to old native debian steam launcher
|
|
||||||
mkdir -p "${USER_HOME:?}/.config/autostart"
|
|
||||||
if grep "Exec=/usr/games/steam %U" "${USER_HOME:?}/.config/autostart/Steam.desktop" &> /dev/null; then
|
|
||||||
rm -fv "${USER_HOME:?}/.config/autostart/Steam.desktop"
|
|
||||||
fi
|
|
||||||
# Create autostart script if missing
|
|
||||||
steam_autostart_desktop="$(cat <<EOF
|
|
||||||
[Desktop Entry]
|
|
||||||
Encoding=UTF-8
|
|
||||||
Type=Application
|
|
||||||
Name=Steam
|
|
||||||
Comment=Launch steam on login
|
|
||||||
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/steam-wrapper --file-forwarding com.valvesoftware.Steam -silent
|
|
||||||
Icon=steam
|
|
||||||
OnlyShowIn=XFCE;
|
|
||||||
RunHook=0
|
|
||||||
StartupNotify=false
|
|
||||||
Terminal=false
|
|
||||||
Hidden=false
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
if [[ ! -f "${USER_HOME:?}/.config/autostart/Steam.desktop" ]]; then
|
|
||||||
echo "${steam_autostart_desktop:?}" > "${USER_HOME:?}/.config/autostart/Steam.desktop"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "DONE"
|
|
||||||
@@ -28,7 +28,6 @@ wait_for_x
|
|||||||
# Install/Upgrade user apps
|
# Install/Upgrade user apps
|
||||||
if [[ ! -f /tmp/.desktop-apps-updated.lock ]]; then
|
if [[ ! -f /tmp/.desktop-apps-updated.lock ]]; then
|
||||||
xterm -geometry 200x50+0+0 -ls -e /bin/bash -c "
|
xterm -geometry 200x50+0+0 -ls -e /bin/bash -c "
|
||||||
source /opt/scripts/install_steam.sh;
|
|
||||||
source /opt/scripts/install_firefox.sh;
|
source /opt/scripts/install_firefox.sh;
|
||||||
source /opt/scripts/install_protonup.sh;
|
source /opt/scripts/install_protonup.sh;
|
||||||
source /opt/scripts/install_sunshine.sh;
|
source /opt/scripts/install_sunshine.sh;
|
||||||
|
|||||||
Reference in New Issue
Block a user