NextGen vanishes on front page

posted in: Technicalities, Uncategorized, www | 0

My NextGen gallery kept vanishing on my WordPress frontpage. It did not show as long as the page was set to front page, as soon as I picked a different front page, the images reappeared. Even when I changed the theme, the gallery disappeared.

I checked and rechecked the source code, but what I apparently missed was the gallery being wrapped in auto excerpt tags:

<!-- Begin :: Generated by Easy Custom Auto Excerpt -->
<div class="ecae"

How to Stream Music from Linux PC to iPhone over Wifi

posted in: Linux | 1

There are endless possiblities to stream music from your computer to your phone over wifi, but few dedicated howtos that walk you through the process step by step.

Option 1: UPnP

Universal Plug and Play (UpnP) is developed by the Digital Living Network Alliance (DLNA) and has interoperateability in mind. See Make Use Of for a list of possibilities.

Server: Subsonic

Install from here
Costs $1/month to use pro features
Get started here


Connect Crunchbang Linux to Bluetooth Speaker

posted in: Linux, Technicalities | 0

I got myself one of these and after setting it up properly I must say that while I am a bit disappointed by the reach, I am very impressed with the sound quality for this kind of money (a white label apparently as »C26« sells under various brands and for different prices).

Anyway, the whole setup was a true Linux afternoon, reminding me of my NDISwrapper-days, just like it was 2006 again.

First, It took me a while to get crunchbang to discover the device and connect [1] (Blueman works much better as a bluetooth manager). Then apparently I manually needed to let pulseaudio know where to send the audio [2]. Atfer fiddling with some files, pulseaudio was broken, so I needed to reinstall [3]. Finally, the sound was much poorer than via my phone. I don’t know if I overlooked it or if loading rtirq changed something [4], but in the volume control center of pulseaudio there is a tab called »configuration« where I had to choose »High Fidelity Playback (A2DP)« to get decent sound (instead of »Telephony Duplex (HSP/HFP)« or »off«). Now most of the times it changes to the Bluetooth-device automatically once I switch it on and back when I switch it off. Sometimes not. But hey.

The sources I used were these:

How to make pulseaudio bluetooth-ready:
How to switch the sink in pulse audio:
How to clean up after you screw up (which I did), i.e. reinstall pulseaudio:
How to improve the sound once it works but reminds you of a telephone: and


Automatically batch rename photo files

Following Robert Seale’s advice, I was looking for a solution to batch rename photo files. After my last shoot I used digikam and while the results were as desired, it took a second or more per image, which I thought a bit long. After not finding a different suitable solution I asked the question on unix.stackexchange and was overwhelmed by two people’s in-depth answers. I learned a lot from both mikserv and Gilles and in the end settled with Gilles’ suggestion. I take zero credit for the solution, I don’t even understand parts of what is going on, but I amended it a little bit nonetheless and thought the extended version might help someone.*


What I get when I come home is file names looking like this: _DSC1234.NEF. What I wanted instead was

  1. date-shot in YYYYMMDD-format plus
  2. a descriptive shoot-name plus
  3. image-number

looking like this: 20140708_WeddingAdamAndEve_0001.NEF

There are a few issues with this:

ad 1. Date Shot: sometimes I can only copy and rename the files a few days after shooting, so the date should reflect the date the picture was taken, not the date it was copied. Getting date-shot from the file itself is difficult as there is no birth time recorded. The closest is mtime which is the time the file’s content has last been modified. However, creation date is stored in image file’s EXIF data.

ad 2: Name of Shoot: Ideally I wanted this to be a variable I could set as a parameter when calling the script.

ad 3. Number of Image: This should reflect the age of the image with the oldest one having the lowest number. The problem is that cameras usually restart numbering at  0000 once they hit  9999. So images n-9999 can potentially be older than 0000-n. I needed a solution that would cater for this special case.


The code

# original solution by @Gilles (

# set base


Crunchbang on x200s

posted in: Linux, Technicalities | 0

Through a few very lucky coincidences I received a Thinkpad x200s a few days ago and set it up with Crunchbang which must have been the most straightforward os-installation ever. Two Three Four things though:


A slightly outdated version is in debian’s repositories, but if you want a newer one, go to »Kbyte’s Hideout«. Download .deb package and dpkg -i rawtherapee_<xxx>.deb

If there are unsolved dependencies: apt-get install -f and then  dpkg -i rawtherapee_<xxx>.deb



It still is the most straightforward programme I know for editing, simple retouches and exporting smaller sizes. I’m not happy with wine, I’m not happy with a google tool, but I cannot and cannot find an alternative (see here). Hence:

before following the


Redecorating the place II

posted in: Random, Technicalities, www | 0

After almost eight years using (and helping develop) Polypager, a very versatile and friendly content management system, and after three years of having Zenphoto manage my pictures, I finally decided I had to retire both and move to a different system altogether: a single one for text and images that would also treat my mobile visitors better (a third of my total traffic).

Polypager’s strength clearly was in handling the database – it has foreign key capability and without the faintest complaint, Polly will display any mysql-database it is being fed. However, it was never built with serving images as a central part in mind. There is a gallery plugin in place, but my desires soon surpassed the capabilities.

Zenphoto in turn is fantastic in handling text and images (and video by the way, which surprisingly posed the biggest hurdle in wordpress – the other was 301, but in the end Tony McCreath’s redirect generator helped). The problem with zenphoto is more an aesthetic one as the available skins are limited and don’t really meet my expectations. The one I hacked together unfortunately »grew organically« over the years until recently it gracefully started falling apart.

Thus, today I make the move to WordPress and while I am at ease parting from Zenphoto, leaving Polly behind really hurts. So, thanks Nic for developing it and having me aboard, because in the process, I learned many a thing about distinguishing sensible feature requests from the other ones, about version management using svn and git, and also, in 2008, about how it feels to be at the receiving end of a proper hack.



posted in: Linux, Technicalities | 2

My ubuntu 12.04 computer cannot see my Android 4.1.2 phone, instead I must install go-mtpfs and control it via command line. Thankfully, Andrew over at webupd8 provides all the necessary tools (all credit goes to him, for long version see there):

sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs


sudo apt-get install go-mtpfs-unity


go-mtpfs...   READ MORE

Removing Juice from Keyboard

posted in: Other, Technicalities | 0

Recently I bought a faulty pack of grapefruit juice. The plastic nozzle was not glued to the carton properly, so instead of filling my glass, I filled my trusty old Logitech UltraX Premium keyboard. I wiped it clean immediately, but the next day the keys were as responsive as a panda after a month of sleep deprivation. I searched and among the many »how to remove all the keys from your keyboard«-articles, I found one that said: in the shower with it!

I closed my eyes, hoped for the best and thoroughly rinsed it. Then, like people in this 2005 Boing-Boing-piece recommend, I placed it over a radiator for three days, turned it round from time to time and today I plugged it back in.

Result? It works as good as new!

Network Sync

posted in: Linux, Technicalities | 0

I recently got my hands on a shiny eee-PC for surprisingly little money. As I am travelling a fair bit at the moment, the opportunity was more than welcome. Now, mobility comes at a price and the price is called »multiple instances of files«. When the files in question are your PhD, it has the potential for a fantastic nightmare. Most people use dropbox to tackle this, but for one reason and another, I neither want to use that, nor ubuntu one. I have owncloud [see here], and after resolving some issues, the sync client works, but I still would like to keep more data in tune then I could possibly channel through my shared hosting plan. Unison (via ssh) seems the way to go.

Setting it up was a lot easier then I though. All it took was rbgeek’s exccellent article »File Synchronization Between Two Ubuntu Servers using Unison«.

Falko Timme’s article »


Custom Shortcuts in Kile

posted in: LaTeX, Technicalities | 0

If you use Kile as LaTeX editor and if you find yourself typing the same code all over again – like a specific table environment, or a slide environment in beamer or whatever, why not create your own user tag and assign a custom shortcut? You can even decide where the cursor should be placed and what should happen in case text is selected while pressing your shortcut.

It’s very easy and very fantastic: User defined Tags.

Picasa Alternative [ongoing]

posted in: Linux, Photography, Technicalities, Tools | 1

For a long time I have been looking to replace Picasa (the desktop programme) but haven’t been able to come up with a true alternative. Many people ask for Picasa-alternatives in the forums, yet most of the answers and suggestions – as helpful as they are – haven’t been satisfactory. I’m not looking for another programme to show me my pictures, theres piles of them that can do that. What I need is a replacement to perform specific steps in my workflow. I thought maybe it helps if I publish something more detailed.

I am an avid photographer and my pictures mainly fall into two types: those that come in a group (like from holiday or hikes) and those where one individual image is more important to me. For the second type I use RawTherapee and am absolutely happy. But before I go into Rwatherapee, I use Picasa for sorting. And I also use it for my holiday snapshots, where most of the edits are minor (straighten here, brightness there).

The reason why it takes me so long to settle ewith an alternative is because Picasa is better then any other programme I know when it comes to sorting and the quick simple fixes.


Bibtex going openout_any = p

posted in: LaTeX, Technicalities | 4

Working with multibib, Bibtex started failing me after a recent reinstallation of texlive on xubuntu. On
bibtex <project-path>/src.aux
I got:

bibtex: Not writing to &lt;project-path&gt;/src.blg (openout_any = p).

I couldn't open file name `&lt;project-path&gt;/src.blg'

To get rid of the error, open texmf.cnf, which resides in /usr/share/texlive/texmf/web2c through
sudo gedit /usr/share/texlive/texmf/web2c/texmf.cnf
Then find the entry

openout_any = p

p is the paranoid setting. I changed it to r and it now works again (chapeau to dmj).

[update 31 Jan 2013] If sudo is not an option and thus texmf.cnf can’t be changed, see Sini’s helpful comment below. [/update]


If you want to learn about multiple bibliographies using multibib, there is a very good tutorial by peisistratos. Unfortunately it is in German, but I’m sure there are English ones out there, too.

.htaccess redirect with GET variable

posted in: Technicalities, www | 0

I wanted to rename a part of this website and I knew, I needed a 301 in order to redirect people from the old to the new address. It was easy to find out that this can be achieved through .htaccess and the basic needs were also pretty easy to gather. Create a text-file called .htaccess on your apache-web-server in the root directory of your website. It needs to contain the following two lines to switch the module on:

RewriteEngine on
RewriteBase /

Then, for the actual rule there’s a lot of generally helpful stuff out there – only it didn’t help me:

  1. the string in question was a GET-variable as part of a dynamic URL
  2. the string could be in the middle of the URL or at the end

My task was to replace a chunk from a dynamic URL and leave unchanged whatever was before or after this chunk.

The example was the page you’re reading at the moment. It used to be called »Recettes« and I wanted to rename it to »Recipes«.

The overview was reached through, but this article had the URL In addition this page has groups, so there is also, […]group=ubuntu etc.

It took me literally hours of research, until I finally found Carolyn Shelby’s very helpful article. Her code took me almost there:

RewriteCond %{QUERY_STRING} ^(.*)Recettes(.*)$
RewriteRule ^$ Recipes? [R=301,L]
This would take any URL containing the string »Recettes«, no matter where in the url it was, replace it with »Recipes« – and loose everything that followed. Now, Carolyn’s last example contains something she could have been doing if her strings were consistent:

RewriteCond %{QUERY_STRING}...   READ MORE

The Right Password Manager

posted in: Other, Technicalities | 0

A guy got hacked recently. He calls the incident »epic« which may well be true from his personal point of view. Also, the apple/amazon shortcomings in handling his sensible information are downright preposterous, but there were a couple of mistakes at his end that made the scope wider than it had to be and the effect far more devestating than necessary.

For instance he did show an epic laxness concerning his personal data by not obeying Schofield’s 2nd law of computing. It states »data doesn’t really exist unless you have at least two copies of it.« I do obey this law by using backintime and I recommend you use something similar.

The guy also daisy-chained password-resets and email-accounts, offering a single point of entry to his digital everything. This got me thinking about my own passwords. They are generally very strong and I have a lot of different passwords. Sometimes too many different ones, so I keep forgetting which ones I used where. But sometimes not enough different ones, as some applications share some passwords. This needs to change, so it is time for a password manager.

[update 30.8.2012] I installed KeePassX a while ago and am quite happy. I thought I had found the perfect combination when Nic mentioned the open source self hosted oneCloud, but I failed. Looking for another solution, I went for ubuntu one.

Ubuntu one does not support android 1.6 any more, but ES File manager does. And it also does support ubuntu one.

[update 26.9.2019] Bill of Pixel Privacy sent me an article on passwords which has a lot of interesting facts and figures. So if you think all this doesn’t concern you, you might want to check it out:


What are the options?

for *nix-based systems
+ independent from KeePass but they share a db-format, so you can port stuff
+ GNU & Open Source
? Any connection to KeepassX?
+ Has a portable version
+ independent from KeePassX, but uses same db-format, so you can port your stuff
needs wine or windows


xubuntu 12.04

posted in: Linux, Technicalities | 0

Way too many issues with a first attempt drove me to the decission to reinstall. I had a look around and made eye contact with fedora, arch and debian but in the end thought I’d give a clean xubuntu installation a second chance – and I did not regret it. Here goes:

1. Installation from LiveUSB

First surprise:No issues. Only: apparently all of a sudden my computer needs a /boot partition, so my partition map looks like this:

1....   READ MORE

Feeds a la Tiny Tiny RSS

posted in: Technicalities, www | 3

[update 2012-10-04] In the meantime, I helped Nic with what he calls scratching some itches for ex-Google-Reader users: we now have gritttt, and gritttt has a) a means to import shared/stared items from g-reader into tt-rss; b) drive-by sharing, meaning you can share any page in tt-rss on the fly; and c) a widget that can display the latest shared items from tt-rss on your website. More here. [/update]

[update 2011-11-10] Both this and Nic’s article have been featured on tt-rss’ project site. There are a bunch of other interesting and useful articles, too, so check it if you’re interested in tt-rss. [/update]

A while ago, Google updated their reader, killing one of the best features: sharing. I looked around a bit for a suitable alternative and in the end settled with tiny, tiny rss.


  1. It runs on my server, so nothing can be done to it unless I approve
  2. Sharing is easy
  3. It’s simple

Nic, who thankfully came up with this great alternative, has a more techno-philosophical article on the switch.

Some minor issues I had while installing:

1. open_basedir not supported

Problem: during installation I got the fatal error

php.ini: open_basedir is not supported

Solution: Open <tt-rss-root>/sanity_check.php and find the entry Update: in recent versions it’s in <root/include>

if (ini_get(“open_basedir”)) { $err_msg = “php.ini: open_basedir is not supported.”; }

Comment it out (using // at the start of each line).

All credit and a major hat tip goes to demaya.

[update 2011-11-22:]

Solution 2: see here (thanks to Reperiam for his comment below pointing it out.)


2. No folders after import

Problem: In Goolgle Reader I had organised my feeds in folders, they were gone in tt-rss

Solution: Before importing, go to preferences in tt-rss and enable feed categories

3. OPML-Import error/timeout

Problem: On importing the OPML I had a timeout in Firefox and the following error in Chrome:

Exception: TypeError: Cannot read property ‘innerHTML’ of null Function: opmlImportComplete()

TypeError: Cannot read property ‘innerHTML’ of null

at opmlImportComplete (http:///prefs.js?1320259102:791:35)

at HTMLIFrameElement.<anonymous


at HTMLIFrameElement.onload


Solution: Ignorance. Apparently it’s not a tt-rss problem but one of the browser, so just ignore it.

4. Cache needs to be writable

Just make sure that on your server


Strikethrough in LaTeX

posted in: LaTeX, Technicalities | 11

Today I found a second way to achieve a strikethrough in LaTeX (what is done by »line-through« in css: strike out text). If you want to put a line across text, your choices are »ulem« and »cancel«:

Strikethough in LaTeX using »ulem«

\usepackage{ulem} in the preamble gives you two ways to strike out text (and a couple more for underlining):

  1. \sout{text


Position:Absolute in LaTeX

posted in: LaTeX, Technicalities | 0

In css there is the handy absolute positioning. Today I found out how to do it in LaTeX:

In the preamble


In the document

    Lorem ipsum dolor sit amet

The arguments...   READ MORE

ΛαΤεΧ in Greek

posted in: LaTeX, Technicalities | 0

There are various possibilities to include Greek text in your LaTeX document. The three ones I found are these:

  1. $\Gamma\rho\varepsilon\varepsilon\kappa$ gets you Γρεεκ allright, but it looks clumsy and lacks all the accents etc.
  2. betababel. It does not work with my customised control sequences, and I am too lazy to change them and learn them all anew.
  3. polutonikogreek. Neat, slim, worked straight away.

Nos. 2 & 3 use ngerman, so make sure they don’t start a fight with german.


I had a slight problem with polutonikogreek and titletoc. Whenever I used something like
which referred to this entry in the preamble:
the .toc-file looked like this at the corresponding place:
\contentsline {section}{\numberline {1.1}KAPITEL-1.1}{14}
\contentsline {subsection}{\numberline {1.1.1}UNTERKAPITEL-1.1.1}{14}
\select@language {polutonikogreek}
\select@language {german}
\select@language {polutonikogreek}
\select@language {german}
\contentsline {subsection}{\numberline {1.1.2}UNTERKAPITEL-1.1.2}{20} […]
Wherever \select@language appeared in the toc, the styling of my toc entries of the subsection level was being messed up. I style subsection entries in the toc in a way that they all get written in a single line. It looks like this:



Custom Counter in LaTeX

posted in: LaTeX, Technicalities | 0

How it does work:

Here is what we do: We define the counter

then we add


after it, and it works. Thanks to Axel for his help on this.

How it does not work:

When you define a new counter like this


And later use it like this

\roman{MyCounter}. Beispiel eins

And then...   READ MORE