In order to scan from a network scanner, I have to run xsane with a URL to hpaio address of the MFU that I use. Can this address be somehow permanently saved, to not to have to remember to use the script?
Are you using the gui or cli.?
On mine, using the gui, xsane opens up with a simple radio button selection for which scanner to use, no script required.
# List scanners
sane-find-scanner
# Specify device name
SANE_DEV="epson:/dev/scanner0"
# Modify launcher
desktop-file-install \
--dir="${HOME}/.local/share/applications" \
--set-key="Exec" --set-value="xsane ${SANE_DEV}" \
/usr/share/applications/xsane.desktop
GUI. On mine, xsane opens up a small window which says “scanning for devicse” and then it changes into “no devices available”. But if I pass the URL on the command line, it works fine, and I can even save the device configuration which is not loaded on the next invocation of xsane.
I know how to create a shortcut. This is the same thing as using a shell script.
I was wondering whether this can be somehow permanently saved in xsane’s configuration instead.
Looks like not:
It appears to me that sane-find-scanner only looks for physically attached devices and does not do a network check.
I would guess from what I have been able to determine that you will have to make a choice between using the gui (which does see the network scanners) and a script which can be run from the cli which can pass the URI to sane.
When looking at the man page for xsane I found references to config files for sane (sane-dll, sane-net and saned) where it appears it might be possible to configure a scanner, and looking in the home directory I find the existing configs under ~/.sane.
@hsljo I would suggest you do a bit more research using the man pages and other tools already on the system and see if your wants can be met. Since most of us do not use sane directly, but rather xsane as gui and that does see network scanners then maybe your wants can be met. However, it seems to me very simple to create a script that can be used to access the network scanner from the cli.
xsane giu needs a command-line parameter for the URL of the scanner.
I do not use sane directly.
I wonder what you are doing and if you are logged in as a regular user that causes xsane to act differently for you.
The first time I start xsane as my user it searches for all available scanners (local, network, etc) and stores the config files for them under ~/.sane/xsane. After that it uses those config files to provide the choices on the startup screen.
I have never had to populate the URI for xsane to find a scanner on my LAN, although I can see where it might be possible if that device is attached to a remote PC/workstation.
I too wonder that. It says it found no scanners every time.
Are you suggesting to run xsane under sudo? As root? It protests.
Out of curiosity.
@hsljo which Fedora release are you running?
@computersavvy which Fedora release are you running?
NO
@alciregi I am on F32, fully updated.
There is one other thing that comes to mind as a possibility.
My scanner is an HP LaserJet AIO printer and I have the drivers for the scanner installed so the system knows how to find the scanner. Without the proprietary driver installed the PC cannot see the scanner.
Have you installed the scanner drivers on your PC so it can properly communicate with the network scanner? That could be the problem with why the PC cannot find the scanner.
hplip
is installed, and both CUPS
and sane
know it.
Is the proprietary plugin for hplip installed? That plugin is the only thing that allows use of the HP scanner. All other printer functions work without it. If you are up to date from the fedora repo (F32) the version of hplip installed should be 3.20.6. I have both hplip and hplip-gui installed so I can use the HP printer management interface.
If you are not certain, the plugin can be found here. You should download the version that matches your hplip then manually install it. Even if you think it is already there, a reinstall certainly won’t hurt.
I am not interested in upgrading to F32, and there is no plugin for hplip 3.14 that I have.
You certainly are not required to upgrade to F32, nor are you required to update the hplip version you are running.
With that said, and the old version of hplip you are using, it seems counterproductive to stick with things that are not able to do what you want when newer releases of both would likely solve the problems you see.
Good luck with that obsolete software.
BTW, the only place you can get the plugin for hplip that supports scanners is from HP. Maybe you should contact them directly for assistance in finding the needed drivers.
It seems you need avahi running to scan for printers using scanimage -L or xsane. It would be good to be able to put known printers into a config file, but I don’t know of a way to do that. The discovery seems to use mdns and snmp, so you might need to configure firewalls to allow those.
You don’t need the plugins to discover scanners, but you probably do to actually do a scan. I got an uninformative I/O error message until I installed the plugins.