Grayscale Images with ImageMagick

Author: akeil
Date: 2014-05-10
Version: 2

Converting a photo to a grayscale version is simple enough with the ImageMagick [1] convert command:

$ convert photo.jpg -colorspace Gray out.jpg

However, the result leaves something to be desired. It looks "flat" and boring. Better results can be achieved with this command:

$ convert photo.jpg -type Grayscale out.jpg

Read more…

Music with MPD and beets

Author: akeil
Date: 2014-03-24
Version: 1

MPD [5] (Music Player Daemon) is a music player that runs in the background (as a daemon process). MPD does not have a user interface but requires a separate client application to control playback. One interesting thing about MPD is that it can be controlled over the network. MPD can also stream music over HTTP.

beets [1] is a command line application to manage a music library. It downloads album/track-information and cover art from various web services and manages your music-file's metadata ("tags").

The resulting setup will be a system where you can playback and manage music without the need for a graphical user interface (or any graphics). It can run on your desktop PC and be controlled by a locally installed (GUI-) client or it can run on a different machine and be controlled over the network. When controlled via network, no display is required on the computer running thee beets/MPD combo.

Read more…

Rolling Backup with rsync

Author: akeil
Date: 2014-03-21
Version: 2
updated: 2014-03-24

This post describes a backup solution for a constellation where the source machine - the one that holds the data to be backed up - is "always running". The target machine - where backups are stored - is not always available.

More precisely we are backing up data from a RaspberryPi to a desktop computer.

The backup is controlled from the target machine, where it is scheduled to run periodically with anacron.

Read more…

Setup Raspberry Pi with Arch Linux

Author: akeil
Date: 2013-12-28
Version: 2
Updated: 2014-06-09


2014-06-09: Added instructions on how to Change Partition Size.

This post describes how to install and set up Arch Linux ARM [1] on a Raspberry Pi [2] (a Model B Rev 2.0, precisely). This is done by writing the bootable Arch Linux ARM image onto an SD card, then booting the Raspberry Pi with that card. The Pi needs to be connected to the network only, it does not require a monitor or a keyboard.

Requires a PC with a card reader and internet access plus a SD card with at least 2GB storage and finally router that supports DHCP.

Read more…

podfetch 0.3.1

Changes in podfetch 0.3.1:

  • Index files are now in JSON format.
  • Filenames for downloaded episodes are coerced to ascii.
  • ls command can list episodes for a subscription
  • update command has an option to --force downloading new episodes.
  • Fixed error where temporary files for downloads were not deleted properly which caused the /tmp directory to run out of space if many episodes were downloaded in a single update run.

See the podfetch main page.

User Controlled anacron

Author: akeil
Date: 2013-11-23
Version: 1

In Linux, cron-jobs can be used to execute commands or scripts on a regular schedule. Jobs and their execution times or intervals are specified in a crontab and executed by a cron daemon. When the scheduled execution time is reached, crond will run the job.

This works well in a situation where the machine is up most or all of the time. It works not so well on a typical desktop or laptop PC because cron will not "catch up" on jobs that were missed while the computer was not running.

anacron [6] allows to specify that a job is run at a given interval specified in days (or weeks/months). It does not assume that the system is up 24 hours a day and will run jobs as close as possible to the specified time whenever the system is up.

By default anacron runs system-wide and jobs are executed with the root user. Also, only root has write permissions on /etc/anacrontab or on the /etc/ directories.

We will make anacron easily available to a non-root user and - more important - run the scheduled jobs without root privileges.

Read more…

Install CyanogenMod on Asus TF300T

CyanogenMod is a custom version of the android operating system. It is intended to replace the stock-android that was preinstalled by the vendor. More information is found on the CyanogenMod Site.

This post explains how to install CyanogenMod on an Asus Transformer TF300T tablet. We are starting with a non-rooted Asus Transformer TF300T which has received upgrades to Android 4.2.1 (Jelly Bean). Linux Mint is used on the PC-side of things.

More information is available on the TF300T Support Site for CM and in the CM-wiki's Installation Guide for the TF300T.

In short, installation of CyanogenMod requires that a custom Recovery Image is installed which allows us to change the operating system. To install such a recovery image, we will need to unlock the boot loader.

Read more…

Block ads with /etc/hosts

Author: akeil
Date: 2013-10-23
Updated: 2014-07-06
Version: 3

The Hosts File (/etc/hosts on Linux) is used to map hostnames to IP-addresses when no DNS is available. Although it is not intended for this, it can can be used to block network traffic by re-routing requests for some.domain to a different address: localhost.

If you add the following line to the hosts file:

you will not be able to request websites (or anything, really) from - your operating system will connect you to instead. Since there is (normally) no web server to answer the request, the browser will display an error message.

If you create entries like this for all adservers, you will definitively not be able to see ads.


Update 2014-07-06
Added some links to hosts files

Read more…


Author: akeil
Date: 2013-10-20
Version: 1

radicale [1] is an open source server for calendars and contacts written in python.

Although radicale can run as a standalone solution, it is recommended to run it inside a HTTP server (especially if is made available through the internet).

This is a description of a radicale setup on Arch Linux using nginx [2] as a HTTP server and gunicorn [3] as a python application server.

When complete, we can run our own server to store calendar and contacts data and make them available via CalDAV and CardDAV. Access to the calendars and address books is protected by passwords and the calendar/contact data is backed up regularly.

Read more…