LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Using xsane as a user (https://www.linuxquestions.org/questions/slackware-14/using-xsane-as-a-user-223851/)

Jeffmrg 08-29-2004 06:53 AM

Using xsane as a user
 
I believe there must be a very simple solution to a problem using xsane but I have not been able to find it in the posts after some fairly extensive searching.

As a user, I get a 'no devices found' error on launch. When I (su -) I get a 'Gtk warning cannot open display'. When I (su), the program launches as I would expect it to and I can work normally. But all my scans created this way have restricted viewing privileges, requiring that I modify permissions to view them.

Scanning appears to be the (near) last frontier in my 100% migration to Linux. Can someone describe what is going here and provide or point me to a consolidated solution?

Thx.

Jeffmrg 08-29-2004 08:59 AM

I've been able to make this work by issuing the following command:

chmod 0666 /proc/bus/usb/001/003

where the 001 and 003 are the results of scanimage -L.

How can I make these changes persist across reboots?

mdg 08-29-2004 01:15 PM

As a quick fix, you can add the "chmod" line to /etc/rc.d/rc.local. That should change the permissions at bootup, but you'll run into problems if you unplug/replug your scanner. The 001/003 filenames change to a different name and the "chmod" line obviously won't work.

The recommended way is to use a hotplug script, and for that you need to enable hotplugging.

Look in /home/dir/sane-backends-1.0.14/tools/hotplug/ (depends on your version of sane). There's also a readme file which basically tells you to copy the libsane.usermap and libusbscanner files from that directory to /etc/hotplug/usb/ and make them executable.

That supposedly takes care of the problem. I say "supposedly" because it hasn't worked for me, but I do know that it has worked for others. Maybe you'll be one of the lucky ones ;)


All times are GMT -5. The time now is 10:36 AM.