# Re: same old "no device" problem

From: Henning Meier-Geinitz (henning@meier-geinitz.de)
Date: Mon Apr 30 2001 - 10:14:16 PDT

- Next message: Henning Meier-Geinitz: "Re: : trust imagery 1200 wont work with xscanimage "no sane device""
  - Previous message: Henning Meier-Geinitz: "Re: No SANE Devices Found"
  - In reply to: mKlein: "same old "no device" problem"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Hi,

  On Sun, Apr 29, 2001 at 11:58:49PM -0500, mKlein wrote:
  > The last hurdle lies with this problem that a lot of people seem to
  > have.

  You are talking about the "no device" problem? If scanimage prints the
  "No scanners were identified..." message that just means that. There
  are lots of reasons for the message (scanner not supported, driver not
  load, permission problems, configuration problems etc.).

  > After installing the backend, frontend and xsane, then configuring
  > snapscan.conf and dll.conf to utilize my scanner, I am unable to run
  > xscanimage or xsane from anything but /usr/local/etc/sane.d. Usually
  > I get a "No Devices Available" error from everywhere but that
  > directory.

  That probably means that your config files aren't found. As the
  directory "/usr/local/etc/sane.d" is the default directory I really
  don't know why this happens. Try to use a freshly installed
  sane-backends-1.0.4.tar.gz from www.mostang.com and don't set
  SANE_CONFIG_DIR. That's what's in the sanei/sanei_config.c file:

  /* Search configuration file FILENAME along directory list DIR_LIST
  and return file pointer if such a file exists. FILENAME should be
  a filename with extension (such as "mustek.conf").
  1st: SANE_CONFIG_DIR environment variable.
  2nd: PATH_SANE_CONFIG_DIR set during configuration.
  3rd: Current directory.
  Output: File pointer, or NULL if not found. */

  You can have a look at the code of this file to see if I am right.

  > However, I can dump the executables in /sane.d and symlink them to
  > /usr/local/bin and it runs just fine anywhere from the command line.
  > This is simply a work-around and doesn't help with trying to get them to
  > run as plug-ins in GIMP 1.2. There seems to be nothing I can do to get
  > that part working.

  sanei_config_open() can't find the files in PATH_SANE_CONFIG_DIR
  (which is /usr/local/etc/sane.d if configure wasn't given any
  arguments) so it uses the current directory. That's why it works if
  the executable is placed in sane.d/.

  > A friend mentioned I would have to make sure sane.d was in my
  > path. As a intermediate newbie I can say I know what he is talking
  > about but not how to do that.

  He is right if he says that you can put scanimage to
  /usr/local/etc/sane.d/ and run it just with its name by adding the
  name of the directory to the $PATH environment variable. But that's
  not the right solution.

  To check where sanei_config_open() really looks for the config files
  you can use the following command:

  SANE_DEBUG_SANEI_CONFIG=255 SANE_DEBUG_SNAPSCAN=255 scanimage -L

  Probably that's "/etc/sane.d", maybe something left from a distribution or
  pre vious tries with your sane installation.

  > /dev/sg1

  As a workaround, adding a symlink /dev/scanner to /dev/sg1 will work if I
  understood the snapscan backend correctly.

  Bye,
  Henning

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Henning Meier-Geinitz: "Re: : trust imagery 1200 wont work with xscanimage "no sane device""
  - Previous message: Henning Meier-Geinitz: "Re: No SANE Devices Found"
  - In reply to: mKlein: "same old "no device" problem"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Mon Apr 30 2001 - 10:17:39 PDT