Scanners: Difference between revisions
imported>Symphorien →Epson: mention utsushi |
imported>Tobias.bora Add Airscan/WSD driverless scanning |
||
Line 6: | Line 6: | ||
... | ... | ||
hardware.sane.enable = true; | hardware.sane.enable = true; | ||
... | |||
} | |||
</syntaxhighlight> | |||
It is also very likely that users will required to be in the following groups <tt>scanner</tt> and <tt>lp</tt>, so you can for example configure it as follow on NixOs (don't forget to login/logout after rebuilding NixOs): | |||
<syntaxhighlight lang="nix"> | |||
{ | |||
... | |||
users.users.YOURUSERNAME.extraGroups = [ "scanner" "lp" ]; | |||
... | ... | ||
} | } | ||
Line 20: | Line 30: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
If you can only see scanners when running as root, try adding the user to the <tt>scanner</tt> or <tt>lp</tt> | If you can only see scanners when running as root, try adding the user to the <tt>scanner</tt> or <tt>lp</tt> either using the configuration given above, or using the following code (beware, don't forget to logout/login after running this command): | ||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
$ sudo usermod -a -G scanner,lp username | $ sudo usermod -a -G scanner,lp username | ||
Line 26: | Line 36: | ||
==Supported backends== | ==Supported backends== | ||
See the [http://www.sane-project.org/sane-supported-devices.html Supported Devices] page to see if your scanner is supported. Some backends are proprietary and are not installed by default; see below. | See the [http://www.sane-project.org/sane-supported-devices.html Supported Devices] page to see if your scanner is supported. Some backends are proprietary and are not installed by default; see below. You may also be interested by "driverless" scanning (see below) if your scanner support the Apple AirScan and/or the Microsoft WSD, Apple maintains a list of compatible devices [https://support.apple.com/en-us/HT201311 here]. | ||
===Driverless Apple AirScan and Microsoft WSD=== | |||
A large number of printers now support "driverless" scanning. A explained [https://github.com/alexpevzner/sane-airscan on the sane-airscan backend project]: | |||
<blockquote> | |||
Driverless scanning comes in two flavors: | |||
* Apple AirScan or AirPrint scanning (official protocol name is eSCL) | |||
* Microsoft WSD, or WS-Scan (term WSD means "Web Services for Devices) | |||
This backend implements both protocols, choosing automatically between them. It was successfully tested with many devices from '''Brother, Canon, Dell, Kyocera, Lexmark, Epson, HP, Panasonic, Ricoh, Samsung and Xerox''' both in WSD and eSCL modes. | |||
For eSCL devices, Apple maintains a [https://support.apple.com/en-us/HT201311 '''comprehensive list of compatible devices'''], but please note, this list contains not only scanners and MFP, but pure printers as well. | |||
</blockquote> | |||
To enable Apple AirScan/Microsoft WSD "driverless" scanning: use the <tt>sane-airscan</tt> drivers: | |||
<syntaxhighlight lang="nix"> | |||
hardware.sane.extraBackends = [ pkgs.sane-airscan ]; | |||
</syntaxhighlight> | |||
===HP=== | ===HP=== | ||
Line 106: | Line 137: | ||
==Network scanning== | ==Network scanning== | ||
If NixOs cannot find a scanner located on your network, you may be interested in adding in your <tt>configuration.nix</tt>: | |||
<syntaxhighlight lang="nix">{ | |||
... | |||
services.avahi.enable = true; | |||
services.avahi.nssmdns = true; | |||
... | |||
}</syntaxhighlight> | |||
Currently (2017-08-16) the SANE backend does not support overriding according to {{issue|17411|nixpkgs issue #17411}}. The workaround for this is to download [https://raw.githubusercontent.com/michalrus/dotfiles/d943be3089aa436e07cea5f22d829402936a9229/.nixos-config.symlink/modules/sane-extra-config.nix michaelrus's sane-extra-config.nix], copy it to <code>/etc/nixos/sane-extra-config.nix</code> and import it in <code>/etc/nixos/configuration.nix</code> as follows: | Currently (2017-08-16) the SANE backend does not support overriding according to {{issue|17411|nixpkgs issue #17411}}. The workaround for this is to download [https://raw.githubusercontent.com/michalrus/dotfiles/d943be3089aa436e07cea5f22d829402936a9229/.nixos-config.symlink/modules/sane-extra-config.nix michaelrus's sane-extra-config.nix], copy it to <code>/etc/nixos/sane-extra-config.nix</code> and import it in <code>/etc/nixos/configuration.nix</code> as follows: | ||
Line 122: | Line 162: | ||
... | ... | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
==Network scanning== | |||
==See also== | ==See also== |