# My Scanner and Ubuntu 14.04

## Background

• Scanning and printing works fine in my Ubuntu 12.04 desktop.
• I’ve upgraded to Ubuntu 14.04 LTS yesterday.1

## Problem

When I used Simple Scan, Ubuntu’s GUI tool for scanning documents, I encountered an error—the program couldn’t detect my scanner.

How can I scan images from my scanner in Ubuntu?

## Discussion

The working principle GUI tools are much more complicated than its command line counterpart.

I’ll illustrate the idea by a typical component in GUI by borrowing other’s depication of the delegation model in Java GUI programming.

Source: yet another insignificant programming notes2

In my opinion, the working principle of a button in GUI is much more abstract than that of the nervous system in a human body. One can learn about the bilogical principles through observations of concrete objects.

Source: Passnownow3

## Solution

### Temporary method

Therefore, I immediately googled the *nix command for scanning documents, and came up with brscan-skey. I ran it with the -l flag, the it said that my scanner wasn’t registered.

# brscan-skey
# brscan-skey -l
XXX-XXXX          : brotherX:busX;devX  : USB                  Not registered


A comment for Brother MFC-465CN took me to Brother’s documentation for Linux drivers, but finding the right page by viewing the right hyperlink was too slow, so I searched the command and restricted the results to those in Brother’s website. The page in the official documentation inspired me to add the following lines just before the last line of /lib/udev/rules.d/40-libsane.rules.4

# Brother scanners
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"


I rebooted my computer and my scanner became “active”. However, Simple Scan still couldn’t detect it. I followed the official documentation and pressed “Scan” button on the device. It worked and the scanned files with the TIFF format could be found under ~/brscan/.

After an hour, when I ran the same command to list out the devices that brscan-skey could detect, I got no output.

However, I could still use the button on my scanner to produce scanned images.

1. Refer to Ubuntu Distribution Upgrade to 14.04 and Upgraded Ubuntu for details.

2. Chua Hock-Chuan. (2014, March). Java Programming Tutorial. Retrieved 12:25, August 14, 2014, from http://www.ntu.edu.sg/home/ehchua/programming/java/j4a_gui.html#zz-3.1

3. Reflex and Voluntary Actions. (n.d.). In Passnownow. Retrieved 12:52, August 14, 2014, from http://passnownow.com/classwork-series-and-exercises-biology-ss3-reflex-and-voluntary-actions/

4. Scanner setting for normal user. (2013). In Linux Informations. Retrieved 13:53, August 14, 2014, from http://support.brother.com/g/s/id/linux/en/instruction_scn1c.html?c=us_ot&lang=en&redirect=on#u9.10
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.23177090287208557, "perplexity": 6289.164654932368}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-17/segments/1524125944742.25/warc/CC-MAIN-20180420213743-20180420233743-00162.warc.gz"}