XSane - just a grey box.

Whenever I try to open Xsane I just get a grey box with my printer name at the top. I’m not able to close this box by clicking on the X or minimise. I have to shut down my laptop to get rid of it because I can’t see anything, it sits on top of any open pages etc.

What happens if you run:

sane-find-scanner

and

scanimage -F

and

sudo sane-find-scanner

and

sudo scanimage -F

and are any errors reported if you attempt to run xsane from the command line

xsane

Which distro is this, and what version?

I’m running Mint 13 Maya.

sane-find-scanner will now attempt to detect your scanner. If the

result is different from what you expected, first make sure your

scanner is powered up and properly connected to your computer.

No SCSI scanners found. If you expected something different, make sure that

you have loaded a kernel SCSI driver for your SCSI adapter.

No USB scanners found. If you expected something different, make sure that

you have loaded a kernel driver for your USB host controller and have setup

the USB system correctly. See man sane-usb for details.

Not checking for parallel port scanners.

Most Scanners connected to the parallel port or other proprietary ports

can’t be detected by this program.

You may want to run this program as root to find all devices. Once you

found the scanner devices, be sure to adjust access permissions as

necessary.

tanya@VGN-NS30E-S ~ $ scanimage -F
scanimage: invalid option – ‘F’
tanya@VGN-NS30E-S ~ $
tanya@VGN-NS30E-S ~ $ sudo sane-find-scanner
[sudo] password for tanya:
Sorry, try again.
[sudo] password for tanya:

sane-find-scanner will now attempt to detect your scanner. If the

result is different from what you expected, first make sure your

scanner is powered up and properly connected to your computer.

No SCSI scanners found. If you expected something different, make sure that

you have loaded a kernel SCSI driver for your SCSI adapter.

No USB scanners found. If you expected something different, make sure that

you have loaded a kernel driver for your USB host controller and have setup

the USB system correctly. See man sane-usb for details.

Not checking for parallel port scanners.

Most Scanners connected to the parallel port or other proprietary ports

can’t be detected by this program.

tanya@VGN-NS30E-S ~ $ sudo scanimage -F
scanimage: invalid option – ‘F’
tanya@VGN-NS30E-S ~ $

I still get the grey box if I try to open Xsane in command line. No errors appear.

Was the printer/scanner switched on ?

swap out the -F for -f in those 2 commands that failed

scanimage -f

and

sudo scanimage -f

What is the make/model of scanner ? … have you installed any drivers ? … and how is it connected ?

Yes the printer was on. :slight_smile:
It’s about 10 years old, HP PSC 750. I’ve never manually installed drivers on my laptop, I just plugged it in the usb socket and away it went. I have tried it in all of the usb sockets and have got the same read outs.

scanimage -f
scanimage: no SANE devices found
tanya@VGN-NS30E-S ~ $ sudo scanimage -f
[sudo] password for tanya:
scanimage: no SANE devices found

Which distro/version are you running ?

try installing hplip and hplip-gui:

sudo apt-get install hplip hplip-gui

(which will also automagicallypull in libsane-hpaio)

