Outils pour utilisateurs

Outils du site


issue82:comment_connecter_un_dispositif_ios

Ceci est une ancienne révision du document !


Table des matières

1

I've been fascinated by KDE since I started my Linux experience, but I often use an iPad as a multimedia player; unfortunately KDE – and Kubuntu by consequence - does not support it out of the box as Ubuntu and other derivatives such as Xubuntu, Lubuntu and Ubuntu GNOME do. Before becoming a Linux user, I downloaded multimedia files on my Windows XP notebook, then moved them to my iPad via iTunes: however, there's no Linux version of iTunes, and neither PlayOnLinux nor Wine are able to run iTunes. If I'm not mistaken, starting with iOS4, the core directories of the iOS are encrypted while apps directories are not. Luckily these days there are many free or cheap apps, so we can avoid using the encrypted part of the iOS file system by substituting standard iOS function with other apps. On my iPad I use OPlayerHD for podcasts, video and music, and Download as a pdf reader, and the directories where the files are stored for these apps are not encrypted .

2

Dolphin, the file manager of KDE, uses software components named kio slave to support connection protocols to various removable devices. Unfortunately there's no official kio slave for the AFC protocol, the one required to connect to an idevice. There are a couple of source packages available, like kio_afc, which require compiling, and, in my understanding, are orphaned; another option could be the virtualization of an operating system “iTunes compatible”, but we need to buy a license for the operating system we virtualize, and every time we want to transfer a file we need to boot the virtual machine. I've found two alternative solutions, the first via a CLI, and the second – a simpler solution – via the LXDE/Lubuntu file manager, PCManFM. Important tip: depending on iOS and idevice version, you may need to remove the access code (a 4 digit code) from your idevice to get the two connection methods working: it's an option in the General settings of your idevice – you can easily set it up again after the connection with Kubuntu is done.

3

First solution (CLI): ideviceinstaller and ifuse First, we need to install ifuse and ideviceinstaller. In a terminal type: sudo apt-get install ifuse ideviceinstaller Then plug in the iPad via a cable. In a terminal type: ideviceinstaller -l The output is a list of all appid and names off the apps installed; my list is: Total: 7 apps com.google.GoogleMobile - Google 3.0.2.20993 com.olimsoft.oplayer.hd.lite - OPlayerHD Lite 2.0.13 ch.smalltech.ledtorchfree - LED Torch 1.41 com.demandviaspeech.dvs - Download 3.0 com.trautvetter.atomicbrowser - Atomic Web 7.0.1 com.apple.iBooks - iBooks 1929 com.m-w.dictionaryipad - Dictionary 2.1

4

As an example, I want to move some stuff from the notebook to the iPad, a podcast to OplayerHD, and some pdf files to Download; I need the information I've marked in bold characters, which are named appids, to mount the iDevice directories by ifuse later on. On Kubuntu I create a directory ~/iPad (here CLI commands, the directories can also be created with Dolphin): mkdir ~/iPad Then I create one directory for every app directory I want to mount, 2 in my example. cd ~/iPad mkdir OPlayerHD mkdir Download Now I can mount the apps Documents directories with ifuse, using the appids I retrieved from ideviceinstaller -l command, the bold ones in the list above: ifuse –appid com.olimsoft.oplayer.hd.lite ~/iPad/OplayerHD ifuse –appid com.demandviaspeech.dvs ~/iPad/Download The trick is done; if I type: ls ~/iPad/OplayerHD I see the list of files and directories I have on my iPad, and Dolphin can navigate to these directories.

5

Shown right is one screenshot with Dolphin and a terminal showing one mounted iPad directory. After we have moved our files, it's time to unmount the iPad. In Dolphin we leave the directories we have mounted with ifuse, and in a terminal type: cd ~ sudo umount ~/iPad/* This mounting process is quite easy: once we have made the directories we need and have chosen the appids, it can be automated with a simple script that lists all the “ifuse –appid” instructions and the execution of the script can be added as an action to the Device notifier. I suggest this solution if you prefer to work by CLI and if you do not change the apps on your idevice very much.

6

Second solution (GUI): file manager PCManFM We cannot connect directly to the idevice with Kubuntu because Dolphin does not support the AFC protocol, though there are other file managers which do so, such as PCManFM, the default file manager in Lubuntu. The best solution I've found is to install the qt version of PCManFM: it looks nice integrated in Kubuntu. The standard version of pcmanfm – installable without adding ppas and based on gtk – at the time of writing does not show the icons if it's launched as an action of Device notifier. We need to install the package pcmanfm-qt, available in the Lubuntu daily builds ppa. First we add the ppa: sudo repository-apt-add ppa:lubuntu-dev/lubuntu-daily sudo apt-get update Then we install the package: sudo apt-get install pcmanfm-qt PCManFM supports AFC protocol, and once it’s installed, it is possible to mount, manage directories and files, and unmount directly via PCManFM.

7

It's nice to set up a device notifier action that opens PCManFM when your iDevice is connected. My iPad and also a couple of other iDevices I tested are detected as cameras, so we can set up a device notifier action this way: Device notifier settings (right click on the icon) > Device actions > Add Then fill the mask you are presented with: • icon: click on it to choose an icon you like (my choice: standard file manager icon) • title: this is the entry we will see in the actions list of the device notifier, it's the first field at the top of the mask, type what you like (my title: 'Open iDevice with PCManFM') • field Command: type 'pcmanfm-qt' • field Parameter Type: choose 'Property Match' • field Device Type: choose 'Camera' • field Value Name: choose 'Supported Drivers' • choose 'Equals' from last choice list and type 'gphoto' in the field aside Then save these parameters by clicking on 'Save Parameter Changes' and then OK twice.

8

Below left is a picture of my settings. If you did everything right, when you plug in your iDevice, a new action will be available in the list presented by the device notifier; when you the click on it, PCManFM is launched. On the left side list of PCManFM, under Devices, you will see two entries such as “iPad” and “Documents on iPad”; “Documents on iPad” gives us access to the apps' Documents directories. When you are done with iDevice file managing, make sure to unmount the iDevice, by right clicking on the iDevice names. Below right is a picture of PCManFM and my iPad apps directories - my iPad's name is iPadGT, so I have iPadGT and “Documents on iPadGT” in the devices list. I'm using this last method, and I'm quite satisfied with its behavior, even if an error message pops up occasionally while I'm unmounting the iPad device, since this does not affect the unmount operation.

issue82/comment_connecter_un_dispositif_ios.1404381786.txt.gz · Dernière modification : 2014/07/03 12:03 de auntiee