For charing iPad via USB ports, corresponding patches for Windows system has come out. In Ubuntu Linux there’s a small program created by Ondrej Zary from Rainbow-Software make it works as well.
There only provides a .tar.gz source package, so following is a compiling way to install this program on Ubuntu(works for both 32-bit & 64-bit).
UPDATE: Thanks for the comments, if you would like charging more Apple devices such as iphone (4s), itouch, it’s recommended to use ipad_charge on github.com
1.) Download the source file from rainbow-software. Then extract the package.
If you’re luckily running a 64-bit Ubuntu, just download and install the deb from ipad-charge-1.0_20101231-1_amd64.deb.zip and ignore following.
2.) Install the dependences. It depends Linux, GCC, Make, libusb-1.0(look up the README file) and for Ubuntu we just need to install
sudo apt-get install libusb-1.0.0 libusb-1.0.0-dev
Or you can install the packages from System -> Administration -> Synaptic Package Manager. Don’t forget the dev package, or you’ll get “can’t find /usr/include/libusb-1.0/libusb.h” similar error in
3.) Now compile and install the program. Navigate to the extracted directory and do make & make install:
cd Downloads/ipad_charge_1.0 make sudo make install
If you get the similar error output after
gcc -Wall -Wextra ipad_charge.c -lusb -o ipad_charge
collect2: ld returned 1 exit status
make: *** [ipad_charge] Error 1
just edit “Makefile” (you can find it under ipad_charge_1.0 directory), and add a -1.0 after lusb in the second line to make it look likes:
gcc -Wall -Wextra ipad_charge.c -lusb-1.0 -o ipad_charge
Done! It should work automatically when you plug-in usb with iPad, and read README for more about usage.