How to get English error messages on a localized Ubuntu?

Have you ever noticed that oftentimes people in anglophone forums will almost be offended if someone quotes an error message in their local language? Well, on one hand I can understand it, on the other I see more value in providing a copied+pasted error message in whatever language rather than some machine-translated abomination which makes it incomprehensible to readers trying to answer the question and the native speaker posting it alike 1.

But what if we could simply convince our programs to spit their errors in English and at the same time diagnose an error that is locale-specific? Turns out we can. On Ubuntu the en_US.UTF-8 locale always seems to get installed as a fallback. So if we ran apt-get update as ordinary user, it’d tell us in plain Russian that it can’t acquire a lock:

oliver@rukubuntu:~$ apt-get update
E: Не удалось открыть файл блокировки /var/lib/apt/lists/lock - open (13: Отказано в доступе)
E: Невозможно заблокировать каталог /var/lib/apt/lists/
E: Не удалось открыть файл блокировки /var/lib/dpkg/lock - open (13: Отказано в доступе)
E: Не удалось выполнить блокировку управляющего каталога (/var/lib/dpkg/); у вас есть права суперпользователя?

If we wanted the same phrased in plain English instead, we could set the LANG variable for this single invocation of apt-get.

oliver@rukubuntu:~$ LANG=en_US.UTF-8 apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Neat, eh?

// Oliver

  1. there is of course still the chance that the OP will be able to provide a sensible translation. []
Posted in Administration, EN, Linux, Software | Tagged , , | Leave a comment

Clever indeed

Just for giggles and some test I installed Kubuntu in Russian and it turns out that the “Д/н” prompts can also be acquitted with y or n as one would expect. Otherwise I would have been in a kerfuffle as I installed the system in Russian, but the keyboard as US-English 1.

It’s a positive surprise to see that I can get through system administration tasks with the default English responses whenever I need to. Kudos to whoever made that decision!

// Oliver

  1. I actually prefer US-English keyboards for my daily work and use only those on all my machines. Not surprising it’s convenient on US-English keyboards … after all most programming languages come from an anglophone background 😉 … []
Posted in EN, Linux, Software | Tagged | Leave a comment

Bizarre

And I don’t mean the fact that “Kindergärtner” in German describes the kindergarten teacher, not the child. Bizarre is that a five year old girl – in all seriousness – gets suspended for suggesting to another kindergarten child that they should “shoot” each other with bubble guns. Perhaps the teachers should also intervene when balls get thrown at other children, for example?

Ans what really threw me off when reading this: there is actually a file for five year old children? In a country in which the people takes pride in fighting a nation-wide ID this is quite something. I for one will file this under: you couldn’t make it up.

// Oliver

Posted in EN, Opinion, Thoughts | Leave a comment

Imagine this a 1000 years ago …

When I look at the majestic and at the same time scary images of the meteorite fall in Russia (e.g. here), I’m wondering what impression this must have made on humans a thousand years ago.

Or imagine something like that during the time of the cold war. Well possible someone would have pushed the button.

// Oliver

Posted in EN, Thoughts | 2 Comments

Let us hope this pans out for the PSF

Read the article over here: Python trademark at risk in Europe: We need your help!.

I really hope this backfires so hard that no one else will try similar things on well established names that have been spread by non-profit organizations.

// Oliver

Posted in EN, Python, Software, Thoughts | Leave a comment

Unimaginable?

The media doesn’t seem to deem it possible that just about any catholic man could rise to the position of pope. Let’s face it, they’re probably right. Only cardinals have been elected for hundreds of years now. Similar to the resignation of a pope which hadn’t happened for nearly 600 years until now.

// Oliver

Posted in EN, Opinion, Thoughts | Leave a comment

Ich will den Wulff zurück!

Jedes einzelne Mal wenn ich unseren aktuellen Grüßonkel und Bundespräsidenten sehe, wünsche ich mir Wulff zurück. Der hat zwar auch gelabert, aber unterhaltsamer war er allemal.

// Oliver

Posted in DE, Meinung | Tagged | Leave a comment

A few websites I like when improving my Vim skills

http://vimcasts.org
http://www.vimdrills.com
https://www.shortcutfoo.com

Posted in EN, Software | Tagged | Leave a comment

In which Hg repo is the hook getting executed?

REPOPATH=$(hg showconfig|sed -n 's/^bundle\.mainreporoot=//p')

Based on this, btw, I came up with the following hook in the hgrc file:

[hooks]
changegroup.bundlerepo = hg bundle -a $(hg showconfig|sed -n 's/^bundle\.mainreporoot=//p')/.hg/bundled.hg

The idea is to create a bundle with all revisions whenever a new group of changesets gets pushed to the repo.

// Oliver

Posted in EN, VCS | Tagged | Leave a comment

Mercurial woes

Today I stumbled over an awkward issue. Pulling from a repo mounted read-only I always got:

searching for changes
adding changesets
transaction abort!
rollback completed
abort: index [filename] is corrupted!

where the filename would differ. First I tried downgrading my repo as pointed out here. Why? Well, I had the dotencode issue before, so I reckoned it should be the same. Unfortunately it wasn’t.

What I am doing now instead is to bundle the source repo and put it up as bundle on the read-only location. This seems to work now.

// Oliver

Posted in EN, VCS | Tagged | Leave a comment

Noch so eine Entdeckung …

  • Isländisch: stígvél
  • Deutsch: Stiefel

Erkennt noch jemand außer mir die Ähnlichkeit?: að stíga bedeutet zu steigen bzw. zu treten. Der Wortteil vél bedeutet heutzutage Maschine oder Motor.

Ich habe das Gefühl, daß es sich beim isländischen Wort um die ursprünglichere Form handelt von dem auch unser heutiges deutsches Wort Stiefel abgeleitet ist. Ist natürlich nur so ein Bauchgefühl. Bin kein Sprachwissenschaftler.

Übrigens handelt es sich bei stígvél um eines der Worte bei denen ich ganz ohne Hilfe auf die Bedeutung kam – und zwar aufgrund der Phrase: stígvélaði kötturinn. Wobei ich das zweite Wort bereits kannte.

// Oliver

Posted in DE, Gedanken, Island/Iceland/Ísland | Tagged | Leave a comment

Re: Oh the pain

Referring to this earlier post.

In November a person from their complaint department 1 contacted me and told me I would get a replacement.

He arranged it so that I would receive it on short notice in December, during my brief stay in Germany. And all went well. I got the replacement laptop (Elitebook 8770w) about six hours after my arrival. They allowed me one week to migrate my stuff over to the new laptop – which was sufficient. It then got picked up by another company the week after.

The new laptop has been a lot more stable ever since. It’s a whole different way of working without the constant fear of it crashing in the middle of some unsaved work. Let alone the problem to get back to the state you were at when it crashes, even with the work saved.

After an odyssey of of nearly ten months I’m glad this finally worked out. But I think it is also just to point out that it worked out and how. Let’s praise HP where that praise is due.

// Oliver

PS: there was a minor nuisance with the new – slim – power supply that was included with the new laptop. It made this buzzing noise that sounded like a fan or some short circuit at the open air. Although I would have liked this lighter and smaller power supply, I decided to send this one back and stick with my old one. Most of the time I use my laptop as a stationary workstation, so it’s of no relevance.

  1. as I understand a different company []
Posted in EN, Opinion | Tagged | Leave a comment

Verdicts in the IceSave case available

Posted in EN, Island/Iceland/Ísland | Leave a comment

EU-Bürger: Unbedingt unterschreiben!

Es geht darum die EU-Institutionen zu zwingen sich mit den Privatisierungsplänen in der Wasserversorgung noch einmal auseinanderzusetzen: right2water.eu

Posted in DE, Meinung | Leave a comment

Webdesigners who don’t want me to use there website

… are the ones to use some fancy JavaScript snippet to display a black box saying “You need Flash player to see this” or something similar instead of letting me activate Flash on demand. Opera has the setting as long as I can remember

Opera preferences dialog, content preferences page

and Firefox just recently got it under about:config under the name plugins.click_to_play (which should be true to prevent Flash content from loading automatically).

Meh. Annoying!

// Oliver

Posted in EN, IT Security, Thoughts | Leave a comment

Tmux is great … (but how to build on Lucid Lynx?)

… only a few troubles to get it to build on Ubuntu 10.04 LTS 😉

Basically you’ll want libevent2, which doesn’t come in the package repos, so fetch it from here. Then you obviously fetch the tmux source via tmux.sourceforge.net and then it’s easy (until you try to run the resulting binary 😉 ).

Assume you have the two files in a sub folder of your home folder, called tmux.

$ ls
libevent-2.0.21-stable.tar.gz  tmux-1.7.tar.gz
$ tar -xzf tmux-1.7.tar.gz && tar -xzf libevent-2.0.21-stable.tar.gz
$ ( cd libevent-2.0.21-stable/ && ./configure && make && sudo make install )
# loads of output ...
$ ( cd tmux-1.7/ && ./configure && make && sudo make install )
# loads of output ...

Now you’ll notice the man page is installed properly, but trying to run tmux fails like this:

$ tmux
tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

Why is that?

$ locate libevent-2.0.so.5
/home/oliver/libevent-2.0.21-stable/.libs/libevent-2.0.so.5
/home/oliver/libevent-2.0.21-stable/.libs/libevent-2.0.so.5.1.9
/usr/local/lib/libevent-2.0.so.5
/usr/local/lib/libevent-2.0.so.5.1.9

So the files are there, why does tmux not find them? The most likely reason is that ld.so, the dynamic loader, doesn’t know where to look for it. So let’s check:

$ grep -R local /etc/ld.so.conf*
/etc/ld.so.conf.d/libc.conf:/usr/local/lib

So it does know about the folder. And it certainly should be able to find the correct file. No conflicts about the bitness used for either one either:

$ file $(readlink -f /usr/local/lib/libevent-2.0.so.5)
/usr/local/lib/libevent-2.0.so.5.1.9: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
file $(which tmux)
/usr/local/bin/tmux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

I’m still puzzled about why I can explicitly tell the dynamic loader to look in /usr/local/lib via LD_LIBRARY_PATH but it ignores the default setting in /etc/ld.so.conf.d/libc.conf. However, the workaround to get it to run was for me:

$ LD_LIBRARY_PATH=/usr/local/lib tmux

My final solution, however, is to statically link tmux using the following ./configure line and make to build a tmux binary:

$ ( cd tmux-1.7/ && CC='gcc -static' ./configure --enable-static && make && sudo make install )

That does the job.

// Oliver

Posted in EN, Linux, Programming, Software, Unix and unixoid | Tagged | 4 Comments

The stubborn guy in me …

Several times now I have been invited to the US by couch surfers I hosted and even by other people. Most of them are stumped at first when I tell them that I’ll probably never take them up within my or their lifetime due to the political situation. It almost sounds like a bad motto from the cold war. Not so. What I am referring to is the way travelers are are being subjected to – euphemistically speaking – a level of scrutiny that quite frankly appalls me. The land of the free and home of the brave has decided, sometime after 9/11 (2001, I should add) to lock down their country and treat visitors as criminals. The only thing that is worse is the way the EU countries (and others) seem to follow suit.

Turns out most of the US citizens I meet are very understanding once they here about it, or know about it already and acknowledge the problem.

While before the first world war virtually all borders where toll borders and didn’t much impair traveling, we seem to get to a point where traveling freely 1 becomes virtually impossible in the near future. So much for globalization, eh?

// Oliver

  1. as in unencumbered by ridiculous treatment of some border control officer []
Posted in EN, Germans have no notion of sarcasm, Human Rights, Thoughts | Leave a comment

Vimcasts.org …

Great website to learn about Vim. I can also warmly recommend the book Drew wrote: Practical Vim. If you have bought the hard copy via some other way than the website of the publisher, you still can get a nice discount on the ebook. Check out the last page inside the book for details.

And after taking the “Vim master class” I still don’t feel like a master, but I feel empowered and know better where to turn for answers and how to perform repetitive and why solution abc is better than xyz. Great stuff and therefore I warmly recommend the course as well.

// Oliver

Posted in EN, Opinion | Tagged | Leave a comment

Russian whores want to chat with me? Really …?

Spam spam spam-a-dee-spam …

Don’t get me wrong. In a sense I admire the women who decide freely to prostitute themselves. It certainly takes courage and guts. I only think that the majority of them don’t get to decide freely but instead have to do it out of some need, be it financial (most likely) or because of an addiction (which also boils down to money in the end).

I’ve seen Russian women, i.e. the superset of the “advertised” type of women, and some of them are … well, appetizing in a superficial way … but many of them are covered in so much make-up that you’d have to scrape it off half the night before you get to see the real woman behind it. And there are beauties among them, so why do they hide behind this mask of make-up? On the other hand I had an assignment once in university with three other students, two female, and another one and I male. Let’s put it this way: one of the females (superficially seen less attractive 1, but I suppose I am sapiosexual so I’m enchanted by other values primarily) did the biggest part of the work and the other two didn’t even prepare to present it afterwards. However, the Polish professor was so enchanted by the two “charismas” our Russian female presenter had to present at chest-level and her overall fashion and make-up, that we got an excellent grade even though we didn’t deserve it – for the presentation alone sucked.

Anyway, back to the topic. Being a single what exactly would a “whore”, sticking to the terminology in the received spam mail, be able and willing to give other than *cough* “sexual services”? I mean this literally appeals to the most basic instincts men – and I don’t exclude myself from that set – can have. I’d have to be mentally impaired by means of huge amounts of alcohol and/or other drugs to even consider this for a moment. So is the link given in those spam mails merely trying to lure me into visiting a website that exploits the latest Java security hole or what is this about? Are we – the male population of planet Earth – really so dumb (collectively) to fall for this so that sending this spam out in masses will yield any results? Are feminists right after all and all the blood rushes from the brain into another part of our body which then also assumes the function of thinking, or lack thereof? …

Perhaps it’d been better the world as we know it had ended on 21st last year then … 😕

// Oliver (pretty confused, but not: pretty, confused ;))

  1. she was smarter, though []
Posted in EN, Germans have no notion of sarcasm, Opinion, Thoughts | Tagged | 3 Comments

Ein Schelm …

Das BSI warnt vor Java, BMF erzwingt Java. Daß der Minister im BMF vormals im BMI war und unter anderem den Bundestrojaner als Projekt hatte, sollte nicht weiter beunruhigen. Irgendwie muß das Ding doch auf die Millionen Rechner im Land kommen. Wie denn besser als indem man alle zwingt eine fragliche Software zu installieren die seit Jahren nur so vor Sicherheitslücken strotzt? So spart man sich eine Menge Mühe und Zeit. Rein finanziell, also aus Sicht des Steuerzahlers, eine gute Idee. Oder?

// Oliver

Posted in DE, EDV-Sicherheit, Gedanken, Meinung | Leave a comment