How to Install SANE Network Scanning on OpenBSD

SANE stands for the "Scanner Access Now Easy." It is an open-source scanning application that provides an API to scanners for different operating systems. It allows you to share a scanner on the network, which means you can scan documents without physically being next to the scanner.

In this tutorial, we will guide you through the steps to install SANE Network Scanning on OpenBSD.

Prerequisites

Before we proceed with the installation process, ensure that you meet the following prerequisites:

Step 1 - Install Dependencies

The first step is to install the dependencies required for the installation of SANE. Open a terminal and execute the below command:

sudo pkg_add sane-backends

Step 2 - Configure SANE

The next step is to configure SANE on your OpenBSD system. Open the /etc/sane.d/saned.conf file with a text editor.

sudo vi /etc/sane.d/saned.conf

Uncomment the following line in the file:

# data_portrange = 10000 - 10100

Replace it with the following line:

data_portrange = 10000 - 10100

Save and close the file.

Step 3 - Configure SANE for Network Scanning

The next step is to enable SANE for network scanning. Open the /etc/inetd.conf file with a text editor.

sudo vi /etc/inetd.conf

Find the following line in the file:

# sane-stream   stream  tcp     nowait  saned:saned /usr/local/bin/saned saned

Uncomment the line and save the file.

Step 4 - Restart Services

Now, you need to restart the ineted and sane services. Execute the below commands to restart the services:

sudo /etc/rc.d/inetd restart
sudo /etc/rc.d/saned restart

Step 5 - Test Network Scanning

Finally, test if SANE is successfully installed and configured for network scanning. Open a terminal on a computer connected to the same network as your scanner and execute the following command:

scanimage -L

If the scanner is detected, you will get an output similar to the following:

device `net:192.168.1.2:epkowa:USB:05d8:4020' is a Epson FF-4096 flatbed scanner

Conclusion

In this tutorial, we have successfully installed and configured the SANE Network Scanning on OpenBSD. You can now scan documents from any device that is connected to your network.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!