Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I disable iTunes from launching whenever I pair a bluetooth device?

Whenever I pair my bluetooth wireless headphones with my Macbook, which has Mavericks, it always launches my iTunes. How do I disable iTunes from lanching automatically? I heard that there was an older fix for it with the older OS, and older iTunes, but it apparently doesn't function for more recent os and iTunes. Anybody know how to disable? When I click "open sound preferences" from the bluetooth drop down, it only shows me the macbook sound preferences. Help! Please 😟


Thank you!

MacBook, iOS 7.0.4

Posted on Feb 19, 2014 6:42 AM

Reply
1 reply

Mar 17, 2014 7:36 PM in response to francescadizon

Yeah. We know. Welcome to bluetooth. This makes everyone crazy, people have been talking about it for years and Apple hasn't fixed it since 10.6. We can only assume this is intended to harass us into using iTunes as our media center. Instead of competing products like Garageband, Skype or World of Warcraft.


I wrote a perl script to automatically kill itunes anytime it tries to start. Added the script as a login item. Works slicker than anything else I have found, and it works universally, as Apple keeps finding inventive new ways to launch iTunes uncommanded.


Stick it in a plain text file, test it at the command line, then add it as a login item. Here you go.


#!/usr/bin/perl

use strict;


# Force iTunes to quit the moment it tries to start up. When you want to

# actually run iTunes, start a small app you don't normally use, then iTunes.

# An example is Notes or Dictionary. Specify that app in $partnerapp.


my $partnerApp = "Dictionary"; # name must be exact. Case matters.

print "Killing iTunes unless '$partnerApp.app' is running.\n"; #\n is return


while (1) {

my $line = "";

my $allow = 0;


# run ps -aef and scan output to see if iTunes and partnerApp are running.

foreach (`ps -aef`) { # read each line into magic variable $_

$allow = 1 if (length($partnerApp) and m=/$partnerApp.app=);

next if (not m=/iTunes.app/=); # skip if not part of iTunes app

next if (not m=/iTunes =); # skip if not the main iTunes program

$line = $_;

} # end scanning ps -aef


if ($line and not $allow) {

my $pid = substr ($line, 6, 5); # parse out 5-digit process ID

system "kill $pid"; # force quit that process ID

print "Killed $pid $line\n"; # tell the user.

} # end foreach


sleep (2); # 2 seconds

} # end while forever

How do I disable iTunes from launching whenever I pair a bluetooth device?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.