Good Morning from my Robotics Lab! This is Shadow_8472, and today, I would like to share with you the inSANE time I had trying to set up a scanner without root privileges. Let’s get started!
SANE is a resource for Linux to streamline the setup of scanners. From what I understand, it’s supposed to just make things easy.
Unfortunately, there’s a bug (or was) a bug in the version written for Debian Buster. I honestly thought this would be easy; I spent the whole week trying to not only fix the issue, but understand what I was doing as I was doing it. Special thanks go to all the people who at least tried to help me on the various Discord servers I broadcast my distress calls on.
As with any problem, diagnosis is the first step. Tutorials, in general, expect a clean installation, but I’m past that point. I’ve already tried, and failed to complete this procedure. I at least know how to look around with ls -l and other commands.
I started out with sane-find-scanner and lsusb, and eventually figured that while I –my user account– had permission to use the scanner, I didn’t have permission to access the USB bus it was connected to. A little research led me down the path of exploring the groups mechanic of Linux. They appear very useful, but I have yet to figure them out. What I did learn was that the scanner group wasn’t enough to let me scan in and of itself.
It took me a while to find that bug, but since it was crossed out and a note said it was fixed in some future build, I updated everything from the apt repository and nothing! Reboot: nothing!
I reexplained my support issue several times across multiple Discord servers, and I sometimes got someone to try and help me, but eventually, I ended up going back to that bug and reading up on it.
Buried within what felt like an endless amount of terminal output with the occasional e-mail header, I came across a workaround. It called for making a symbolic link between a couple files, then to put some text in a file elsewhere in the filesystem. The instructions sounded familiar from my last attempt, and they were consistent with other Linux help forum posts from different places.
I spent about a day trying to figure out why the symbolic link wasn’t showing up. The folder in question where I thought it was supposed to appear already a link. There were three files in the directory, and when I used a –verbose flag, I saw three entries. I rummaged around in ln –help and found that one of the other flags caused links to overwrite existing links to replace them. I figured that must be happening here, but its timestamps weren’t changing from a date last year when I supposedly updated them.
I eventually decided to play around with a symbolic link in an isolated spot in my home directory. I had my sandbox directory with another directory in it. I made a test .txt file in the sub directory, and tried making a link directly in the sandbox’s root using the same flags as in my problem link. The link didn’t appear in the root, but it instead replaced the text file, and the terminal warned me about it being a broken link by rendering the link in red instead of the normal cyan. I fiddled around with it some more by remaking the test .txt file in the root and leaving the link in the sub directory. I had a few missteps, but I managed to access the file by using the link.
Back on the main area, I found the links I had been overwriting in the other directory by listing them with ls -l and scanning for a timestamp that wasn’t in 2019. Three entries popped out at me. On closer inspection, the link I thought was a rewrite dud was, in fact, linking to a file within the same directory, but with a different name. It looked like it was meant to catch programs calling for the old version of a program and redirecting them to a slightly updated copy — just like forwarding mail.
The rest of the workaround was simple. I learned about the touch command, a little program to update a file’s timestamp or create a file if it isn’t there. I rebooted and had a good feeling when I heard the scanner move a little as Linux was starting up. Sure enough, I was able to start the GUI interface without superuser.
All in all, this week taught me a near-miss lesson about one of the more interesting features in Linux, and apparently Windows as well.
Final Question: Who’s ready to hook up a printer?