Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The way that Ubuntu handles documents on the iPad is awesome (without any configuration required). It beats windows, even with iTunes installed.

I want to have the documents in certain iPad apps automatically synced into my Dropbox directory whenever the iPad is connected by USB. The syncing is easy; getting the script to run is not.

I have already read the information in various (very out-of-date) tutorials. The best I could find was here: http://askubuntu.com/a/25091/16157

I used lsusb, with the following results: Bus 002 Device 012: ID 05ac:12a2 Apple, Inc.

(Please note that when an iPad is connected, Ubuntu seems to mount it to two different mount points: one for "Documents" and one for the whole iPad filesystem. They are both mounted in ~/.gvfs)

I have created the following file /etc/udev/rules.d/96-ipad_sync.rules

I have tried this:

ACTION=="add", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="12a2", RUN+="/home/kit/bin/jobdone2"

and also this:

ACTION=="add", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12a2", RUN+="/home/kit/bin/jobdone2"

~/bin/jobdone2 is a script that plays an mp3 file. I have tested that it works (by using alt+f2 and then typing ~/bin/jobdone2).

So far, when I plug the iPad in, nothing happens.

This is the output I get from typing udevadm monitor –env

KERNEL[29348.114010] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4 (usb)
KERNEL[29348.114844] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0 (usb)
KERNEL[29348.129118] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0 (usb)
KERNEL[29348.130699] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:4.0 (usb)
KERNEL[29348.130845] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:4.1 (usb)
KERNEL[29348.130909] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:4.2 (usb)
UDEV  [29348.163861] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4 (usb)
UDEV  [29348.170390] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0 (usb)
UDEV  [29348.171521] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:4.1 (usb)
UDEV  [29348.172230] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0 (usb)
UDEV  [29348.172890] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:4.2 (usb)
UDEV  [29348.175645] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:4.0 (usb)
share|improve this question
    
What does the udevadm info output when you plug in the device? –  Sepero Jul 14 '12 at 22:18
    
Thanks @Sepero I've added that to the question. –  oldmankit Jul 16 '12 at 6:04

1 Answer 1

Try changing ATTRS to ATTR for vendor and product

share|improve this answer
    
Thanks so much for your answer. I tried that, but it didn't seem to make any difference. Question edited to take this into account. –  oldmankit Nov 12 '12 at 9:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.