https://wiki.archlinux.org/api.php?action=feedcontributions&user=Maxtomin&feedformat=atomArchWiki - User contributions [en]2024-03-29T08:47:11ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:SANE&diff=575339Talk:SANE2019-06-13T07:39:19Z<p>Maxtomin: Typo</p>
<hr />
<div>== Parallel port scanners ==<br />
<br />
Hi folks.<br />
<br />
Scanning over my parallel port scanner does not work unless my user is in the "lp" group. This article says that users need not be in any special group for the scanner to work since systemd.<br />
<br />
Basically, my experience contradicts the article and I would like to either fix my setup or the article so both are in agreement.<br />
<br />
[[User:Davidmcinnis|Davidmcinnis]] ([[User talk:Davidmcinnis|talk]]) 21:42, 18 June 2017 (UTC)<br />
<br />
:I wasn't aware that parallel port scanners were a thing!<br />
:[[SANE#Permission problem]] is really only relevant for usb scanners - parallel ports are assumed to have printers attached, and [[CUPS]] uses the {{ic|lp}} group for other purposes. See {{bug|50009}}, and the note in [[CUPS#Connection Interfaces]]. The short version is that the wiki should be fixed to mention this and that you adding your user to the lp group is perfectly fine unless you are concerned about your user being able to view some of the CUPS files, which may contain sensitive information such as network printer passwords.<br />
: -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 00:46, 19 June 2017 (UTC)<br />
<br />
:I've made [https://wiki.archlinux.org/index.php?title=SANE&diff=480078&oldid=479114 an edit] to the page - does that fix the article for you? -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 01:25, 19 June 2017 (UTC)<br />
<br />
Works for me. Thank you very much! {{Unsigned|08:54, 1 April 2019 (UTC)|Davidmcinnis}}<br />
<br />
== Multi-function printers/scanners ==<br />
<br />
Hi Everyone,<br />
<br />
I think the fix discussed above with “lp” udev group can also help with USB multi-function printers/scanners. My understanding of the problem is: a single device can not be owned by multiple groups in udev. So as soon as you add the rule with GROUP=“scanner”, printing may stop working. It’s kind of random, sometimes it works, so I spent a lot of time debugging it.<br />
<br />
The solution for me was to use GROUP=“cups” in the scanner rule mentioned in [[SANE#Permission problem]]. I tried to edit the page, but my edit was reverted. Maybe someone could phrase it better than me. <br />
<br />
[[User:Maxtomin|Maxtomin]] ([[User talk:Maxtomin|talk]]) 07:30, 13 June 2019 (UTC)</div>Maxtominhttps://wiki.archlinux.org/index.php?title=Talk:SANE&diff=575338Talk:SANE2019-06-13T07:37:00Z<p>Maxtomin: Multi-function printers/scanners</p>
<hr />
<div>== Parallel port scanners ==<br />
<br />
Hi folks.<br />
<br />
Scanning over my parallel port scanner does not work unless my user is in the "lp" group. This article says that users need not be in any special group for the scanner to work since systemd.<br />
<br />
Basically, my experience contradicts the article and I would like to either fix my setup or the article so both are in agreement.<br />
<br />
[[User:Davidmcinnis|Davidmcinnis]] ([[User talk:Davidmcinnis|talk]]) 21:42, 18 June 2017 (UTC)<br />
<br />
:I wasn't aware that parallel port scanners were a thing!<br />
:[[SANE#Permission problem]] is really only relevant for usb scanners - parallel ports are assumed to have printers attached, and [[CUPS]] uses the {{ic|lp}} group for other purposes. See {{bug|50009}}, and the note in [[CUPS#Connection Interfaces]]. The short version is that the wiki should be fixed to mention this and that you adding your user to the lp group is perfectly fine unless you are concerned about your user being able to view some of the CUPS files, which may contain sensitive information such as network printer passwords.<br />
: -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 00:46, 19 June 2017 (UTC)<br />
<br />
:I've made [https://wiki.archlinux.org/index.php?title=SANE&diff=480078&oldid=479114 an edit] to the page - does that fix the article for you? -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 01:25, 19 June 2017 (UTC)<br />
<br />
Works for me. Thank you very much! {{Unsigned|08:54, 1 April 2019 (UTC)|Davidmcinnis}}<br />
<br />
== Multi-function printers/scanners ==<br />
<br />
Hi Everyone,<br />
<br />
I think the fix discussed above with “lp” udev group can also help with USB multi-function printers/scanners. My understanding of the problem is: a single device can not be owned by multiple groups in udev. So as soon as you add the rule with GROUP=“scanner”, printing may stop working. It’s kind of random, sometimes it works, so I spent a lot of time debugging it.<br />
<br />
The solution for me was to use GROUP=“cups” in the scanner rule mentioned in [[SANE#Permission problem]]. I tried to edit the page, by my edit was reverted. Maybe someone could phrase it better than me. <br />
<br />
[[User:Maxtomin|Maxtomin]] ([[User talk:Maxtomin|talk]]) 07:30, 13 June 2019 (UTC)</div>Maxtominhttps://wiki.archlinux.org/index.php?title=Talk:SANE&diff=575337Talk:SANE2019-06-13T07:31:45Z<p>Maxtomin: header</p>
<hr />
<div>== Parallel port scanners ==<br />
<br />
Hi folks.<br />
<br />
Scanning over my parallel port scanner does not work unless my user is in the "lp" group. This article says that users need not be in any special group for the scanner to work since systemd.<br />
<br />
Basically, my experience contradicts the article and I would like to either fix my setup or the article so both are in agreement.<br />
<br />
[[User:Davidmcinnis|Davidmcinnis]] ([[User talk:Davidmcinnis|talk]]) 21:42, 18 June 2017 (UTC)<br />
<br />
:I wasn't aware that parallel port scanners were a thing!<br />
:[[SANE#Permission problem]] is really only relevant for usb scanners - parallel ports are assumed to have printers attached, and [[CUPS]] uses the {{ic|lp}} group for other purposes. See {{bug|50009}}, and the note in [[CUPS#Connection Interfaces]]. The short version is that the wiki should be fixed to mention this and that you adding your user to the lp group is perfectly fine unless you are concerned about your user being able to view some of the CUPS files, which may contain sensitive information such as network printer passwords.<br />
: -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 00:46, 19 June 2017 (UTC)<br />
<br />
:I've made [https://wiki.archlinux.org/index.php?title=SANE&diff=480078&oldid=479114 an edit] to the page - does that fix the article for you? -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 01:25, 19 June 2017 (UTC)<br />
<br />
Works for me. Thank you very much! {{Unsigned|08:54, 1 April 2019 (UTC)|Davidmcinnis}}<br />
<br />
== Multi-function printers/scanners ==<br />
<br />
Hi Everyone,<br />
<br />
I think the fix discussed above with “lp” udev group can also help with USB multi-function printers/scanners. My understanding of the problem is: a single device can not be owned by multiple groups in udev. So as soon as you add the rule with GROUP=“scanner”, printing may stop working. It’s kind of random, sometimes it works, so I spent a lot of time debugging it.<br />
<br />
The solution for me was to use “cups” group in the scanner rule to mentioned in [[SANE#Permission problem]]. I tried to edit the page, by my edit was reverted. Maybe someone could phrase it better than me. <br />
<br />
[[User:Maxtomin|Maxtomin]] ([[User talk:Maxtomin|talk]]) 07:30, 13 June 2019 (UTC)</div>Maxtominhttps://wiki.archlinux.org/index.php?title=Talk:SANE&diff=575336Talk:SANE2019-06-13T07:30:15Z<p>Maxtomin: /* Multi-function printers/scanners */</p>
<hr />
<div>== Parallel port scanners ==<br />
<br />
Hi folks.<br />
<br />
Scanning over my parallel port scanner does not work unless my user is in the "lp" group. This article says that users need not be in any special group for the scanner to work since systemd.<br />
<br />
Basically, my experience contradicts the article and I would like to either fix my setup or the article so both are in agreement.<br />
<br />
[[User:Davidmcinnis|Davidmcinnis]] ([[User talk:Davidmcinnis|talk]]) 21:42, 18 June 2017 (UTC)<br />
<br />
:I wasn't aware that parallel port scanners were a thing!<br />
:[[SANE#Permission problem]] is really only relevant for usb scanners - parallel ports are assumed to have printers attached, and [[CUPS]] uses the {{ic|lp}} group for other purposes. See {{bug|50009}}, and the note in [[CUPS#Connection Interfaces]]. The short version is that the wiki should be fixed to mention this and that you adding your user to the lp group is perfectly fine unless you are concerned about your user being able to view some of the CUPS files, which may contain sensitive information such as network printer passwords.<br />
: -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 00:46, 19 June 2017 (UTC)<br />
<br />
:I've made [https://wiki.archlinux.org/index.php?title=SANE&diff=480078&oldid=479114 an edit] to the page - does that fix the article for you? -- [[User:Pypi|Pypi]] ([[User talk:Pypi|talk]]) 01:25, 19 June 2017 (UTC)<br />
<br />
Works for me. Thank you very much! {{Unsigned|08:54, 1 April 2019 (UTC)|Davidmcinnis}}<br />
<br />
Hi Everyone,<br />
<br />
I think the fix discussed above with “lp” udev group can also help with USB multi-function printers/scanners. My understanding of the problem is: a single device can not be owned by multiple groups in udev. So as soon as you add the rule with GROUP=“scanner”, printing may stop working. It’s kind of random, sometimes it works, so I spent a lot of time debugging it.<br />
<br />
The solution for me was to use “cups” group in the scanner rule to mentioned in [[SANE#Permission problem]]. I tried to edit the page, by my edit was reverted. Maybe someone could phrase it better than me. <br />
<br />
[[User:Maxtomin|Maxtomin]] ([[User talk:Maxtomin|talk]]) 07:30, 13 June 2019 (UTC)</div>Maxtominhttps://wiki.archlinux.org/index.php?title=SANE&diff=575047SANE2019-06-10T19:05:07Z<p>Maxtomin: "GROUP=scanner" can cause issues with printing for multi-function devices, in my case "GROUP=cups" helped</p>
<hr />
<div>[[Category:Digital imaging]]<br />
[[es:SANE]]<br />
[[fr:Sane]]<br />
[[it:SANE]]<br />
[[ja:SANE]]<br />
[[zh-hans:SANE]]<br />
{{Related articles start}}<br />
{{Related|SANE/Scanner-specific problems}}<br />
{{Related|Scanner Button Daemon}}<br />
{{Related articles end}}<br />
<br />
[http://www.sane-project.org/ SANE] ([[wikipedia:Scanner Access Now Easy|Scanner Access Now Easy]]) provides a library and a command-line tool to use scanners under GNU/Linux. See [http://www.sane-project.org/sane-supported-devices.html] to check if sane supports your scanner.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sane}} package.<br />
<br />
== Verification ==<br />
<br />
Now you can try to see if sane recognizes your scanner<br />
<br />
$ scanimage -L<br />
<br />
If that fails, run the command again as root to check for permission problems. If that fails as well, check that your scanner is plugged into the computer. You also might have to unplug/plug your scanner for {{ic|/usr/lib/udev/rules.d/49-sane.rules}} to recognize your scanner.<br />
<br />
Now you can see if it actually works<br />
<br />
$ scanimage --format=png > test.png<br />
<br />
If the scanning fails with the message {{ic|scanimage: sane_start: Invalid argument}} you may need to specify the device.<br />
<br />
{{hc|$ scanimage -L|<br />
device `v4l:/dev/video0' is a Noname Video WebCam virtual device<br />
device `pixma:04A91749_247936' is a CANON Canon PIXMA MG5200 multi-function peripheral<br />
}}<br />
<br />
Then you would need to run<br />
<br />
$ scanimage --device "pixma:04A91749_247936" --format=tiff > test.tiff<br />
<br />
Sane provides many special backend options for numerous scanner types. To see what these are for your device:<br />
<br />
$ scanimage -A<br />
<br />
== Installing a scanner driver ==<br />
<br />
Most scanners should work out of the box. If yours does not, see [[SANE/Scanner-specific problems]] for installation instructions.<br />
<br />
=== Firmware ===<br />
<br />
{{Note|This section is only needed if you need to upload firmware to your scanner.}}<br />
<br />
Firmwares usually have the '''{{ic|.bin}}''' extension. <br />
<br />
Firstly you need to put the firmware someplace safe, it is recommended to put it in a subdirectory of {{ic|/usr/share/sane/}}.<br />
<br />
Then you need to tell sane where the firmware is:<br />
<br />
* Find the name of the backend for your scanner from the [http://www.sane-project.org/sane-supported-devices.html sane supported devices list].<br />
* Open the file {{ic|/etc/sane.d/''<backend-name>''.conf}}.<br />
* Make sure the firmware entry is uncommented and let the file-path point to where you put the firmware file for your scanner. Be sure that members of the group {{ic|scanner}} can access the {{ic|/etc/sane.d/''<backend-name>''.conf}} file.<br />
<br />
If the backend of your scanner is not part of the sane package (such as {{ic|hpaio.conf}} which is part of {{pkg|hplip}}), you need to uncomment the relevant entry in {{ic|/etc/sane.d/dll.d}} or in {{ic|/etc/sane.d/dll.conf}}.<br />
<br />
=== Fujitsu fi series ===<br />
<br />
For some of the Fujitsu fi series document scanners, the {{Aur|pfufs}} proprietary driver offers advanced functionality over the already mature SANE default driver, such as control of an optional imprinter for stamping scanned documents or requesting accurate status of the consumables from the host.<br />
<br />
== Install a frontend ==<br />
<br />
Many frontends exist for SANE, a non-exhaustive list of which can be found on the [http://www.sane-project.org/sane-frontends.html sane-project website].<br />
<br />
* {{App|[[Wikipedia:Scanner Access Now Easy#Simple_Scan|Simple Scan]]|Simplified GUI that is intended to be easier to use and better integrated into the [[GNOME]] desktop than XSane. It was initially written for Ubuntu and is maintained by Robert Ancell of Canonical Ltd. for GNU/Linux.|https://gitlab.gnome.org/GNOME/simple-scan|{{Pkg|simple-scan}}}}<br />
* {{App|[[Wikipedia:Skanlite|Skanlite]]|Simple image scanning application that does nothing more than scan and save images, based on the KSane backend.|https://www.kde.org/applications/graphics/skanlite|{{Pkg|skanlite}}}}<br />
* {{App|[[Wikipedia:Scanner Access Now Easy#XSane|XSane]]|Full-featured GTK-based frontend looking a bit old but providing extended functionalities.|http://www.xsane.org/|{{Pkg|xsane}}}}<br />
<br />
Some [[List of applications/Documents#OCR software|OCR software]] are able to scan images using SANE: gImageReader, [[Wikipedia:Scanner Access Now Easy#gscan2pdf|gscan2pdf]], Linux-Intelligent-Ocr-Solution, [[Wikipedia:OCRFeeder|OCRFeeder]], [https://openpaper.work Paperwork].<br />
<br />
{{Note|<br />
* Scanning directly to PDF using XSane in 16bit color depth mode is known to produces [https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/539162 corrupted files] and a note in {{ic|pacman}} output warns so. 8bit mode is known to work.<br />
<br />
{{Accuracy|skanlite does not need to ''handle'' mDNS. As long as [[Avahi#Hostname resolution|mDNS hostname resolution]] is set up correctly and the scanner 's address is specified as {{ic|''hostname''.local}}, it should just work. This looks like a hplip limitation/bug.}}<br />
<br />
* Using a frontend does not mean you do not have to apply some tricks. This is especially true with devices configured via [[mDNS]]. For example, {{ic|skanlite}} needs to have additional info specified on the command line in order to detect a network scanner properly as it cannot handle mDNS. Here is an example with an HP Officejet Pro L7590: {{ic|1=skanlite --device "hpaio:/net/Officejet_Pro_L7500?ip=192.168.0.17"}}.<br />
}}<br />
<br />
== Network scanning ==<br />
<br />
=== Sharing your scanner over a network ===<br />
<br />
You can share your scanner with other hosts on your network who use ''sane'', ''xsane'' or xsane-enabled ''GIMP''. To set up the server, first indicate which hosts on your network are allowed access.<br />
<br />
Change the {{ic|/etc/sane.d/saned.conf}} file to your liking, for example:<br />
<br />
# required<br />
localhost<br />
# allow local subnet<br />
192.168.0.0/24<br />
<br />
If you use [[iptables]], [[Kernel_modules|insert]] the {{ic|nf_conntrack_sane}} module to let the firewall track {{ic|saned}} connections.<br />
<br />
Now [[start/enable]] {{ic|saned.socket}}. Your scanner is now available over the network. For more information, see {{man|8|saned}}.<br />
<br />
{{Note|saned intentionally refuses to share scanners that use the net: backend (which includes some USB scanners). There is a crude patch to allow this in {{Bug|54786}}, but note it may cause problems on some networks. Check output of {{ic|scanimage -L}} on the server to see the scanner url.}}<br />
<br />
=== Accessing your scanner from a remote workstation ===<br />
<br />
{{Note|Some network scanners require a different approach. See [[SANE/Scanner-specific problems]].}}<br />
<br />
You can access your network-enabled scanner from a remote Arch Linux workstation.<br />
<br />
First, specify the server's host name or IP address in the {{ic|/etc/sane.d/net.conf}} file:<br />
<br />
# static IP address<br />
192.168.0.1<br />
# or host name<br />
stratus<br />
<br />
Now test your workstation's connection:<br />
<br />
$ scanimage -L<br />
<br />
The network scanner should now also show up in any [[#Install a frontend|front-end]].<br />
<br />
=== Windows clients ===<br />
<br />
Since the Windows port of SANE seems to be [http://www.xsane.org/xsane-download.html unsupported, outdated and difficult to get], you can try [http://sanetwain.ozuzo.net/ SaneTwain] instead.<br />
<br />
== Troubleshooting ==<br />
<br />
:See also: [[SANE/Scanner-specific problems]]<br />
<br />
=== Invalid argument ===<br />
<br />
If you get an "Invalid argument" error with xsane or another sane front-end, this could be caused by one of the following reasons:<br />
<br />
==== Missing firmware file ====<br />
<br />
No firmware file was provided for the used scanner (see [[#Firmware]] for details).<br />
<br />
==== Wrong firmware file permissions ====<br />
<br />
The permissions for the used firmware file are wrong. Correct them using<br />
<br />
# chown root:scanner /usr/share/sane/''SCANNER_MODEL''/''FIRMWARE_FILE''<br />
# chmod ug+r /usr/share/sane/''SCANNER_MODEL''/''FIRMWARE_FILE''<br />
<br />
==== Multiple backends claim scanner ====<br />
<br />
It may happen, that multiple backends support (or pretend to support) your scanner, and sane chooses one that does not do after all (the scanner will not be displayed by {{ic|scanimage -L}} then). This has happened with older Epson scanners and the {{ic|epson2}} resp. {{ic|epson}} backends. In this case, the solution is to comment out the unwanted backend in {{ic|/etc/sane.d/dll.conf}}. In the Epson case, that would be to change<br />
<br />
epson2<br />
#epson<br />
<br />
to <br />
<br />
#epson2<br />
epson<br />
<br />
It may also be possible that the independent {{Pkg|iscan}} {{ic|epkowa}} backend interferes with your {{ic|snapscan}} backend (epson scanners). You may get this error right after using the {{ic|scanimage -L}} command. Starting the scanner app (like {{Pkg|xsane}}) twice can also solve the problem. Otherwise check your {{ic|/etc/sane.d/epkowa.conf}} for wrong configurations or remove the {{Pkg|iscan}} package.<br />
<br />
==== Communication via xHCI not working (older scanner models) ====<br />
<br />
Some older scanner models do not work when connected via an USB3 port. If you experience this issue, try setting the {{ic|1=SANE_USB_WORKAROUND=1}} [[environment variable]] before starting your frontend.[https://lists.alioth.debian.org/pipermail/sane-announce/2017/000036.html][https://anonscm.debian.org/cgit/sane/sane-backends.git/commit/?id=1207ce5a40664c04b934bd0a6babbc1575361356]<br />
<br />
If that does not work, try one of the following workarounds:<br />
<br />
* Use an USB2 port instead of an USB3 port, if available.<br />
* Disable xHCI via BIOS/EFI. eHCI will consequently be used and communication with the scanner will work. On the downside, USB3 speed can not be reached on any port.<br />
* On (some) intel chipsets the {{ic|setpci}} command can be used to route specific usb ports to either the xHCI or the eHCI controller. See [https://forums.opensuse.org/showthread.php/507627-Suse-13-2-scanner-no-longer-working-on-64-bit-version?p=2714695#post2714695 here] and [https://superuser.com/questions/812022/force-a-single-usb-3-0-port-to-work-as-usb-2-0 here] (scroll down to where it says "setpci") for further information. With this it is possible to toggle single USB ports with a simple shell script.<br />
* Connect the scanner over the network instead if it is supported.<br />
<br />
=== Slow startup ===<br />
<br />
If you encounter slow startup issue (e.g. {{ic|xsane}} or {{ic|scanimage -L}} take a lot to find scanner) it may be that more than one driver supporting it is available. <br />
<br />
Have a look at {{ic|/etc/sane.d/dll.conf}} and try commenting out one (e.g. you may have {{ic|epson}}, {{ic|epson2}} and {{ic|epkowa}} enabled at the same time, try leaving only {{ic|epson}} or {{ic|epkowa}} uncommented).<br />
<br />
You can also try to comment out {{ic|net}} driver, if there are no network scanners.<br />
<br />
Your [[webcam]] might also be listed as scanning device and slow down detection at startup. To blacklist webcam, try commenting out all the lines in {{ic|/etc/sane.d/v4l.conf}}.<br />
<br />
=== Device busy ===<br />
<br />
{{Accuracy|The user should not need to be in the scanner group (see [[Users and groups#Pre-systemd groups]])}}<br />
<br />
If your USB device is listed with {{ic|scanimage -L}} but launching the test {{ic|1=scanimage pixma:04A9173E_11DAD1 --format=tiff > test.tiff}} always return the 'Device busy' error, you might try to add your username to the scanner group {{ic|usermod -a -G scanner yourusername}} then blacklist the {{ic|usblp}} kernel module by writing {{ic|blacklist usblp}} in {{ic|/etc/modprobe.d/no-usblp.conf}} (it prevents {{ic|usblp}} from loading to support scanning, not needed by xsane and related tools, might also [[CUPS/Troubleshooting#Conflict_with_usblp|conflict with CUPS]]). Reboot to finish. [http://cromwell-intl.com/linux/canon-pixma-printer-scanner.html]<br />
<br />
=== Permission problem ===<br />
<br />
With systemd, the {{ic|scanner}} and {{ic|lp}} groups are deprecated. No need to add your user to those groups. See [[Users and groups#Pre-systemd groups]] for detail.<br />
<br />
You can also try to change permissions of usb device but this is not recommended, a better solution is to fix the [[Udev rules]] so that your scanner is recognized.<br />
<br />
First check connected usb devices with {{ic|lsusb}}:<br />
<br />
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 003: ID 04d9:1603 Holtek Semiconductor, Inc.<br />
Bus 003 Device 002: ID 04fc:0538 Sunplus Technology Co., Ltd<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard<br />
Bus 001 Device 002: ID 046d:0802 Logitech, Inc. Webcam C200<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
In our example we see the scanner: {{ic|Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard}}. Here {{ic|03f0}} is the ''vendorID'' and {{ic|2504}} is the ''productID''.<br />
<br />
Now open {{ic|/usr/lib/udev/rules.d/49-sane.rules}} and see if there is there is a line with the ''vendorID'' and ''productID'' of your scanner. If there is not any, create the new file {{ic|/etc/udev/rules.d/49-sane-missing-scanner.rules}}, with the following contents:<br />
<br />
ATTRS{idVendor}=="'''vendorID'''", ATTRS{idProduct}=="'''productID'''", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"<br />
<br />
{{Warning| {{ic|scanner}} GROUP can cause printing issues for multi-function devices. Using your [[CUPS]] group ({{ic|cups}} or {{ic|lp}}) instead should help. }}<br />
<br />
Save the file, plug out and back in your scanner and the file permissions should be now correct.<br />
<br />
{{Accuracy|The scanner needs to be added to the right backend file, {{ic|hp4200.conf}} will not work for any scanner.}}<br />
<br />
Another tip, is that you can add your device (scanner) in backend file:<br />
<br />
Add {{ic|usb 0x03f0 0x2504}} to {{ic|/etc/sane.d/hp4200.conf}} so it looks like this:<br />
<br />
#<br />
# Configuration file for the hp4200 backend<br />
#<br />
#<br />
# HP4200<br />
#usb 0x03f0 0x0105<br />
usb 0x03f0 0x2504<br />
<br />
==== Parallel port scanners ====<br />
<br />
All devices attached to a parallel port are assumed to be printers, and are given a {{ic|lp}} group. Either create a [[udev]] rule to mark the relevant parallel port as {{ic|libsane_matched}}, or add your user to the {{ic|lp}} [[user group]]. CUPS also uses the {{ic|lp}} group for read-only access to configuration files, so there are potential security implications to adding users to the {{ic|lp}} group - see [[CUPS#Connection Interfaces]] for more information.</div>Maxtominhttps://wiki.archlinux.org/index.php?title=IOS&diff=568108IOS2019-03-07T19:29:51Z<p>Maxtomin: Non-obvious gvfs-gphoto2 package is required to access iPhone camera roll (by PTP)</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Mobile devices]]<br />
[[fr:iPod]]<br />
[[ja:iOS]]<br />
[[zh-hans:IPod]]<br />
{{Related articles start}}<br />
{{Related|Audiobook}}<br />
{{Related|iPhone tethering}}<br />
{{Related articles end}}<br />
{{Style|Numerous style issues, see [[Help:Style]]}}<br />
The purpose of this article is to demonstrate the use of an '''iPad''', '''iPod''' or '''iPhone''' with Arch Linux.<br />
<br />
== Connecting to a device ==<br />
Applications which use GVFS, such as some file managers (GNOME Files, Thunar) or media players (Rhythmbox) can interact with iOS devices after [[install]]ing the {{pkg|gvfs-afc}} and {{pkg|gvfs-gphoto2}} packages. Restarting the file manager or application might be needed. Also confirm that usbmuxd is running in the background if the device is still not being recognized by the file manager or application.<br />
<br />
==== Manual mounting ====<br />
<br />
[[Install]] the {{Pkg|ifuse}}, {{Pkg|libimobiledevice}} and {{AUR|ideviceinstaller-git}} packages.<br />
<br />
Make sure that you have the fuse module loaded by doing {{ic|modprobe fuse}}, assuming that you do not have it in {{ic|/etc/modules-load.d/}} already.<br />
<br />
{{Note|If your device has a screen password, unlock the device first}}<br />
<br />
Plug in the device and follow the following steps<br />
<br />
#usbmuxd -f -v<br />
idevice_id -l<br />
ideviceinfo<br />
ideviceinstaller -l<br />
<br />
The last command will provide the information regarding mounting with Fuse. For example to mount VLC installed on the device one can use the command:<br />
<br />
#ifuse --documents org.videolan.vlc-ios <mountpoint><br />
<br />
The mountpoint field is where you want to have it mounted.<br />
<br />
And you are done! You should be able to transfer files.<br />
<br />
To unmount:<br />
# umount <mountpoint><br />
<br />
{{Note|If an error is encountered during mounting, rebooting the device and repeating the steps can be helpful}}<br />
<br />
== Changing iPod mountpoint ==<br />
<br />
Traditional iPods are accessed just like a normal USB storage device containing a vfat file system (in rare cases {{ic|hfsplus}}), and can be [[USB storage devices|accessed as such]]. See the [[USB storage devices]] article for detailed instructions.<br />
<br />
{{Tip|If you cannot see the vfat file system, it is likely that your iPod is {{ic|hfsplus}} formatted. For convenience, as Arch kernel is built with no support for that filesystem, you might want to restore your iPod using iTunes on Windows. This will erase all data on your iPod, and format it as a vfat filesystem}}<br />
<br />
If udisks2 is running, it will mount an attached iPod to {{ic|/run/media/''$USER''/''iPod_name''}}.<br />
<br />
If the volume label of your iPod is long, or contains a mixture of spaces, and/or lower-case and capital letters, it may present an inconvenience. You may easily change the volume label for more expedient access using {{ic|dosfslabel}} from the {{pkg|dosfstools}} package:<br />
<br />
* Get and confirm the current volume label:<br />
# dosfslabel /dev/sd''XY''<br />
* Set the new volume label:<br />
# dosfslabel /dev/sd''XY'' ArchPod<br />
* Unmount the device:<br />
$ udisksctl unmount -b /dev/sd''XY''<br />
* Mount it again:<br />
$ udisksctl mount -b /dev/sd''XY''<br />
where {{ic|/dev/sdxx}} is the current device node of your iPod.<br />
<br />
== Importing videos and pictures ==<br />
<br />
Both videos and photos can be found in typically in {{ic|''&lt;mountpoint&gt;''/DCIM/100APPLE}}.<br />
<br />
=== HTML5 videos ===<br />
<br />
Typically you want to convert MOV files to a HTML5 video format like OGV using {{Pkg|ffmpeg2theora}}. Note that the creation date metadata is not in the converted video, so you need to use a script like:<br />
<br />
{{bc|<nowiki><br />
#!/usr/bin/sh<br />
<br />
find -name "*.MOV" | while read mov<br />
do<br />
d=$(gst-discoverer-1.0 -v $mov | awk '/datetime:/{print $2}' | tr -d \")<br />
base=${mov%.*}<br />
if test -f $base.ogv<br />
then<br />
touch -d${d} $base.ogv<br />
ls -l $base.ogv<br />
else<br />
echo $base.ogv missing<br />
fi<br />
done<br />
</nowiki>}}<br />
<br />
And use {{ic|cp -a}} or {{ic|rsync -t}} in order to preserve the file's date & time.<br />
<br />
=== Importing pictures and deleting them ===<br />
<br />
You can move photos and videos out of {{ic|''&lt;mountpoint&gt;''/DCIM/100APPLE}}, however you need to trigger a rebuild of the "Camera Roll" database by deleting the old databases.<br />
<br />
# rm Photos* com.apple.photos.caches_metadata.plist<br />
<br />
== Converting video for devices ==<br />
<br />
=== Handbrake ===<br />
<br />
[http://handbrake.fr/ Handbrake] is a nifty tool with presets for a variety of iPod versions. CLI and GTK versions are available with the {{pkg|handbrake-cli}} and {{pkg|handbrake}} packages respectively.<br />
<br />
If you do decide to take the CLI way, a good guide is available at http://trac.handbrake.fr/wiki/CLIGuide.<br />
<br />
=== Avidemux ===<br />
[[Install]] the {{Pkg|avidemux-qt}} package.<br />
<br />
This can convert to mp4 files. If you enforce a hard max of bit rate @ 700ish and keep the video size to 720x480 or 320x240 than it works fine for video file exporting.<br />
<br />
=== Mencoder ===<br />
<br />
[[Install]] the {{pkg|mplayer}} package.<br />
<br />
Has ''extremely'' comprehensive configuration support, which will be able to spit out iPod-compatible video files. Check out {{man|1|mencoder}}; a lot of MPlayer opts will also affect encoding.<br />
<br />
A basic guide is also available at [[MEncoder]].<br />
<br />
An example command to encode iPhone/iPod Touch-compatible video:<br />
<br />
mencoder INPUT -o output.mp4 \<br />
-vf scale=480:-10,harddup \<br />
-oac faac -faacopts mpeg=4:object=2:raw:br=128 \<br />
-of lavf -lavfopts format=mp4 \<br />
-ovc x264 -x264encopts nocabac:level_idc=30:bframes=0<br />
<br />
=== FFmpeg ===<br />
<br />
[[Install]] the {{pkg|ffmpeg}} package.<br />
<br />
Another encoder with comprehensive configuration support. Example command to encode for 5G iPod:<br />
<br />
$ ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 \<br />
-g 300 -acodec aac -ab 96 -i INPUT -s 320x240 \<br />
-aspect 4:3 output.mp4<br />
<br />
or iPod Touch/iPhone compatible video output:<br />
<br />
$ ffmpeg -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5\<br />
-bufsize 4096 -g 300 -acodec aac -ab 192 -s 480×320 -aspect 4:3 -i INPUT output.mp4<br />
<br />
== Device specific ==<br />
<br />
=== iPhone/iPod Touch ===<br />
<br />
By default, neither the iPhone nor the iPod Touch present mass storage capability over USB, though there is a solution for accessing your files.<br />
<br />
The proposed solution is to use a FUSE file system called {{Pkg|ifuse}}, which allows you to mount your device through USB, as you normally would. After installing ifuse, for instance, you should see your iPhone appear in the left navigation of Gnome Files and other supporting file managers.<br />
<br />
{{Tip|You can also use other [[#iPod management apps]] to transfer pictures and music.}}<br />
<br />
Refer to this page:[https://help.ubuntu.com/community/PortableDevices/iPhone]<br />
<br />
==== The iFuse Way ====<br />
{{Note|If your device has a screen password, one must unlock the device to gain access through the USB interface.}}<br />
<br />
[[Install]] the {{Pkg|ifuse}} package.<br />
<br />
Now make sure that you have the fuse module loaded by doing {{ic|modprobe fuse}}, assuming that you do not have it in {{ic|/etc/modules-load.d/}} already.<br />
<br />
You can now mount your device. Make sure it is unlocked before you plug it in, or it will not be recognized.<br />
# ifuse <mountpoint><br />
The mountpoint field is where you want to have it mounted.<br />
<br />
And you are done! You should be able to point your syncing software of choice to the mount point and be able to transfer files.<br />
<br />
To unmount your device:<br />
# umount <mountpoint><br />
<br />
Members of group {{ic|fuse}} can mount devices as regular user:<br />
$ ifuse <mountpoint><br />
<br />
To unmount:<br />
$ fusermount -u <mountpoint><br />
<br />
==== Generating HashInfo file ====<br />
If you have not previously synced your device using iTunes specifically, you will get error messages telling you that the HashInfo file is missing. This can be fixed by making an iTunes installation on MacOS or Windows create it (by plugging in the iPod there). Alternatively you can create this file yourself, instructions can be found on [http://ihash.marcansoft.com/ this website].<br />
<br />
==== Unobfuscating the Database ====<br />
<br />
Since firmware version 2.0, Apple has obfuscated the music database. If you are using recent firmware, the file {{ic|/System/Library/Lockdown/Checkpoint.xml}} can be modified to enable use of the older, non-obfuscated database. If that file doesn't exist then try to copy from {{ic| /System/Library/CoreServices/Checkpoint.xml}} to {{ic|/System/Library/Lockdown/Checkpoint.xml}} then replace:<br />
<key>DBVersion</key><br />
<integer>4</integer><br />
with:<br />
<key>DBVersion</key><br />
<integer>2</integer><br />
Then reboot your device.<br />
<br />
If syncing fails with "ERROR: Unsupported checksum type '0' in cbk file generation!", you may need to leave this at 4. libgpod seems to [http://gitorious.org/libgpod/libgpod/blobs/b9b83dc8b6c3d1f0c53ed32f05279ca838d54e02/src/itdb_sqlite.c#line2064 expect a hashed database.]<br />
<br />
=== iPod Classic/Nano (3rd generation) ===<br />
<br />
You need to set up the iPod to make libgpod able to find its Firewire ID. For this, you will need to get your FireWire ID manually<br />
<br />
1) Mount the iPod as a rw mount point. In the following example, I will use {{ic|/mnt/ipod}}.<br />
<br />
2 ) Find the serial number by typing<br />
<br />
# lsusb -v | grep -i Serial <br />
<br />
this should print a 16 character long string like 00A1234567891231 (it will have no colons or hyphens) <br />
<br />
3) Once you have that number, create or edit {{ic|/mnt/ipod/iPod_Control/Device/SysInfo}}. Add to that file the line below:<br />
<br />
FirewireGuid: 0xffffffffffffffff<br />
<br />
(replace ffffffffffffffff with the 16 digit string you obtained at the previous step and do not forget the leading 0x before the string)<br />
<br />
Your iPod can now be managed with Amarok or gtkpod.<br />
<br />
=== iPod Nano 5th generation ===<br />
<br />
Follow the instructions below in order to set up the FirewireID then go to following URL – http://ihash.marcansoft.com/ – and enter the serial number (the one used in the previous step) on the website. It will generate a file (named ''HashInfo'') which you will place under the iPod_Control/Device/ directory. Unplug the iPod device and plug it back.<br />
<br />
All credits go to https://wired-news.blogspot.it/2012/09/ipod-nano-5g-synchronization-issues-in.html<br />
<br />
{{Note|I tried to follow the above 3rd generation instructions but they were not enough. I don't know if this further step is needed also for the above mentioned iPod.}}<br />
<br />
=== iPod Shuffle 1st and 2nd generation ===<br />
<br />
Due to the simple structure of the Shuffle (compared to the "big" iPods), it is possible to use the player almost like any other USB flash MP3 player. What is necessary is [http://sourceforge.net/projects/shuffle-db/files/latest/download rebuild_db.py] file stored in the iPod's root directory. Simply copy MP3 files onto the iPod Shuffle (sub-folders are allowed too) and run:<br />
<br />
$ python2 /path/to/rebuild_db.py<br />
<br />
[http://shuffle-db.sourceforge.net/ Source]<br />
<br />
=== iPod Shuffle 4th generation ===<br />
In order to use this version of the iPod Shuffle under linux, you can use the python based command line tool {{AUR|ipod-shuffle-4g}}. It also provides advanced voiceover and (auto)playlist generation support.<br />
<br />
== iPod management apps ==<br />
*[http://wiki.gnome.org/Apps/Rhythmbox Rhythmbox]<br />
**GTK interface ([[GNOME]])<br />
**Is part of the official GNOME projects.<br />
**Fast, light interface.<br />
**Manage music on your computer and iPod<br />
**Download or stream podcasts and video podcasts<br />
**Queue up songs and podcasts<br />
**Last.fm integration<br />
**Live radio stations<br />
**Jamendo and Magnatune support<br />
**Audio CD burning<br />
**Album cover display<br />
**Song lyrics display<br />
**DAAP sharing<br />
<br />
*[http://banshee.fm Banshee]<br />
**GTK interface (GNOME)<br />
**Uses Mono so it is slower and more resource hogging than rhythmbox<br />
**Device Sync: Sync your music and videos to your Android, iPod, or other device - or import its media<br />
**Podcasts: Download or stream podcasts and video podcasts<br />
**Play Queue: Queue up songs, videos, and podcasts, or let the Auto DJ take over<br />
**Shuffle Modes: Shuffle (or Auto DJ) by artist, album, rating, or even songs' acoustic similarity<br />
**Album Art: Artwork is automatically fetched as you listen<br />
**Powerful Search, Smart Playlists: Find exactly what you want, fast<br />
**Video Support: All the power of Banshee, now for your videos<br />
<br />
*[http://www.yamipod.com Yamipod]<br />
**GTK interface (GNOME)<br />
**super lightweight application for managing ONLY music on your iPod (not on your computer)<br />
**easy ratings edit<br />
**PC to iPod synchronization<br />
**News RSS and podcasts to iPod upload<br />
**Last.fm support <br />
**playlist support<br />
<br />
*[http://www.gtkpod.org/libgpod/ GTKPod]<br />
**GTK interface (GNOME)<br />
**Read your existing iTunesDB (i.e. import the existing contents of your iPod including play counts, ratings and on-the-go playlists).<br />
**Add MP3, WAV, M4A (non-protected AAC), M4B (audio book), podcasts, and various video files (single files, directories or existing playlists) to the **iPod. You need a third party product to download podcasts, like 'bashpodder' or 'gpodder'<br />
**View, add and modify Cover Art<br />
**Browse the contents of your local hard disk by album/artist/genre by adding all your songs to the 'local' database. From there the tracks can be **dragged over to the iPod/Shuffle easily.<br />
**Create and modify playlists, including smart playlists.<br />
**You can choose the charset the ID3 tags are encoded in from within gtkpod. The default is the charset currently used by your locale setting.<br />
**Extract tag information (artist, album, title...) from the filename if you supply a template.<br />
**Detect duplicates when adding songs (optional).<br />
**Remove and export tracks from your iPod.<br />
**Modify ID3 tags -- changes are also updated in the original file (optional).<br />
**Refresh ID3 tags from file (if you have changed the tags in the original file).<br />
**Sync directories.<br />
**Normalize the volume of your tracks (uses mp3gain or the replay-gain tag)<br />
**Write the updated iTunesDB and added songs to your iPod.<br />
**Work offline and synchronize your new playlists / songs with the iPod at a later time.<br />
**Export your korganizer/kaddressbook/Thunderbird/evocalendar/evolution/webcalendar... data to the iPod (scripts for other programs can be added).<br />
<br />
*[http://www.floola.com Floola]<br />
**GTK interface (GNOME)<br />
<br />
*[http://amarok.kde.org/ Amarok]<br />
**KDE/qt interface<br />
<br />
*[http://qpod.sourceforge.net qPod]<br />
**KDE/qt interface<br />
**front-end for GNUpod<br />
<br />
*[http://www.gnu.org/software/gnupod/ GNUpod]<br />
**command-line only<br />
<br />
*[http://www.jakpod.de/ jakpod]<br />
** JakPod is based on Java and allows you to copy music and video files to your iPod.<br />
** iPod Nano 6th support<br />
** {{AUR|jakpod}}{{Broken package link|package not found}}<br />
<br />
== See also ==<br />
* [http://help.ubuntu.com/community/PortableDevices/iPhone More information about iPhone/iPod Touch support]<br />
* [http://wiki.gotux.net/code/perl/atget Apple trailers downloader script]</div>Maxtominhttps://wiki.archlinux.org/index.php?title=IOS&diff=568017IOS2019-03-06T09:21:56Z<p>Maxtomin: The iFuse Way - mounting as regular user (from the GitHub README)</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Mobile devices]]<br />
[[fr:iPod]]<br />
[[ja:iOS]]<br />
[[zh-hans:IPod]]<br />
{{Related articles start}}<br />
{{Related|Audiobook}}<br />
{{Related|iPhone tethering}}<br />
{{Related articles end}}<br />
{{Style|Numerous style issues, see [[Help:Style]]}}<br />
The purpose of this article is to demonstrate the use of an '''iPad''', '''iPod''' or '''iPhone''' with Arch Linux.<br />
<br />
== Connecting to a device ==<br />
Applications which use GVFS, such as some file managers (GNOME Files, Thunar) or media players (Rhythmbox) can interact with iOS devices after [[install]]ing the {{pkg|gvfs-afc}} package. Restarting the file manager or application might be needed. Also confirm that usbmuxd is running in the background if the device is still not being recognized by the file manager or application.<br />
<br />
==== Manual mounting ====<br />
<br />
[[Install]] the {{Pkg|ifuse}}, {{Pkg|libimobiledevice}} and {{AUR|ideviceinstaller-git}} packages.<br />
<br />
Make sure that you have the fuse module loaded by doing {{ic|modprobe fuse}}, assuming that you do not have it in {{ic|/etc/modules-load.d/}} already.<br />
<br />
{{Note|If your device has a screen password, unlock the device first}}<br />
<br />
Plug in the device and follow the following steps<br />
<br />
#usbmuxd -f -v<br />
idevice_id -l<br />
ideviceinfo<br />
ideviceinstaller -l<br />
<br />
The last command will provide the information regarding mounting with Fuse. For example to mount VLC installed on the device one can use the command:<br />
<br />
#ifuse --documents org.videolan.vlc-ios <mountpoint><br />
<br />
The mountpoint field is where you want to have it mounted.<br />
<br />
And you are done! You should be able to transfer files.<br />
<br />
To unmount:<br />
# umount <mountpoint><br />
<br />
{{Note|If an error is encountered during mounting, rebooting the device and repeating the steps can be helpful}}<br />
<br />
== Changing iPod mountpoint ==<br />
<br />
Traditional iPods are accessed just like a normal USB storage device containing a vfat file system (in rare cases {{ic|hfsplus}}), and can be [[USB storage devices|accessed as such]]. See the [[USB storage devices]] article for detailed instructions.<br />
<br />
{{Tip|If you cannot see the vfat file system, it is likely that your iPod is {{ic|hfsplus}} formatted. For convenience, as Arch kernel is built with no support for that filesystem, you might want to restore your iPod using iTunes on Windows. This will erase all data on your iPod, and format it as a vfat filesystem}}<br />
<br />
If udisks2 is running, it will mount an attached iPod to {{ic|/run/media/''$USER''/''iPod_name''}}.<br />
<br />
If the volume label of your iPod is long, or contains a mixture of spaces, and/or lower-case and capital letters, it may present an inconvenience. You may easily change the volume label for more expedient access using {{ic|dosfslabel}} from the {{pkg|dosfstools}} package:<br />
<br />
* Get and confirm the current volume label:<br />
# dosfslabel /dev/sd''XY''<br />
* Set the new volume label:<br />
# dosfslabel /dev/sd''XY'' ArchPod<br />
* Unmount the device:<br />
$ udisksctl unmount -b /dev/sd''XY''<br />
* Mount it again:<br />
$ udisksctl mount -b /dev/sd''XY''<br />
where {{ic|/dev/sdxx}} is the current device node of your iPod.<br />
<br />
== Importing videos and pictures ==<br />
<br />
Both videos and photos can be found in typically in {{ic|''&lt;mountpoint&gt;''/DCIM/100APPLE}}.<br />
<br />
=== HTML5 videos ===<br />
<br />
Typically you want to convert MOV files to a HTML5 video format like OGV using {{Pkg|ffmpeg2theora}}. Note that the creation date metadata is not in the converted video, so you need to use a script like:<br />
<br />
{{bc|<nowiki><br />
#!/usr/bin/sh<br />
<br />
find -name "*.MOV" | while read mov<br />
do<br />
d=$(gst-discoverer-1.0 -v $mov | awk '/datetime:/{print $2}' | tr -d \")<br />
base=${mov%.*}<br />
if test -f $base.ogv<br />
then<br />
touch -d${d} $base.ogv<br />
ls -l $base.ogv<br />
else<br />
echo $base.ogv missing<br />
fi<br />
done<br />
</nowiki>}}<br />
<br />
And use {{ic|cp -a}} or {{ic|rsync -t}} in order to preserve the file's date & time.<br />
<br />
=== Importing pictures and deleting them ===<br />
<br />
You can move photos and videos out of {{ic|''&lt;mountpoint&gt;''/DCIM/100APPLE}}, however you need to trigger a rebuild of the "Camera Roll" database by deleting the old databases.<br />
<br />
# rm Photos* com.apple.photos.caches_metadata.plist<br />
<br />
== Converting video for devices ==<br />
<br />
=== Handbrake ===<br />
<br />
[http://handbrake.fr/ Handbrake] is a nifty tool with presets for a variety of iPod versions. CLI and GTK versions are available with the {{pkg|handbrake-cli}} and {{pkg|handbrake}} packages respectively.<br />
<br />
If you do decide to take the CLI way, a good guide is available at http://trac.handbrake.fr/wiki/CLIGuide.<br />
<br />
=== Avidemux ===<br />
[[Install]] the {{Pkg|avidemux-qt}} package.<br />
<br />
This can convert to mp4 files. If you enforce a hard max of bit rate @ 700ish and keep the video size to 720x480 or 320x240 than it works fine for video file exporting.<br />
<br />
=== Mencoder ===<br />
<br />
[[Install]] the {{pkg|mplayer}} package.<br />
<br />
Has ''extremely'' comprehensive configuration support, which will be able to spit out iPod-compatible video files. Check out {{man|1|mencoder}}; a lot of MPlayer opts will also affect encoding.<br />
<br />
A basic guide is also available at [[MEncoder]].<br />
<br />
An example command to encode iPhone/iPod Touch-compatible video:<br />
<br />
mencoder INPUT -o output.mp4 \<br />
-vf scale=480:-10,harddup \<br />
-oac faac -faacopts mpeg=4:object=2:raw:br=128 \<br />
-of lavf -lavfopts format=mp4 \<br />
-ovc x264 -x264encopts nocabac:level_idc=30:bframes=0<br />
<br />
=== FFmpeg ===<br />
<br />
[[Install]] the {{pkg|ffmpeg}} package.<br />
<br />
Another encoder with comprehensive configuration support. Example command to encode for 5G iPod:<br />
<br />
$ ffmpeg -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 \<br />
-g 300 -acodec aac -ab 96 -i INPUT -s 320x240 \<br />
-aspect 4:3 output.mp4<br />
<br />
or iPod Touch/iPhone compatible video output:<br />
<br />
$ ffmpeg -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5\<br />
-bufsize 4096 -g 300 -acodec aac -ab 192 -s 480×320 -aspect 4:3 -i INPUT output.mp4<br />
<br />
== Device specific ==<br />
<br />
=== iPhone/iPod Touch ===<br />
<br />
By default, neither the iPhone nor the iPod Touch present mass storage capability over USB, though there is a solution for accessing your files.<br />
<br />
The proposed solution is to use a FUSE file system called {{Pkg|ifuse}}, which allows you to mount your device through USB, as you normally would. After installing ifuse, for instance, you should see your iPhone appear in the left navigation of Gnome Files and other supporting file managers.<br />
<br />
{{Tip|You can also use other [[#iPod management apps]] to transfer pictures and music.}}<br />
<br />
Refer to this page:[https://help.ubuntu.com/community/PortableDevices/iPhone]<br />
<br />
==== The iFuse Way ====<br />
{{Note|If your device has a screen password, one must unlock the device to gain access through the USB interface.}}<br />
<br />
[[Install]] the {{Pkg|ifuse}} package.<br />
<br />
Now make sure that you have the fuse module loaded by doing {{ic|modprobe fuse}}, assuming that you do not have it in {{ic|/etc/modules-load.d/}} already.<br />
<br />
You can now mount your device. Make sure it is unlocked before you plug it in, or it will not be recognized.<br />
# ifuse <mountpoint><br />
The mountpoint field is where you want to have it mounted.<br />
<br />
And you are done! You should be able to point your syncing software of choice to the mount point and be able to transfer files.<br />
<br />
To unmount your device:<br />
# umount <mountpoint><br />
<br />
Members of group {{ic|fuse}} can mount devices as regular user:<br />
$ ifuse <mountpoint><br />
<br />
To unmount:<br />
$ fusermount -u <mountpoint><br />
<br />
==== Generating HashInfo file ====<br />
If you have not previously synced your device using iTunes specifically, you will get error messages telling you that the HashInfo file is missing. This can be fixed by making an iTunes installation on MacOS or Windows create it (by plugging in the iPod there). Alternatively you can create this file yourself, instructions can be found on [http://ihash.marcansoft.com/ this website].<br />
<br />
==== Unobfuscating the Database ====<br />
<br />
Since firmware version 2.0, Apple has obfuscated the music database. If you are using recent firmware, the file {{ic|/System/Library/Lockdown/Checkpoint.xml}} can be modified to enable use of the older, non-obfuscated database. If that file doesn't exist then try to copy from {{ic| /System/Library/CoreServices/Checkpoint.xml}} to {{ic|/System/Library/Lockdown/Checkpoint.xml}} then replace:<br />
<key>DBVersion</key><br />
<integer>4</integer><br />
with:<br />
<key>DBVersion</key><br />
<integer>2</integer><br />
Then reboot your device.<br />
<br />
If syncing fails with "ERROR: Unsupported checksum type '0' in cbk file generation!", you may need to leave this at 4. libgpod seems to [http://gitorious.org/libgpod/libgpod/blobs/b9b83dc8b6c3d1f0c53ed32f05279ca838d54e02/src/itdb_sqlite.c#line2064 expect a hashed database.]<br />
<br />
=== iPod Classic/Nano (3rd generation) ===<br />
<br />
You need to set up the iPod to make libgpod able to find its Firewire ID. For this, you will need to get your FireWire ID manually<br />
<br />
1) Mount the iPod as a rw mount point. In the following example, I will use {{ic|/mnt/ipod}}.<br />
<br />
2 ) Find the serial number by typing<br />
<br />
# lsusb -v | grep -i Serial <br />
<br />
this should print a 16 character long string like 00A1234567891231 (it will have no colons or hyphens) <br />
<br />
3) Once you have that number, create or edit {{ic|/mnt/ipod/iPod_Control/Device/SysInfo}}. Add to that file the line below:<br />
<br />
FirewireGuid: 0xffffffffffffffff<br />
<br />
(replace ffffffffffffffff with the 16 digit string you obtained at the previous step and do not forget the leading 0x before the string)<br />
<br />
Your iPod can now be managed with Amarok or gtkpod.<br />
<br />
=== iPod Nano 5th generation ===<br />
<br />
Follow the instructions below in order to set up the FirewireID then go to following URL – http://ihash.marcansoft.com/ – and enter the serial number (the one used in the previous step) on the website. It will generate a file (named ''HashInfo'') which you will place under the iPod_Control/Device/ directory. Unplug the iPod device and plug it back.<br />
<br />
All credits go to https://wired-news.blogspot.it/2012/09/ipod-nano-5g-synchronization-issues-in.html<br />
<br />
{{Note|I tried to follow the above 3rd generation instructions but they were not enough. I don't know if this further step is needed also for the above mentioned iPod.}}<br />
<br />
=== iPod Shuffle 1st and 2nd generation ===<br />
<br />
Due to the simple structure of the Shuffle (compared to the "big" iPods), it is possible to use the player almost like any other USB flash MP3 player. What is necessary is [http://sourceforge.net/projects/shuffle-db/files/latest/download rebuild_db.py] file stored in the iPod's root directory. Simply copy MP3 files onto the iPod Shuffle (sub-folders are allowed too) and run:<br />
<br />
$ python2 /path/to/rebuild_db.py<br />
<br />
[http://shuffle-db.sourceforge.net/ Source]<br />
<br />
=== iPod Shuffle 4th generation ===<br />
In order to use this version of the iPod Shuffle under linux, you can use the python based command line tool {{AUR|ipod-shuffle-4g}}. It also provides advanced voiceover and (auto)playlist generation support.<br />
<br />
== iPod management apps ==<br />
*[http://wiki.gnome.org/Apps/Rhythmbox Rhythmbox]<br />
**GTK interface ([[GNOME]])<br />
**Is part of the official GNOME projects.<br />
**Fast, light interface.<br />
**Manage music on your computer and iPod<br />
**Download or stream podcasts and video podcasts<br />
**Queue up songs and podcasts<br />
**Last.fm integration<br />
**Live radio stations<br />
**Jamendo and Magnatune support<br />
**Audio CD burning<br />
**Album cover display<br />
**Song lyrics display<br />
**DAAP sharing<br />
<br />
*[http://banshee.fm Banshee]<br />
**GTK interface (GNOME)<br />
**Uses Mono so it is slower and more resource hogging than rhythmbox<br />
**Device Sync: Sync your music and videos to your Android, iPod, or other device - or import its media<br />
**Podcasts: Download or stream podcasts and video podcasts<br />
**Play Queue: Queue up songs, videos, and podcasts, or let the Auto DJ take over<br />
**Shuffle Modes: Shuffle (or Auto DJ) by artist, album, rating, or even songs' acoustic similarity<br />
**Album Art: Artwork is automatically fetched as you listen<br />
**Powerful Search, Smart Playlists: Find exactly what you want, fast<br />
**Video Support: All the power of Banshee, now for your videos<br />
<br />
*[http://www.yamipod.com Yamipod]<br />
**GTK interface (GNOME)<br />
**super lightweight application for managing ONLY music on your iPod (not on your computer)<br />
**easy ratings edit<br />
**PC to iPod synchronization<br />
**News RSS and podcasts to iPod upload<br />
**Last.fm support <br />
**playlist support<br />
<br />
*[http://www.gtkpod.org/libgpod/ GTKPod]<br />
**GTK interface (GNOME)<br />
**Read your existing iTunesDB (i.e. import the existing contents of your iPod including play counts, ratings and on-the-go playlists).<br />
**Add MP3, WAV, M4A (non-protected AAC), M4B (audio book), podcasts, and various video files (single files, directories or existing playlists) to the **iPod. You need a third party product to download podcasts, like 'bashpodder' or 'gpodder'<br />
**View, add and modify Cover Art<br />
**Browse the contents of your local hard disk by album/artist/genre by adding all your songs to the 'local' database. From there the tracks can be **dragged over to the iPod/Shuffle easily.<br />
**Create and modify playlists, including smart playlists.<br />
**You can choose the charset the ID3 tags are encoded in from within gtkpod. The default is the charset currently used by your locale setting.<br />
**Extract tag information (artist, album, title...) from the filename if you supply a template.<br />
**Detect duplicates when adding songs (optional).<br />
**Remove and export tracks from your iPod.<br />
**Modify ID3 tags -- changes are also updated in the original file (optional).<br />
**Refresh ID3 tags from file (if you have changed the tags in the original file).<br />
**Sync directories.<br />
**Normalize the volume of your tracks (uses mp3gain or the replay-gain tag)<br />
**Write the updated iTunesDB and added songs to your iPod.<br />
**Work offline and synchronize your new playlists / songs with the iPod at a later time.<br />
**Export your korganizer/kaddressbook/Thunderbird/evocalendar/evolution/webcalendar... data to the iPod (scripts for other programs can be added).<br />
<br />
*[http://www.floola.com Floola]<br />
**GTK interface (GNOME)<br />
<br />
*[http://amarok.kde.org/ Amarok]<br />
**KDE/qt interface<br />
<br />
*[http://qpod.sourceforge.net qPod]<br />
**KDE/qt interface<br />
**front-end for GNUpod<br />
<br />
*[http://www.gnu.org/software/gnupod/ GNUpod]<br />
**command-line only<br />
<br />
*[http://www.jakpod.de/ jakpod]<br />
** JakPod is based on Java and allows you to copy music and video files to your iPod.<br />
** iPod Nano 6th support<br />
** {{AUR|jakpod}}{{Broken package link|package not found}}<br />
<br />
== See also ==<br />
* [http://help.ubuntu.com/community/PortableDevices/iPhone More information about iPhone/iPod Touch support]<br />
* [http://wiki.gotux.net/code/perl/atget Apple trailers downloader script]</div>Maxtomin