Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lee-pai-long/e6b9f02f67ac9b44f395 to your computer and use it in GitHub Desktop.
Save lee-pai-long/e6b9f02f67ac9b44f395 to your computer and use it in GitHub Desktop.

[LINUX MINT 17.2] Load PulseAudio Bluetooth module at startup

If it doesn't exist yet create a scripts directory in your HOME directory

$ mkdir -p ~/scripts

Create a script in this directory called load-bluetooth.sh

$ vim ~/scripts/load-bluetooth.sh && \
> chmod +x scripts/load-bluetooth.sh

The scripts look like this

#!/bin/bash

# A temporary file will be created to log event ( can be usefull to debug errors)
sudo pactl load-module module-bluetooth-discover > /tmp/load-bluetooth.log 2>&1

Then add a sudoer file to allow the command pactl to be executed without password

$ [sudo] vim /etc/sudoers.d/pactl

And add a line to launch this script without password :

# Used in a script (load-bluetooth.sh) that load the pulseaudio bluetooth module at startup

$USER     ALL=(ALL:ALL) NOPASSWD:/usr/bin/pactl

Finally Add the script to startup scripts

System Setting > Startup Applications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment