explaingit

balasaravanakumar7890/dualbuds

Analysis updated 2026-05-18

0ShellAudience · ops devopsComplexity · 2/5LicenseSetup · easy

TLDR

A Linux shell script that lets you play the same audio out of two Bluetooth earbuds or headphones at the same time.

Mindmap

mindmap
  root((repo))
    What it does
      Dual Bluetooth audio
      Combined virtual sink
      One command setup
    Tech stack
      Shell script
      PipeWire
      pactl and wpctl
    Use cases
      Share music with a friend
      Desktop audio routing
      Arch Linux utility
    Audience
      Linux desktop users
      PipeWire tinkerers
    Setup
      Copy script to home folder
      Make executable
      Optional shell alias

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Play music or a video out of two Bluetooth headsets simultaneously.

USE CASE 2

Share audio between two people using their own earbuds on the same Linux machine.

USE CASE 3

Learn how PipeWire combined sinks can route audio to multiple outputs.

USE CASE 4

Add dual Bluetooth audio support to an Arch Linux desktop setup.

What is it built with?

ShellPipeWireWirePlumberPulseAudio

How does it compare?

balasaravanakumar7890/dualbuds123satyajeet123/bitnet-serverahloiscreamo/pod-search
Stars000
LanguageShellShellShell
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audienceops devopsdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires PipeWire and WirePlumber already working, most common on modern Arch Linux.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Dualbuds solves a specific annoyance on Linux: normally your computer can only send audio to one output device at a time, so if you own two sets of Bluetooth earbuds and want them both playing the same song, there is no built in way to do that. This project is a single shell script that fixes that. It works by using PipeWire, the modern Linux audio system, along with its PulseAudio compatible tools called pactl and wpctl. When you run the script, it looks for exactly two connected Bluetooth audio devices, then creates a temporary virtual audio destination called a combined sink. Every app currently playing sound, whether that is Firefox, Spotify, VLC, or Chrome, gets automatically redirected to this virtual sink, which then duplicates the sound out to both Bluetooth devices at once, unmuting them in the process. Setup is a short copy and paste job: you create a script file in your home folder, paste in the provided code, make it runnable, and optionally add a short alias so you can just type dualbuds from any terminal. From there, using it is three steps: connect two Bluetooth devices, start playing something, and run the dualbuds command. The README notes it should work with almost any pairing of Bluetooth earbuds or headphones, for example AirPods paired with a Sony headset, without needing to change the script for different hardware. It also includes a troubleshooting section for the two most likely problems, only one earbud playing audio or no sound at all, both solved by checking connected devices or restarting PipeWire services. This is a small, focused utility rather than a full application. It is aimed at Linux users, most likely on Arch Linux, who already have PipeWire and Bluetooth working. Planned future improvements include automatically enabling dual audio when two devices connect, and eventually a graphical interface. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Explain how the combined sink in this script routes audio to two Bluetooth devices.
Prompt 2
Help me adapt this dualbuds script to support more than two Bluetooth devices.
Prompt 3
Walk me through installing and running this script on my Arch Linux machine.
Prompt 4
Why does this project use pactl and wpctl instead of a GUI tool?
Prompt 5
Help me troubleshoot why only one of my two Bluetooth earbuds is playing sound with this script.

Frequently asked questions

What is dualbuds?

A Linux shell script that lets you play the same audio out of two Bluetooth earbuds or headphones at the same time.

What language is dualbuds written in?

Mainly Shell. The stack also includes Shell, PipeWire, WirePlumber.

What license does dualbuds use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is dualbuds to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is dualbuds for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.