The following shell script will install Bluetooth support on Debian LXQt:
#!/bin/bash
# Debian LXQt - Fresh Bluetooth & PipeWire Audio Setup
# Cleans old configs, reinstalls required components, and ensures working Bluetooth + audio integration (PipeWire only).
set -e
echo "🧹 Cleaning old Bluetooth and audio setup..."
sudo systemctl stop bluetooth.service || true
sudo systemctl stop pipewire.service 2>/dev/null || true
sudo systemctl stop wireplumber.service 2>/dev/null || true
# Remove old audio/Bluetooth components (PulseAudio, PipeWire remnants, etc.)
sudo apt purge -y bluez* blueman pulseaudio* pipewire* wireplumber* libspa-0.2-bluetooth rfkill || true
sudo apt autoremove -y
sudo apt clean
echo "🔧 Updating system..."
sudo apt update -y && sudo apt full-upgrade -y
echo "📦 Installing base Bluetooth + PipeWire stack..."
sudo apt install -y \
bluez bluez-obexd rfkill blueman \
pipewire pipewire-audio pipewire-pulse wireplumber libspa-0.2-bluetooth
echo "⚙️ Enabling and starting Bluetooth service..."
sudo systemctl enable bluetooth.service
sudo systemctl restart bluetooth.service
echo "🔓 Unblocking Bluetooth radio..."
sudo rfkill unblock bluetooth
echo "🔁 Restarting PipeWire audio services..."
systemctl --user daemon-reload
systemctl --user enable pipewire pipewire-pulse wireplumber
systemctl --user restart pipewire pipewire-pulse wireplumber
echo "🧠 Setting autostart for Blueman in LXQt..."
mkdir -p ~/.config/autostart
cat > ~/.config/autostart/blueman-applet.desktop <<'EOF'
[Desktop Entry]
Type=Application
Name=Blueman Applet
Exec=blueman-applet
X-GNOME-Autostart-enabled=true
EOF
echo "✅ Bluetooth + PipeWire Audio setup complete!"
echo "👉 Reboot or log out/in to apply changes and show the tray icon."