- Shell 70.5%
- Python 14.3%
- Dockerfile 8.9%
- JavaScript 6.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The "iTunes is running" guard matched iTunes from any prefix. That blocked an install into a scratch prefix while the operator's iTunes was open. It now reads WINEPREFIX from each match's /proc environ. The update check's branch probe no longer prints curl's 404, which only means the branch is new. KNOWLEDGE.md records the CI test runs (refs #13): the failure path ran end to end and opened #14. 12.10.11.2's installer leaves iPodService.exe and iTunesHelper.exe running, so wineserver -w hangs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .claude | ||
| .woodpecker | ||
| ci | ||
| wine | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| GIT_WORKFLOW.md | ||
| HANDOFF.md | ||
| install.sh | ||
| KNOWLEDGE.md | ||
| README.md | ||
| WORKRULES.md | ||
iTunes.Wine
Run iTunes for Windows (12.13.11.1, 64-bit) on Linux under Wine. You get your music library, playback, and an iPhone plugged in over USB.
Tested on Fedora 44 with its own Wine (wine-11.20 Staging) and an iPhone on iOS 27.2.
What works
| Library and playback, adding your own MP3/AAC files | ✅ |
| iPhone shows up in iTunes over USB | ✅ |
| Signing in with an Apple ID, iCloud Music Library (your songs uploaded to Apple Music and played on the phone) | ✅ |
| Music sync over the cable | not tested yet, and not possible while iCloud Music Library is on (an Apple rule) |
| Backup and restore of the phone to this computer | not tested yet |
| Titles in "fancy" Unicode letters (𝙌𝙐𝙀𝘿𝘼𝙏𝙀) | show as boxes inside iTunes (they are fine on the phone), see #12 |
| iTunes Store, Apple Music browsing | out of scope |
Install
sudo dnf install wine 7zip msitools curl socat icoutils usbmuxd
git clone https://git.lewd.wtf/iTunes/iTunes.Wine.git && cd iTunes.Wine
./install.sh
It takes about 3–5 minutes. Most of that is the 200 MB download from Apple, and a silent install that shows no window.
install.sh:
- downloads the iTunes installer from Apple and checks its sha1. To use one you already have, pass it:
./install.sh path/to/iTunes64Setup.exe; - installs iTunes and Apple Mobile Device Support into its own Wine prefix,
~/.local/share/itunes-wine. SetWINEPREFIXto put it somewhere else; - sets up the USB bridge, a systemd user service called
itunes-wine-usbmuxd, and starts it. The bridge starts on its own at every login; - adds one iTunes entry with the iTunes icon to your application menu.
Quit iTunes before running it. It is safe to run again: it skips what is already installed and only redoes the bridge and the menu entry.
The iPhone
Plug the phone in and tap Trust on it the first time. That pairs it with Linux, and iTunes uses that pairing, so iTunes itself never asks.
It works like this: Windows iTunes looks for Apple's device service on 127.0.0.1:27015. Linux already runs
the open-source equivalent, usbmuxd, which talks to the phone over USB. The bridge service forwards that port
to usbmuxd's socket, and iTunes can't tell the difference:
iTunes (Wine) ──TCP 127.0.0.1:27015──▶ socat (itunes-wine-usbmuxd) ──▶ /var/run/usbmuxd ──USB──▶ iPhone
If the phone doesn't show up in iTunes:
systemctl --user status itunes-wine-usbmuxd # should be "active (running)"
idevice_id -l # Linux sees the phone? (package libimobiledevice-utils)
Using it
- Your files are on drive Z: inside iTunes. Your home folder is
Z:\home\<you>\. - Add music: File → Add File to Library… or Add Folder to Library…, or drag files into the window.
iTunes takes MP3, AAC/ALAC (
.m4a), AIFF and WAV. It does not take FLAC, OGG or Opus. Convert FLAC to Apple Lossless first:ffmpeg -i song.flac -c:a alac -c:v copy song.m4a - Getting songs onto the phone, either:
- through Apple Music: Account → Sign In, then Edit → Preferences → General → iCloud Music Library. iTunes uploads your songs and the phone gets them from iCloud. This needs an Apple Music or iTunes Match subscription; or
- over the cable: with iCloud Music Library off in iTunes and Sync Library off on the phone, click the phone icon → Music → Sync Music → Apply. Turning off Sync Library removes your cloud songs from the phone.
- Quit iTunes with File → Exit. iTunes saves your library when it quits.
Uninstall
systemctl --user disable --now itunes-wine-usbmuxd
rm -rf ~/.local/share/itunes-wine ~/.cache/itunes-wine \
~/.config/systemd/user/itunes-wine-usbmuxd.service \
~/.local/share/applications/itunes-wine.desktop \
~/.local/share/icons/hicolor/256x256/apps/itunes-wine.png
This deletes the prefix, including your iTunes library and any phone backups stored in it.
For developers
How this was worked out, the test rig (Docker images in wine/) and the evidence behind each step are in
AGENTS.md and KNOWLEDGE.md. Work is tracked as issues on
git.lewd.wtf/iTunes/iTunes.Wine.