then using HPLIP Toolbox (in your menu’s) to configure the printer/scanner
(although I’d expect XSane will just start working after that, as I’'m guessing libsane-hpaio is your miissing package)

I’m on Mint 13 Maya, Mark.

I installed HPLIP, Xsane worked the first time. Tried it a second time and back to the grey box!

Try uninstalling/reinstalling xsane

sudo apt-get remove --purge xsane

then

sudo apt-get autoremove

then

sudo apt get install xsane

After entering the last code:

sudo apt get install xsane
apt
Usage: apt command [options]
apt help command [options]

Commands:
autoclean - Erase old downloaded archive files
autoremove - Remove automatically all unused packages
build - Build binary or source packages from sources
build-dep - Configure build-dependencies for source packages
changelog - View a package’s changelog
check - Verify that there are no broken dependencies
clean - Erase downloaded archive files
contains - List packages containing a file
content - List files contained in a package
deb - Install a .deb package
depends - Show raw dependency information for a package
dist-upgrade - Perform an upgrade, possibly installing and removing packages
download - Download the .deb file for a package
dselect-upgrade - Follow dselect selections
held - List all held packages
help - Show help for a command
hold - Hold a package
install - Install/upgrade packages
policy - Show policy settings
purge - Remove packages and their configuration files
rdepends - Show reverse dependency information for a package
reinstall - Download and (possibly) reinstall a currently installed package
remove - Remove packages
search - Search for a package by name and/or expression
show - Display detailed information about a package
source - Download source archives
sources - Edit /etc/apt/sources.list with nano
unhold - Unhold a package
update - Download lists of new/upgradable packages
upgrade - Perform a safe upgrade
version - Show the installed version of a package
This apt has Super Cow Powers

Is that right?

Lol @ “Super Cow Powers”

That should have been:

sudo apt-get install xsane

Yeah I laughed too! :smiley:

Thanks for the correct code.

Sorry about that … I seem to be getting stuck between the old
sudo apt-get install
and the newer ability to just enter
apt install
(not even requiring sudo)
old dogs, new tricks kinda thing :-[

I held off from the newer shorter method for ages, as there were still older releases in use … but am in the middle of trying to get used to it now.

Ahhh that explains it. Unfortunately the re-install didn’t work. Maybe I need those Super Cow Powers! ;D

Wait…what??

Edit: I had a quick Google around and couldn’t find anything, maybe it’s a distro-specific bash alias of some kind? Don’t know how it would get around the need for sudo though (is this an early April Fools?) ???

@Tanya

Does Simple Scan or the scanning utility in HPLIP Toolbox work ?

and does Xsane work once after each reboot (and/or power off/on of the printer), but fail the second time you use it ?


@chemicalfan

It’s part of (at least Ubuntu’s) apt package (1.0.1ubuntu2.3) … dunno if it’s part of upstream apt of sommat Ubuntu added but
/usr/bin/apt
is just a python script that if it sees for example “apt install” even without “sudo” will prompt for the password and effectively run “apt-get install” … so yeah (kind of, but not quite) a bunch of aliases

Script contents below if you wanna see it:

#!/usr/bin/python

import sys, os
install instead of apt-get install
def usage():
	print "apt"
	print "Usage: apt command [options]"
	print "       apt help command [options]"
	print ""
	print "Commands:"
	print "autoclean	- Erase old downloaded archive files"
	print "autopurge	- Perform 'autoremove' and remove configuration files"
	print "autoremove	- Remove automatically all unused packages" 
	print "build     	- Build binary or source packages from sources" 
	print "build-dep	- Configure build-dependencies for source packages"
#	print "changelog	- View a package's changelog" 
	print "check    	- Verify that there are no broken dependencies" 
	print "clean    	- Erase downloaded archive files" 
	print "contains  	- List packages containing a file"
	print "content   	- List files contained in a package" 
	print "deb      	- Install a .deb package"
	print "depends  	- Show raw dependency information for a package"
	print "dist-upgrade	- Perform an upgrade, possibly installing and removing packages"
#	print "download   	- Download the .deb file for a package"
	print "dselect-upgrade	- Follow dselect selections"
	print "held		- List all held packages"
	print "help     	- Show help for a command"
	print "hold		- Hold a package"
	print "install   	- Install/upgrade packages"
	print "policy   	- Show policy settings" 
	print "purge    	- Remove packages and their configuration files" 
	print "rdepends 	- Show reverse dependency information for a package"
 	print "reinstall	- Download and reinstall a currently installed package"
	print "remove   	- Remove packages" 
#	print "search   	- Search for a package by name and/or expression" 
#	print "show     	- Display detailed information about a package"
	print "source   	- Download source archives"
	print "sources   	- Edit /etc/apt/sources.list with nano"
	print "unhold		- Unhold a package"
	print "update   	- Download lists of new/upgradable packages" 
	print "upgrade  	- Perform a safe upgrade"
	print "version  	- Show the installed version of a package"
	print "			This apt has Super Cow Powers"
	sys.exit(1)

if len(sys.argv) < 2:
		usage()

sudo="sudo"
if os.getuid() == 0 :
	sudo=""

argcommand = sys.argv[1]
argsuffix = sys.argv[2:]
showHelp = False
if argcommand == "help":
	if len(sys.argv) < 3:
		usage()
	showHelp = True
	argcommand = sys.argv[2]
	argsuffix = sys.argv[3:]
argoptions = ""
for argoption in argsuffix:
	argoptions = argoptions + " " + argoption

if argcommand in ["install", "remove", "update", "upgrade", "dist-upgrade", "clean", "dselect-upgrade", "build-dep", "check", "autoremove", "autoclean"]:
	aptcommand = "apt-get"
	command = sudo + " " + aptcommand + " " + argcommand + argoptions		
elif argcommand in ["source", "moo"]:
	aptcommand = "apt-get"
	command = aptcommand + " " + argcommand + argoptions		
#elif argcommand in ["search", "show", "changelog", "download"]:
#	aptcommand = "aptitude"
#	command = aptcommand + " " + argcommand + argoptions
elif argcommand in ["reinstall"]:
	aptcommand = "apt-get"
 	command = sudo + " " + aptcommand + " install --" + argcommand + argoptions		
elif argcommand in ["stats", "depends", "rdepends", "policy"]:
	aptcommand = "apt-cache"
	command = aptcommand + " " + argcommand + argoptions
elif argcommand == "sources":
	command = sudo + " nano /etc/apt/sources.list"
elif argcommand == "held":
	command = "dpkg --get-selections | grep hold"
elif argcommand == "contains":
	command = "dpkg -S" + argoptions
elif argcommand == "content":
	command = "dpkg -L" + argoptions
elif argcommand == "hold":
	command = "echo " + argoptions + " hold | sudo dpkg --set-selections"
elif argcommand == "unhold":
	command = "echo " + argoptions + " install | sudo dpkg --set-selections"
elif argcommand == "version":
	command = "/usr/lib/linuxmint/common/version.py" + argoptions
elif argcommand == "purge":
	command = sudo + " apt-get remove --purge" + argoptions
elif argcommand == "autopurge":
	command = sudo + " apt-get --purge autoremove"
elif argcommand == "build":
	command = sudo + " dpkg-buildpackage" + argoptions
elif argcommand == "deb":
	command = sudo + " dpkg -i" + argoptions
elif argcommand == "download":
    command = "apt-cache depends " + argoptions + " |grep -v \"Conflicts:\|Replaces:\"|awk '{print $NF}'|sed -e 's/[<>]//g'|xargs aptitude download -r"
else:
		usage()

# Color highlighting
if argcommand in ["search", "show", "content", "version", "policy", "depends", "rdepends"] and len(argoptions.strip()) > 1:
	command = command + " | highlight" + argoptions

if (showHelp):
	print "\"apt "+ argcommand + argoptions + "\" is equivalent to \"" + command + "\""
else:	
	os.system(command)

Haha, how pointless! I can’t see anyone using this, it’s not like the apt-get syntax was complicated (although I’ll confess to visiting the man pages for everything except install/update/upgrade). If you know apt-get, you’ll stick with it - if not, you’ll use the GUI…

Oddly, Ubuntu’s pages didn’t show up at all in the search, only Debian’s and it’s not valid there (according to the Debian wiki/man pages)

Or another way(s) of looking at it…

a) if you’re starting out, it’s easier syntax to remember and possibly more intuitive.

and

b) it’s shorter, so saves typing … which never hurts, PARTICULARLY for command line junkies :wink:

I must admit I resisted it for a while … now I kinda find it handy … what’s the point in longer more confusing syntax when the same thing can be achieved with shorter and more “to the point” syntax ?

Personally I think having the command line KNOW when to prompt for the admin password, rather than the user having to know (or worse, typing “sudo” every time because he’s unsure when it’s necessary) is a step in the right direction … and why not take the opportunity to simplify the syntax at the same time :slight_smile:

The sudo thing is useful, I’ll give you that. But as I do all my updates from the command line, nowadays I just use the up button until it displays (bash history ftw).

I guess it’s still useful to know for install purposes, but I’m not fond of the distro-specific nature :-\

but I'm not fond of the distro-specific nature :-\

Agreed … everyone else should use it too … haha :slight_smile:

Anyway, we’re getting somewhat off topic on an active support topic … my fault again :-[


@Tayna

Please see my response above.
http://linuxforums.org.uk/index.php?topic=12101.msg98180#msg98180