Category Archives: geek

Linux Power savings for Scanners

installed a scanner Canoscan 9000F Mark II on Ubuntu 16.04. I was not straightforward because the vendor, Canon, has the nerve of NOT providing a driver for the device.

drivers scanner Canoscan 9000F
Drivers information on Canon website about the Canoscan 9000F Mark II

Unfortunately SANE (Scanner Access Now Easy) did not help. It did not detect the scanner.

I downloaded a VueScan executable. The latter did detect the scanner but it would not preview or scan any document.

So I focused in fixing the communication of my Ubuntu 16.04 to the scanner.

I found this solution at

Go to the file tlp. Path /etc/default/tlp . You need to have writing rights.
You will find the line USB_BLACKLIST=
Search for it. Here it’s line 178.

Here i wrote the USB-ID after USB_BLACKLIST. Then remove the #-sign.
Like this:

The USB-ID you will get with lsusb in terminal.

Thank you Etamuk from Germany!

On your terminal:

$ lsusb

Bus 002 Device 023: ID 04a9:190d Canon, Inc. CanoScan 9000F Mark II

$ lsusb -v

There you have your scanner:

Bus 002 Device 023: ID 04a9:190d Canon, Inc. CanoScan 9000F Mark II
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x04a9 Canon, Inc.
idProduct 0x190d CanoScan 9000F Mark II
bcdDevice 0.02
iManufacturer 1 Canon
iProduct 2 CanoScan
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x07 EP 7 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x89 EP 9 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 11
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered

The ID of that USB is 04a9:190d

I loved the ensuing message from wally333 thanking Etamuk and ranting:

“power management” has wasted so much of my time and effort over the years it’ll never break even in “energy savings”. Don’t get me started on the very arrogant “screen blanking” systems and protocols…




Flight corridors of commercial aviation

I used to telecommute weekly from Madrid to London and back. Flying into London from Monday to Thursday became part of my lifestyle for a long time.

The itinerary Madrid (Terminal 1) to London Gatwick (South Terminal) and viceversa was part of my routine to the point that I knew the codes of my flights by heart.

Landing on Barajas from airplane
Arriving at Barajas airport

During the first flights Gatwick-Barajas I realised that the airplanes consistently flew over the same landmarks: isle of Wight in England, across Bretagne in France and over Santander in Spain.

GPS tracking on an airplane
Using a smartphone as a GPS tracker on an airplane

I wondered if that meant that there are “air corridors” or airways in the sky that flights with the same code followed consistently.
In order to validate this hypothesis I started to track the path of the flights with a GPS tracker.

GPS tracking during the flights

The GPS tracking device of choice was my smartphone. I switched off my smartphone at take-off and at landing times because it was mandatory by the airline.

I switched on my smartphone when the signals in the cabin allowed the passengers to do so. The GPS signal is compatible with the airplane mode  because GPS tracking does not transmit radio waves. The smartphone only receives GPS data and does send anything back to the satellites.

I recorded the coordinates of most of the duration of 6 flights in the interval of 24 days from mid February to mid March. The direction of the flights were 4 flights from Gatwick to Barajas and 2 flights from Barajas to Gatwick.

I learned a few things that I am listing here:

Satellite fix

The fixing of satellites takes much longer than on the ground

Unpredictable GPS tracking

The GPS tracking is not complete or not happening at all in some flights. Does it depended on the fuselage of the airplane or are GPS jammering devices increasingly common in commercial flights?

In some instances I might not get coordinates for hundreds of kilometers, for instance from Castille inland to the middle of the Bay of Biscay.

Similar paths on same airways

The airways were similar but not identical between flights on the same route even if separated by only 7 or 14 days.

flight paths Gatwick-Barajas and Barajas-Gatwick
Comparison of airways from Gatwick to Barajas and viceversa

The airways were close by a few kilometers and degrees.

Airways over Bretagne on the same flight itineraries
Airways over Bretagne on the same flight itineraries

Landmarks of the flights Gatwick-Barajas

Gernsey and Santander and, exceptionally Gernsey-Gijón-León.

Landmarks of the flights Gatwick-Barajas
Landmarks of the flights Gatwick-Barajas

Landmarks of the flights Barajas-Gatwick

Bilbao and Jersey.

Landmarks of the flights Barajas-Gatwick
Routes of the flights Barajas-Gatwick

Unreliable elevation values

The values of the elevation are zero for 50% or more of the total points of a track. Where not zero, the values were 900-1100 meters with a maximum of 1500 meters. The values that I saw displayed on the screens for passengers were 10500 meters however.

I used GpsPrune v. 18.5 by Activity Workshop to display the coordinates and maps from a .gpx export of the GPS file. GpsPrune is a program for loading, displaying and editing data from GPS receivers.

Migrate Dropbox to Owncloud

Take control of your personal cloud services by managing your own one. The benefits are:

  • a single interface for your files, notes, feeds, etc.
  • better control of your information
  • consolidate your payments into a single hosting provider instead of paying fees to multiple services

The main drawback of the consolidation is of course the fact that migrating services takes a few hours of importing data, learning new interfaces, setting up cron jobs on the server, etc.

Setting up my own cloud service was partially inspired by Joseph Zhou’s post “Deploy ownCloud with Bitnami in Google Cloud Platform“.

