Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”Š Bluzy β€” Bluetooth Speaker Mode for Ubuntu

Bluzy

Turn your Ubuntu laptop into a wireless Bluetooth speaker.

Install β€’ Usage β€’ Troubleshoot β€’ Contribute


What is Bluzy?

Bluzy is a native GNOME desktop application that turns your Ubuntu laptop into a Bluetooth A2DP audio receiver (A2DP Sink). Connect your phone via Bluetooth and play audio through your laptop's speakers β€” wirelessly.

Features

  • πŸŽ›οΈ One-toggle Speaker Mode β€” Enable/disable with a single switch
  • πŸ“± Real-time Status β€” See connected device name, streaming state, and animated indicators
  • πŸ”” System Tray β€” Quick access from the system tray with status-aware icon
  • πŸ”’ Pairing Confirmation β€” Optional security prompt for new device connections
  • πŸ’Ύ Auto-Connect Memory β€” Remember trusted devices and auto-enable per device
  • πŸ”Š Volume Control β€” Adjust incoming audio volume
  • 🎨 Native GNOME Look β€” Built with GTK4 + Libadwaita, follows HIG
  • πŸŒ™ Dark/Light Mode β€” Automatic via Adwaita style manager

Requirements

Requirement Version
Ubuntu 24.04+ or 25.04
Python 3.10+
PipeWire Default on Ubuntu 24.04+
BlueZ 5.x
Bluetooth hardware Built-in or USB adapter

Installation

πŸ“¦ Download & Install (Recommended)

Download the latest .deb package from GitHub Releases:

# Download the latest release
wget https://github.com/izzathnisfer/Bluzy/releases/download/v1.0.0/bluzy_1.0.0_all.deb

# Install (auto-resolves all dependencies)
sudo apt install ./bluzy_1.0.0_all.deb

Or simply double-click the .deb file in your file manager to install via GNOME Software.

After installation:

  • πŸ” Search "Bluzy" in your app grid
  • πŸ–₯️ Or run bluzy from any terminal

To uninstall:

sudo apt remove bluzy

πŸ”§ Install from Source

git clone https://github.com/izzathnisfer/Bluzy.git
cd Bluzy
bash install.sh

The installer will:

  1. Install all system dependencies via apt
  2. Start and enable the Bluetooth service
  3. Add your user to the bluetooth group (if needed)
  4. Deploy app files to ~/.local/share/bluzy/
  5. Install the .desktop file and icon for your app drawer

To uninstall a source installation:

bash uninstall.sh

Manual Dependencies

If you prefer to install dependencies manually:

sudo apt install -y \
    python3-gi \
    python3-gi-cairo \
    gir1.2-gtk-4.0 \
    gir1.2-adw-1 \
    gir1.2-appindicator3-0.1 \
    python3-dbus \
    bluez \
    pipewire \
    wireplumber \
    pulseaudio-utils

Usage

From the App Drawer

After installation, search "Bluzy" in your Ubuntu app drawer and click to launch.

From the Terminal

python3 ~/.local/share/bluzy/main.py

Or during development:

python3 bluzy/main.py --debug

Command-Line Options

Flag Description
--minimized Start minimized in the system tray
--debug Enable debug logging
--version Print version and exit

How to Use

  1. Launch Bluzy
  2. Enable Speaker Mode β€” flip the toggle switch
  3. Connect your phone β€” open Bluetooth settings on your phone, you'll see "Bluzy Speaker" (or your custom name)
  4. Play audio β€” music, podcasts, or any audio will play through your laptop speakers!
  5. Disable β€” flip the toggle off to disconnect and stop being discoverable

Bluetooth Configuration (Advanced)

A2DP Sink Role

Modern BlueZ (5.x) with PipeWire handles A2DP profiles automatically. No changes to /etc/bluetooth/main.conf are typically needed.

If you experience issues, ensure the following in /etc/bluetooth/main.conf:

[General]
# Allow other devices to discover this computer
DiscoverableTimeout = 0

[Policy]
# Auto-enable Bluetooth adapter on boot
AutoEnable=true

After editing, restart the Bluetooth service:

sudo systemctl restart bluetooth

Troubleshooting

Bluetooth adapter not found

# Check if adapter is blocked
rfkill list bluetooth

# Unblock if blocked
sudo rfkill unblock bluetooth

# Check if adapter is detected
hciconfig -a

Bluetooth service not running

sudo systemctl start bluetooth
sudo systemctl enable bluetooth
systemctl status bluetooth

User not in bluetooth group

sudo usermod -aG bluetooth $USER
# Then log out and log back in

Phone can't see "Bluzy Speaker"

  1. Make sure Speaker Mode is enabled in the app
  2. Check that your adapter is discoverable:
    bluetoothctl show | grep Discoverable
  3. Try restarting Bluetooth on both devices

Audio not playing through laptop speakers

  1. Check PipeWire/PulseAudio is running:
    pactl info
  2. Check available Bluetooth cards:
    pactl list cards short | grep bluez
  3. Check the active profile:
    pactl list cards | grep -A 20 bluez

AppIndicator (tray icon) not showing

On GNOME, you need the AppIndicator extension:

sudo apt install gnome-shell-extension-appindicator

Then enable it in GNOME Extensions or restart your session.


Project Structure

bluzy/
β”œβ”€β”€ bluzy/                           # Python package
β”‚   β”œβ”€β”€ __init__.py                  # Package metadata & version
β”‚   β”œβ”€β”€ main.py                      # Entry point
β”‚   β”œβ”€β”€ app.py                       # Adw.Application lifecycle
β”‚   β”œβ”€β”€ window.py                    # Main window UI
β”‚   β”œβ”€β”€ tray.py                      # System tray (GTK3 subprocess)
β”‚   β”œβ”€β”€ tray_dbus.py                 # D-Bus IPC for app↔tray
β”‚   β”œβ”€β”€ bluetooth_manager.py         # BlueZ D-Bus integration
β”‚   β”œβ”€β”€ bluetooth_agent.py           # Auto-accept pairing agent
β”‚   β”œβ”€β”€ audio_manager.py             # PipeWire/PulseAudio profiles
β”‚   β”œβ”€β”€ config_manager.py            # User preferences
β”‚   └── utils.py                     # System checks & helpers
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ bluzy.png                    # App icon
β”‚   β”œβ”€β”€ bluzy-tray-*.svg             # Tray state icons
β”‚   β”œβ”€β”€ style.css                    # Custom GTK4 CSS
β”‚   └── bluzy.gresource.xml          # GResource bundle
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ com.github.izzathnisfer.bluzy.desktop
β”‚   └── com.github.izzathnisfer.bluzy.metainfo.xml
β”œβ”€β”€ packaging/
β”‚   └── build-deb.sh                 # .deb package builder
β”œβ”€β”€ dist/                            # Built packages (gitignored)
β”œβ”€β”€ install.sh                       # One-command source installer
β”œβ”€β”€ uninstall.sh                     # Source install uninstaller
β”œβ”€β”€ requirements.txt                 # Python dependencies
└── README.md                        # This file

Architecture

Bluzy uses a two-process architecture to bridge the GTK3/GTK4 incompatibility with AppIndicator3:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     D-Bus (session bus)     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Main App (GTK4)       │◄──────────────────────────►│  Tray (GTK3)     β”‚
β”‚                         β”‚  com.github.bluzy.App       β”‚                  β”‚
β”‚  β€’ Adw.ApplicationWindowβ”‚                             β”‚  β€’ AppIndicator3 β”‚
β”‚  β€’ BluetoothManager     β”‚  Methods:                   β”‚  β€’ Right-click   β”‚
β”‚  β€’ AudioManager         β”‚    Toggle(), Show(), Quit() β”‚    menu          β”‚
β”‚  β€’ ConfigManager        β”‚  Signals:                   β”‚  β€’ Icon changes  β”‚
β”‚  β€’ BluzyDBusService     β”‚    StateChanged(...)        β”‚                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β”‚ D-Bus (system bus)
         β”‚ org.bluez
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   BlueZ (bluetoothd)    β”‚
β”‚                         β”‚
β”‚  β€’ Adapter1             β”‚
β”‚  β€’ Device1              β”‚
β”‚  β€’ Agent1               β”‚
β”‚  β€’ MediaTransport1      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Contributing

Contributions are welcome! Here's how to get started:

Development Setup

git clone https://github.com/izzathnisfer/Bluzy.git
cd Bluzy

# Install dependencies
sudo apt install -y python3-gi python3-gi-cairo gir1.2-gtk-4.0 \
    gir1.2-adw-1 gir1.2-appindicator3-0.1 python3-dbus bluez \
    pipewire wireplumber pulseaudio-utils

# Run in debug mode
python3 bluzy/main.py --debug

Code Style

  • Follow PEP 8
  • Use type hints for all function signatures
  • Add docstrings to all public classes and methods
  • Keep modules focused and loosely coupled

Submitting Changes

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit with clear messages: git commit -m "Add: volume slider"
  4. Push and open a Pull Request

License

MIT License β€” see LICENSE for details.

MIT License

Copyright (c) 2026 Bluzy Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages