Fix xinitrc startup order: Openbox first, then auto-installer

- Start openbox-session in background first to establish window manager
- Wait 2 seconds for window manager to initialize
- Then launch auto-installer in terminal window
- Use 'wait' to keep X session alive instead of double-exec
- Prevents duplicate Openbox instances and ensures proper startup sequence
parent 8e120509
#!/bin/bash #!/bin/bash
# Xinitrc for root autologin with auto-installer startup # Xinitrc for root autologin with auto-installer startup
# Start Openbox window manager in background # Start Openbox window manager in background first
openbox & openbox-session &
# Wait for X11 to be ready # Wait for window manager to be ready
sleep 2 sleep 2
# Start auto-installer if it exists # Start auto-installer if it exists (after window manager is ready)
if [ -x /usr/local/bin/auto-installer.sh ]; then if [ -x /usr/local/bin/auto-installer.sh ]; then
# Launch in a visible terminal window # Launch in a visible terminal window
if command -v xterm >/dev/null 2>&1; then if command -v xterm >/dev/null 2>&1; then
...@@ -20,5 +20,5 @@ if [ -x /usr/local/bin/auto-installer.sh ]; then ...@@ -20,5 +20,5 @@ if [ -x /usr/local/bin/auto-installer.sh ]; then
fi fi
fi fi
# Keep X session alive # Keep X session alive by waiting for openbox
exec openbox wait
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment