Files
docker-steam-headless/overlay/usr/bin/start-desktop.sh
Josh.5 417ab4488b Display the progress of desktop app installation before starting the desktop
This just prevents people from seeing a black screen for a long time and assuming something is going wrong.
This initial setup is installaing flatpaks to the mounted home directory. This will not need to happen on every container startup. So this black screen is only a problem on the first start. But this change at least gives people something to look at.

Closes #50
2023-07-08 16:04:38 +12:00

46 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
###
# File: start-desktop.sh
# Project: bin
# File Created: Thursday, 1st January 1970 12:00:00 pm
# Author: Console and webGui login account (jsunnex@gmail.com)
# -----
# Last Modified: Saturday, 8th July 2023 3:52:39 pm
# Modified By: Console and webGui login account (jsunnex@gmail.com)
###
set -e
source /usr/bin/common-functions.sh
# CATCH TERM SIGNAL:
_term() {
kill -TERM "$desktop_pid" 2>/dev/null
}
trap _term SIGTERM SIGINT
# CONFIGURE:
export $(dbus-launch)
# EXECUTE PROCESS:
# Wait for the X server to start
wait_for_x
# Install/Upgrade user apps
if [[ ! -f /tmp/.desktop-apps-updated.lock ]]; then
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_protonup.sh;
sleep 1;
"
touch /tmp/.desktop-apps-updated.lock
fi
# Run the desktop environment
echo "**** Starting Xfce4 ****"
/usr/bin/startxfce4 &
desktop_pid=$!
# WAIT FOR CHILD PROCESS:
wait "$desktop_pid"