xscanimage(1)

πŸ“¦
version 1.0.14 Β· 2 versions
  • 1.0.14 Β· debian bookworm, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.14 Β· nixos 26.05
, in debian bookworm, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– xscanimage(1) β€” the manual, but make it cute πŸ’–

okay bestie, gather round, because we're talking about xscanimage β€” it scans an image, that's the whole vibe, and it's genuinely iconic for it. This page lives in the General Commands Manual section (that's the (1), iykyk) πŸŽ€


✨ NAME ✨

xscanimage β€” scan an image πŸ¦‹


🌸 SYNOPSIS 🌸

xscanimage [--version|-V] [--help|-h] [--display d] [--no-xshm] [--sync]
[devicename]

πŸ‘‘ DESCRIPTION πŸ‘‘

so xscanimage is literally a whole graphical user-interface that lets you control an image acquisition device β€” think a flatbed scanner, or a camera, whatever you've got plugged in. It lets you preview images and scan individual images, and you can either run it straight from the command-line or invoke it through The GIMP image manipulation program. Two moods, both slay.

If you go the command-line route, xscanimage acts as a stand-alone program and saves whatever it acquires in a suitable PNM format:

  • PBM for black-and-white images
  • PGM for grayscale images
  • PPM for color images

If you go the GIMP route instead, the images get passed directly to The GIMP for further processing. no middleman, no fuss πŸ’…

xscanimage accesses image acquisition devices through the SANE (Scanner Access Now Easy) interface. Heads up though β€” the list of available devices depends entirely on your installed hardware and configuration, so it's giving very "results may vary" energy.

When you invoke it without an explicit devicename argument, xscanimage presents a dialog listing of all known and available devices. If the environment variable SANE_DEFAULT_DEVICE is set to the devicename, that device gets preselected in the dialog. Cute, right?

But if you want to access an available device that is not known to the system, you have to specify the devicename explicitly. The format of devicename is:

backendname:devicefile

e.g. umax:/dev/sga. periodt πŸ’–


🧚 RUNNING UNDER THE GIMP 🧚

okay so to run xscanimage under gimp(1), you literally just copy it to one of the gimp(1) plug-ins directories. And if you're trying to conserve disk-space β€” very mindful, very demure β€” you can create a symlink instead. 🫢

For example, for gimp-1.0.x the command is:

ln -s @BINDIR@/xscanimage ~/.gimp/plug-ins/

and for gimp-1.2.x the command is:

ln -s @BINDIR@/xscanimage ~/.gimp/plug-ins/

wait, bestie, hold on β€” the gimp-1.2.x one is actually:

ln -s @BINDIR@/xscanimage ~/.gimp-1.2/plug-ins/

✨ that adds a symlink for the xscanimage binary to the user's plug-ins directory. After creating this symlink, xscanimage will be queried by gimp(1) the next time it's invoked. And from then on, xscanimage can be invoked through the "File->Acquire->Xscanimage->Device dialog..." menu entry. main character menu entry fr fr πŸ‘‘

You'll also find that the "File->Acquire->Xscanimage" menu contains short-cuts to the SANE devices that were available at the time xscanimage was queried. For example, the first PNM pseudo-device is typically available as the short-cut "File->Acquire->Xscanimage->pnm:0". iconic.

⚠️ Note: gimp(1) caches these short-cuts in ~/.gimp/pluginrc. So when the list of available devices changes (e.g., a new scanner is installed), it is typically desirable to rebuild this cache.

To do that, you've got two options:

  1. touch(1) the xscanimage binary, e.g. touch @BINDIR@/xscanimage
  2. delete the plug-ins cache, e.g. rm ~/.gimp/plug-ins

Either way, invoking gimp(1) afterwards will cause the pluginrc to be rebuilt. πŸ’…


πŸ’… OPTIONS πŸ’…

  • --version, -V β€” if this is given, xscanimage will output its version number. that's it, that's the whole job.
  • --help, -h β€” prints a short summary of options. a lil snack of information πŸ“
  • --display β€” selects the X11 display used to present the graphical user-interface (see X(1) for details).
  • --no-xshm β€” requests not to use shared memory images. Shared memory images usually enhance performance but cause problems with some buggy X11 servers. Unless your X11 server literally dies when running this program, there is no need or advantage to specify this flag. so like… only use it if things are dire bestie 😭
  • --sync β€” requests a synchronous connection with the X11 server. > This is for debugging purposes only. no cap.

🌈 ENVIRONMENT 🌈

  • SANE_DEFAULT_DEVICE β€” the default device-name.

Example:

SANE_DEFAULT_DEVICE="hp:/dev/scanner"
  • SANE_DEBUG_XSCANIMAGE β€” this environment variable controls the debug level of xscanimage. Higher debug levels increase the verbosity of the output. (yes, the original page spells it "Descsription" and honestly? we respect the typo, it stays πŸ’€)
    • 0 β€” print fatal errors
    • 1 β€” print errors
    • 2 β€” print warnings
    • 3 β€” print information messages
    • 4 β€” print everything

Example:

SANE_DEBUG_XSCANIMAGE=3

πŸŽ€ FILES πŸŽ€

  • $HOME/.sane/xscanimage/xscanimage.rc β€” this file holds the user preferences. Normally, this file should not be manipulated directly. Instead, the user should customize the program through the "Preferences" dialog. hands off the rc file bestie πŸ™ˆ
  • $HOME/.sane/xscanimage/devicename.rc β€” for each device, there is one rc-file that holds the saved settings for that particular device. Normally, this file should not be manipulated directly either. Instead, the user should use the xscanimage interface to select appropriate values and then save the device settings using the "Preferences->Save Device Settings" menubar entry.
  • $HOME/.sane/preview-devicename.ppm β€” after acquiring a preview, xscanimage normally saves the preview image in this device-specific file. Thus, next time the program is started up, the program can present the old preview image. This feature can be turned off through the "Preferences->Preview Options..." dialog.
  • @DATADIR@/sane-style.rc β€” this system-wide file controls the aspects of the user-interface such as colors and fonts. It is a GTK style file and provides fine control over the visual aspects of the user-interface. ✨ aesthetic ✨
  • $HOME/.sane/sane-style.rc β€” this file serves the same purpose as the system-wide style file. If present, it takes precedence over the system wide style file. she's the understudy who goes on and steals the show πŸ’œ

πŸ‘€ SEE ALSO πŸ‘€

sane(7), gimp(1), xcam(1), scanimage(1), scanadf(1), sane-scsi(5), sane-dll(5), sane-net(5), sane-"backendname"(5)


πŸ’– AUTHOR πŸ’–

Tristan Tarrant, Andreas Beck, David Mosberger, and Henning Meier-Geinitz


and that's the whole page bestie!! this manual is from 1 Feb 2003 and it belongs to the xscanimage(1) era of things β€” a true vintage queen πŸ•°οΈπŸ’… go forth and scan something gorgeous, you've got this πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from