Cost of your own personal cloud

A total of $69 per year excluding taxes.This is the sum of $5 per month of DigitalOcean’s hosting. You can also buy a Comodo’s¬† PositiveSSL certificate at Namecheap by $8.38 per year. Alternatively you can get a free SSL¬† certificate from¬† from StartSSL. Follow the tutorial “How To Set Up Apache with a Free Signed SSL Certificate on a VPS” to set it up.

In terms of file hosting only, DigitalOcean’s¬†640GB SSD Disk at $640 / mo is a very expensive service compared with Dropbox’s monthly fees of $9.99 for 1 TB of space.

I believe however that DigitalOcean prices will go down faster of a per GB basis than Dropbox will ever do for the cheaper plans.

Hosting in the cloud


I set up a Droplet on DigitalOcean for two reasons: they claim a 99.99% Uptime SLA and they have a few datacenters in Europe. The cheapest plan is about enough for personal use: 512MB Memory, 1 Core Processor, 20 GB SSD Disk and 1 TB Transfer by $ 5 / mo.

The tutorial is


You can choose an Ubuntu image and and connect to it via terminal  with your ssh keys.

The one issue with Owncloud is that they do not provide a simple client syncing installation for Ubuntu. Apparently the open source community are not interested in maintining one. Instead there is an OpenSUSE installation package that does the job.

Owncloud’s¬†with a minimalist default theme is clean and simple.¬† The features of the apps are all core and even the developed and maintained by 3rd parties work as expected. You may miss some of the advanced bells-and-whistles of your original applications.

Setup your DNS at your domain registrar by setting an A record pointing to the IP address of your droplet. I did so for an ad-hoc subdomain:

Securing your connection with SSL certificates


Configure your server to require using HTTPS. This is probably the geekiest bit of the migration process. Purchase a Comodo certificate from Namecheap and upload the .crt and .key files to DigitalOcean.

You will want to force https on browsing clients. I tried, and failed, setting up the redirections from http to https, so I configured the .htaccess file instead at /var/www/owncloud/.htaccess


screenshot uage cloud digitalocean
Screenshot of DigitalOcean’s usage graphs of an Owncloud droplet



Client-server software for file storage


Install Owncloud by clicking on “One-click apps”. As an admin you can install and enable the apps that you want. As a user you have to import data like feeds on .opml from your reader, your .iCal for your calendar, etc.


Client Owncloud for your local computer

As per

$ sudo sh -c "echo 'deb /' >> /etc/apt/sources.list.d/owncloud-client.list"

$ wget

$ sudo apt-key add - < Release.key

$ sudo apt-get update

$ sudo apt-get install owncloud-client

The local synced folder is  set at the config/config.php file

‘datadirectory’ => ‘/var/www/owncloud/data’,

You can change the data directory.

1.) sudo cp -R /var/www/html/owncloud/data /home/owncloud

2.) sudo chown -R www-data.www-data /home/owncloud/

3.) Change
(datadirectory => /var/www/html/owncloud/data)
(datadirectory => /home/owncloud)
location by editing:
sudo nano

Update your home Dynamic DNS

$ sudo /usr/local/bin/noip2 -C
Auto configuration for Linux client of
Multiple network devices have been detected.
Please select the Internet interface from this list.
By typing the number associated with it.
0 eth1
1 wlan1
Please enter the login/email string for [email protected]
Please enter the password for user [email protected] **********

Only one host [subdomain.domain.tld] is registered to this account.
It will be used.
Please enter an update interval:[30] 30
Do you wish to run something at successful update?[N] (y/N) y
Please enter the script/program name startnoip

New configuration file ‘/usr/local/etc/no-ip2.conf’ created.

The apps on the cloud

File syncing

The star application of Owncloud. Unfortunately, there are not specific installation packages of Owncloud client for Ubuntu 14.04 and newer. Owncloud suggests using OpenSUSE’s packages, which happen to do the job just fine.

Note taking and archiving

I did not find the Notes app capable of replicating even the most basic features of Evernote. If you are curious how it would work for you, export your content on Evernote as .html files and import them into OwnNote. You need to set up your syncing intervals with crontab directly on the server.

Warning 1: You cannot import the tags or categories from Evernote

Warning 2: You will miss a search engine for your notes!

Feeds reader

Export your feeds from Netvibes as .opml and import them into the News app. Setup the cron job with the command crontab. You will enjoy a cleaner interface than Netvibes. You will also be able to focus on the text rather than the images as in Flipboard, etc.

GPS tool

A nice surprise: Gpxpod, a cool app to read and compare your .gpx files. It is a simpler alternative to

$ python -V
Python 2.7.6

$ sudo apt-get install python-pip

$ sudo pip install  gpxpy

$ sudo pip install geojson



I am yet to convert my .ics to .iCal file in order to import it into the app

Music streaming, gallery of pictures

Nice-to-have apps that work out of the box and do what they claim on the tin.


This is one cloud service that I will not move out of

Future services

I would love to have a Wallabag-like self hostable application for saving web pages. Also Airdroid for connecting to portable devices on own’s one LAN via Wi-Fi.

I hope that IFTTT integrates owncloud servers in its catalogue of recipes.