December 11, 2013

List of useful linux tools whose names i keep forgetting

  • arping - ping IP and get the MAC adress 
  • engauge (aka engauge-digitizer)    get data points from images of plots
  • gpicview - an image viewer 
  • pdfposter - a tool to scale pdfs and print (tiled) poster
  • ripit  most easy-peasy cd ripper and mp3 encoding script
  • sitecopy a tool to sync folders via ftp 
  • tr    - can be used to translate characters of a text file - or delete them 

December 1, 2013

Xenim streamrecorder.

Als Podcasthörer stellte sich mir folgendes first-world-problem: Es gibt live-Podcasts, die interessante Post-/Preshows haben, die nachher nicht im Podcast sind. Weiterhin dauert es mir manchmal zu lange bis zur Veröffentlichung.

Ich habe ein wenig mit Python rumgespielt: Herausgekommen ist ein Skript, welches automatisiert die API von xenim abfragt und gegebenfalls mit VLC einen Stream mitschneidet. Das Skript sollte auch mit Streamabbrüchen umgehen können (Wiederaufnahme).

Vielleicht kann jemand was damit anfangen.

Das Ding läuft unter Linux (bei mir auf dem Raspberry Pi), braucht Python 2.(6?), und das Pythonpaket 'requests' (Debian, Ubuntu: sudo apt-get install python-requests, Arch Linux: pacman -S python2-requests).

Mit dem Programm 'screen' kann das Skript im Hintergrund laufen.

Anpassung auf den Mac sollte relativ einfach machbar sein, Windows eher: mehhh.

November 2, 2013

Run Docketport 467 Scanner under Linux

The Problem

I always wanted to get rid of my flatbed scanner and bought a DocketPORT 467, a tiny sheet fed scanner for small money on ebay.
But it didn't work out of the box under Linux (Ubuntu 12.04).
 Using the sane software tools, i was able to see that the scanner at least is detected:

found USB scanner (vendor=0x1dcc [Document Capture Technologies Inc.], product=0x4812 [DocketPORT 467], chip=GL842?) at libusb:001:003
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

When i try

 scanimage -L

i get

 No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages)

basically the same happens when i start xsane (a graphical scanning programm).

What is wrong: it is the permissions! When i tried

sudo  xsane

the scanner was found and worked fine.
Because the permission situation, one is not allowed to use all usb devices available. 


1. lazy bum version 

just use "sudo xsane" to access the scanner. When you save the images, maybe you have to adjust the file user and group of scanned images afterwards.

2. make a udev rule

the permissions for usb devices can be adjusted writing rules for the udev (device daemon). You can place them in the folder /etc/udev/rules.d.

The file name must have the ending .rules and can be for example 90scanner.rules. It can be important that the number at the beginning is higher that the number of the other filenames, because the system reads the files according to the alphanumeric ordering.

Our file contains the following:

#usb scanner readable by me#
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1dcc", ATTRS{idProduct}=="4812", OWNER="THISisYOU"

(you have to change the owner (here THISisYOU) to your own username). Hint: Everything from "Subsystem" up to the end has to be put in one single line.

Now i was able to access and scan without sudo.


another variation of udev rules is described on the bottom of this page (paragraph "Permission problem"):