I’ve got a 15+ year old HP ScanJet 4c flatbed scanner that still works wonderfully. Trouble is, try finding SCSI drivers for Windows 7. So, it’s hooked up to my Ubuntu box. The new problem is that the permissions on that type of hardware is set to root:root and if you have any experience with Linux, you know that you never run as root.
So hunted and hunted online for a solution. One solution is to write a UDEV rule. Another is to use the Scanner Access Enabler program. Implementing either of these were a little bit beyond by skill set.
So, what I ended up doing was this: I created scanner.sh which has two lines of code:
#!/bin/sh sudo chmod 777 /dev/sg6 && xsane
Then I created a launcher for scanner.sh. When run a terminal window appears, requests my su credentials, sets the device permissions accordingly (you’ll need to edit that line to point to the location of your device which you can find using sudo sane-find-scanner) and then launches xsane. When I close xsane, the terminal window also closes.
Michael Sauers is the Director of Logan Library in Logan, UT. Prior to this he was one of the founding staff and Technology Manager for Do Space in Omaha, NE. After earning his MLS in 1995 from the University at Albany's School of Information Science and Policy Michael spent his first 20 years as a librarian training other librarians in technology along with time as a public library trustee, a bookstore manager for a library friends group, a reference librarian, a technology consultant, and a bookseller. He has written dozens of articles for various journals and magazines and has published 14 books ranging from library technology, blogging, Web design, and an index to a popular horror magazine. In his spare time, he blogs at TravelinLibrarian.info, runs The Collector's Guide to Dean Koontz website at CollectingKoontz.com, takes many, many photos, and typically reads more than 100 books a year.
Unless otherwise stated, all opinions are my own and are not to be considered those of the City of Logan, UT.
View all posts by Michael Sauers
One Reply to “Getting a SCSI scanner to work in Ubuntu”
Thank you! This finally fixed my scsi scanner woes!!!
Thank you! This finally fixed my scsi scanner woes!!!