Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues


From Void Linux Wiki
Jump to navigation Jump to search

SANE (Scanner Access Now Easy) is a library and command-line tool to use scanners in GNU/Linux.


# xbps-install -S sane

Additional Steps

If you have an Epson Scanner you might need the additional Epson backend for sane:

# xbps-install -S sane-epkowa

If you are using a HP All-In-One Printer and Scanner, you first need to install the HPLIP driver:

# xbps-install -S hplip

Afterwards enable the hpaio backend for SANE by editing /etc/sane.d/dll.conf and uncommenting hpaio.


Once you've made sure to enable the relevant drivers for your device check if your device is recognized by using the scanimage utility that comes with SANE:

$ scanimage -L

This should give you one or multiple devices including your scanner:

$ scanimage -L
device `hpaio:/usb/DeskJet_3630_series' is a Hewlett-Packard DeskJet_3630_series all-in-one
device `v4l:/dev/video0' is a Noname Integrated Camera

If it doesn't show your printer, try again with root privileges.

Note that for using the scanner, your user needs to be in the lp and scanner groups so that he can access the devices. Check if the current user is part of these groups:

$ groups

If you are not part of these groups but have sudo privilege you can add those groups to the user by the following commands:

$ sudo gpasswd -a user group

Command Line Usage

You can use the scanimage utility to scan to a file easily with the following command:

$ scanimage --format=png > test.png

This will produce a png file of your scan in your current directory. For additional formats and settings check the scanimage(1) manual.


Some SANE frontends are available in the repo:

  • simple-scan is a simple GTK3 frontend that integrates well with GNOME and is easy to use. | simple-scan
  • xsane is an advanced GTK frontend. It is very extensive in its features but not very intuitive in usage. | xsane
  • gscan2pdf is a GTK frontend for producing PDFs and a variety of image files from scaned documents. | gscan2pdf