sane-dll(5)
๐ sane-dll โ the SANE dynamic backend loader (yes bestie, the loader loader) ๐
okay so this page is brought to you by the sane-dll(5) girlies, part of SANE โ Scanner Access Now Easy. strap in, this one's actually iconic.
โจ NAME โจ
sane-dll โ the SANE dynamic backend loader. it loads backends. that's it. that's the whole vibe. ๐ฆ
๐ธ DESCRIPTION ๐ธ
the sane-dll library implements a SANE (Scanner Access Now Easy) backend whose whole personality is giving other backends access. like, it's the friend who introduces you to all their other friends. it can give you access to an arbitrary number of other SANE backends, and those backends can show up in one of two ways:
- they're pre-loaded at the time the
sane-dlllibrary gets built ๐ - or, on systems that support dynamic loading of shared libraries, they get loaded at runtime โญ
in that second case? adding support for a brand-new backend is literally just: install the relevant library in /usr/lib64/sane and add an entry to the dll.conf configuration file. that's it. no cap. in other words โ no applications need to be modified or recompiled to add support for new devices. not a single one. she did that. ๐
๐ DEVICE NAMES ๐
this backend expects device names shaped like this:
backend:device
where backend is the name of the backend and device is the name of the device in that backend that should be addressed. iykyk.
now, plot twist ๐ โ if the device name does not contain a colon (:), then the entire string gets treated as the device string for the default backend. and what's the default backend, you ask? it's the backend listed last in the configuration file (sneak peek below ๐) or the first pre-loaded backend (if there are any).
๐ CONFIGURATION ๐
the contents of the dll.conf file is a list of backend names that may be loaded dynamically upon demand. so demanding of them. main character energy fr.
- empty lines? ignored ๐
- everything after a hash mark (
#)? also ignored โจ
a sample configuration file is shown below, feast your eyes:
net
# this is a comment
pnm
mustek
it's also possible to add a file in /etc/sane.d/dll.d that contains the list of backends to be added. backends mentioned in a file included in this directory will be added before any backends listed in dll.conf. files in /etc/sane.d/dll.d can be freely named ๐ซถ โ they shall follow the format conventions as apply for dll.conf.
๐ก note that backends that were pre-loaded when building this library do not have to be listed in this configuration file. like, if a backend was preloaded, then that backend will always be present, regardless of whether it's listed in the configuration file or not. she doesn't need the invite, she's already in the group chat.
the list of preloaded backends is determined by macro PRELOADABLE_BACKENDS in file backend/Makefile.in of the SANE source code distribution. after changing the value of this macro, it is necessary to reconfigure, rebuild, and reinstall SANE for the change to take effect. all three. no skipping steps bestie ๐ญ
๐ฆ Aliases, aka the glow-up for ugly device names ๐ฆ
aliases are defined in the config file dll.aliases. it can contain entries of the form:
alias SomeName SaneDeviceName
alias "Some Name" SaneDeviceName
hide SaneDeviceName
for example:
alias Epson net:somehost:epson:/dev/sgX
alias "Siemens ST400" st400:/dev/sgY
hide net:somehost:pnm:0
hide net:somehost:pnm:1
alias "Read from file" pnm:0
hide pnm:1
aliased device names are automatically hidden. periodt.
the idea is that users don't have to deal with complicated device names (especially for networked devices โ those names are a lot ๐), and to hide other exported devices which might confuse them. and note: a hidden device can still be accessed if the device name is known โ it just doesn't appear on the list. she's private, not gone. ๐
โญ FILES โญ
/etc/sane.d/dll.aliasesโ the list of aliased or hidden backends./etc/sane.d/dll.confโ the backend configuration file (see also the description ofSANE_CONFIG_DIRbelow ๐)./usr/lib64/sane/libsane-dll.aโ the static library implementing this backend./usr/lib64/sane/libsane-dll.soโ the shared library implementing this backend (present on systems that support dynamic loading).
๐ ENVIRONMENT ๐
SANE_CONFIG_DIRโ this environment variable specifies the list of directories that may contain the configuration file. on *NIX systems, the directories are separated by a colon (:), under OS/2, they are separated by a semi-colon (;). if this variable is not set, the configuration file is searched in two default directories: first, the current working directory (".") and then in/etc/sane.d. if the value of the environment variable ends with the directory separator character, then the default directories are searched after the explicitly specified directories. for example, settingSANE_CONFIG_DIRto"/tmp/config:"would result in directoriestmp/config,., and/etc/sane.dbeing searched (in this order). order matters bestie ๐ซถSANE_DEBUG_DLLโ if the library was compiled with debug support enabled, this environment variable controls the debug level for this backend. e.g., a value of128requests all debug output to be printed. smaller levels reduce verbosity. here's the chart, no table but we make it cute:0โ print severe errors only1โ print normal errors and important messages2โ print normal messages3โ print debugging messages4โ print everything
example:
export SANE_DEBUG_DLL=3
๐ SEE ALSO ๐
sane(7), scanimage(1), sane-"backendname"(5)
๐ AUTHOR ๐
David Mosberger โ the icon, the legend, the blueprint ๐
okay that's the whole page, you're officially a sane-dll expert now ๐ง this little masterpiece is from 13 Jul 2008, so yeah she's vintage but she's still serving ๐โจ go forth and load those backends bestie, mwah ๐๐
๐ฆ where this page comes from
- centos-stream 10: sane-backends 1.2.1-10.el10 ยท GPL-2.0-or-later WITH SANE-exception AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND IJG AND MIT
- fedora 43: sane-backends 1.4.0-4.fc43 ยท GPL-2.0-or-later WITH SANE-exception AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND IJG AND MIT
- fedora 44: sane-backends 1.4.0-6.fc44 ยท GPL-2.0-or-later WITH SANE-exception AND GPL-2.0-or-later AND GPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND IJG AND MIT
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 ยท GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 ยท GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 ยท GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- opensuse-leap 16.0: sane-backends 1.3.0-bp160.1.14 ยท GPL-2.0-or-later AND SUSE-GPL-2.0+-with-sane-exception AND SUSE-Public-Domain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms