export PATH="/usr/local/bin:$PATH"

# On tty1 (IPMI KVM console): start X desktop directly on VT1
# so the KVM shows the graphical UI without switching VTs.
if [ "$(tty 2>/dev/null)" = "/dev/tty1" ] \
    && [ -z "${DISPLAY:-}" ]; then
    startx /usr/local/bin/bee-openbox-session -- :0 vt1 -nolisten tcp
    echo ""
    echo "X session ended. Type 'startx' to retry or use the shell."
fi
