Modify mbetterclient .bashrc to launch startx instead of MBetterClient directly

- Change .bashrc to exec startx instead of launching MBetterClient directly
- MBetterClient will now be launched by .xinitrc within the X session
- Maintains XKB environment variables for keyboard configuration
- Allows proper X session initialization before launching applications
parent 3ae15ac5
......@@ -557,10 +557,10 @@ configure_target_system() {
chroot "$TARGET_MOUNT" useradd -m -s /bin/bash mbetterclient 2>/dev/null || true
chroot "$TARGET_MOUNT" passwd -d mbetterclient 2>/dev/null || true # Remove password
# Configure mbetterclient user to launch MBetterClient on login
print_status "Configuring mbetterclient user to launch MBetterClient..."
# Configure mbetterclient user to launch startx on login
print_status "Configuring mbetterclient user to launch startx..."
cat > "$TARGET_MOUNT/home/mbetterclient/.bashrc" << 'EOF'
# MBetterClient autolaunch configuration
# X session autolaunch configuration
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
# SSH session - don't autolaunch
return
......@@ -568,8 +568,14 @@ fi
# Check if we're on tty1 (autologin terminal)
if [ "$(tty)" = "/dev/tty1" ]; then
# Launch MBetterClient with web host binding
exec /usr/local/bin/MBetterClient --web-host 0.0.0.0
# Set XKB environment variables to fix keyboard issues
export XKB_DEFAULT_LAYOUT="us"
export XKB_DEFAULT_MODEL="pc105"
export XKB_DEFAULT_VARIANT=""
export XKB_DEFAULT_OPTIONS=""
# Launch X session (MBetterClient will be started by .xinitrc)
exec startx
fi
EOF
......
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