From a4227a775895b67f6e099a944ffba1a2c88e90bb Mon Sep 17 00:00:00 2001 From: Connor Nelson Date: Thu, 20 Mar 2025 10:42:00 -0700 Subject: [PATCH] Wait for desktop to start --- demo/desktop-auto-launch/.init | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/demo/desktop-auto-launch/.init b/demo/desktop-auto-launch/.init index 1149a3a..2d02834 100644 --- a/demo/desktop-auto-launch/.init +++ b/demo/desktop-auto-launch/.init @@ -13,7 +13,13 @@ xfce_run() { setsid su "$USER" -c "env - $(xfce_env) $*" } -# Consider using `--geometry` to set the window size and position -# Consider using `--fullscreen` to launch the application in fullscreen mode +# Launch a background process that waits for xfce4-session and then runs the command. +( + while ! pgrep -u "$USER" xfce4-session > /dev/null; do + sleep 1 + done -xfce_run exo-open --launch TerminalEmulator + # Consider using `--geometry` to set the window size and position + # Consider using `--fullscreen` to launch the application in fullscreen mode + xfce_run exo-open --launch TerminalEmulator +) &