Skip to content

Instantly share code, notes, and snippets.

@jdmonaco
Last active December 19, 2015 07:59
Show Gist options
  • Save jdmonaco/5922667 to your computer and use it in GitHub Desktop.
Save jdmonaco/5922667 to your computer and use it in GitHub Desktop.
Want to use VLC or other superior media apps that respond to keyboard media keys (play/pause, etc) and iTunes keeps getting in the way? Run iTunes.sh to disable normal launching of iTunes. Then this script becomes how you launch iTunes if you need to for some god-forsaken reason. (The sleep helps prevent the rename from occurring before the open…
#!/bin/sh
ITUNES=/Applications/iTunes.app/Contents/MacOS/iTunes
if [ -f $ITUNES ]; then
sudo mv $ITUNES ${ITUNES}X
echo iTunes disabled.
fi
sudo mv ${ITUNES}X $ITUNES &&
open -a /Applications/iTunes.app &&
sleep 1 &&
sudo mv $ITUNES ${ITUNES}X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment