Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xsane/gimp scanning problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
nukem996
l33t
l33t


Joined: 13 Nov 2003
Posts: 776

PostPosted: Sun Mar 07, 2004 3:37 am    Post subject: xsane/gimp scanning problems Reply with quote

I just hooked up my scanner(USB UMAX Astra 3400) with xsane. It works great under root but as soon as I try to run xsane as a normal user it dosnt detect any scanners. Im pretty sure its just a permission problem in /dev but theres no devices that seem like its the scanner. I do not have a /dev/scanner(s) and I only have lp0 in /dev/usb. sane-find-scanners gives me

found USB scanner (vendor=0x1606 [UMAX], product=0x0060 [USB SCANNER], chip=LM9832/3) at libusb:001:016

Could someone tell me the device to change permissions for?

I run gimp-2.0-pre3 and the sane plugin for gimp does not seem to work with it. The plugin was put into /usr/lib/gimp/1.2/plugins and I moved it to 1.3 but I got errors from that. Is there anyway to get gimp to use sane?

Thanks

nuke
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Sun Mar 07, 2004 5:09 am    Post subject: Reply with quote

My scanner is SCSI, so it shows up as generic device just like a cd burner. I set the permissions in /etc/devfsd.conf using one line that covers the scanner and both cdrws.
Code:

REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.cdrw 660

These are also linked as /dev/sg* devices. Maybe USB does something similar, but I can't say.

I made an ebuild for xsane that is patched for gimp-2 and gtk2. You can find it here.
Back to top
View user's profile Send private message
nukem996
l33t
l33t


Joined: 13 Nov 2003
Posts: 776

PostPosted: Sun Mar 07, 2004 5:29 am    Post subject: Reply with quote

I can scan directly to gimp now but when I goto scan it says
"Gimp does not support depth 16 bits/color. Do you want to reduce the depth to 8 bits/color? Reduce/Cancel"
I hit reduce and it looks the same is there any disadvange to doing this? Hey jw why isnt this ebuild in portage? It works great. Im going to try the other thing you said tomarrow its kina late and I dont feel like screwing up and asking something stupid.
Back to top
View user's profile Send private message
nukem996
l33t
l33t


Joined: 13 Nov 2003
Posts: 776

PostPosted: Sun Mar 07, 2004 5:41 am    Post subject: Reply with quote

I just realized something when ever I update my system portage is going to "update" xsane getting rid of your version. Anyway to stop that or could your ebuild be put into portage?
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Sun Mar 07, 2004 6:08 am    Post subject: Reply with quote

Submitting ebuilds is an exercise in futility and a waste of time. I have seven in bugzilla right now and only one is getting any attention from the dev's, though users have commented positively regarding most of them.

Check the Portage Manual about setting up a portage overlay directory so optional ebuilds don't get wiped when you sync. The INSTALL file on my page explains it some. Did you read it?
Back to top
View user's profile Send private message
Schnacki
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2003
Posts: 105

PostPosted: Mon Apr 12, 2004 4:34 pm    Post subject: Re: xsane/gimp scanning problems Reply with quote

nukem996 wrote:

Code:

found USB scanner (vendor=0x1606 [UMAX], product=0x0060 [USB SCANNER], chip=LM9832/3) at libusb:001:016



Well, according to that line your scanner is detected by libusb, not by the kernel-scanner-driver. so the "device" you're looking for is found in
Code:
/proc/bus/usb/001/016

unfortunately I cannot tell you how to change the permissions of that "device" permanently. I cannot even say that changing the permissions for that "file" will change anything, as it didn't in my case.

After my first "chmod" on the corresponding "file" in my setup the "id" of my scanner even changed. (I chmod'ed the "010" and afterwards the "010" file was gone and the scanner was on "011")

I have no Idea what's going on here.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sat May 22, 2004 6:12 pm    Post subject: Reply with quote

It is the device number which changes if the scanner is unplugged and replugged. This is part of hotplugging.

To the system it is a new device, you need to set perms dynamically on plugin. in /etc/hotplug/usb/scanner:

Code:
#!/bin/bash
#echo skip;
#exit;

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
chown root "${DEVICE}"
chgrp scanner "${DEVICE}"
chmod 660 "${DEVICE}"
fi

Back to top
View user's profile Send private message
douglas_slac
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2003
Posts: 89

PostPosted: Sat May 22, 2004 6:30 pm    Post subject: Reply with quote

There has been a few threads on this recently, it became very important with the 2.6.x kernels since the "scanner" kernel mod. doesn't exist anymore. There is an almost fixed support for this and hotplug in sane-backends 1.0.14, and you should give that a try, although it is still '~x86', unstable in the e-build.

But it comes with a hotplug script, and a large list of scanners for hotplug to look for in usb. I found a bug in the hotplug script where it sets the dev. number. There is another thread on that also.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum