Xenophobia? Reloaded!

It's no news to me that Germans tend to be arrogant and condescending; the fact that there is no word for self-deprecating being a case in point. In Berlin, a city that thrives predominantly on foreigners, you witness racism every day. The other day I overheard a discussion whether it was acceptable to use »Jänner,« the Austrian word for January, in a German newspaper article!

I was just made painfully aware that this concerns the very centre of society, not just some fringe groups like the yellow press or lower classes. I was briefly browsing German headlines, something I don't do very often, and came across two articles published within half an hour concerning the Newtown, CT shooting.

Aber kann das Bild der Idylle in einem durchmilitarisierten, waffenvernarrten Land wie Amerika etwas anderes sein als eine gefährliche Illusion? [FAZ]
Derweil fordern Experten eine Verschärfung des Waffenrechts – und rühren damit an die Grundfesten des amerikanischen Selbstverständnisses. [FAZ]
I didn't bother to read the rest of the articles, but the tone in the teasers already shows such a violent aggression against the United States and as usual is linked with the apparently self-evident conviction of German superiority.

Given where this may be heading, not wanting to be on the wrong side could be one reason to live in Germany. But is it enough?

LanmanServer error 2017 when accessing shared folder

Recently I again had a problem accessing a folder shared by a Windows 7 machine from Windows XP, causing "System error 58 has occurred." on the client and event #2017, "The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations." on the server.

I found the frequent advice to set HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size to 3, but since I had the luxury of not having any other connected clients, I just restarted the LanmanServer which is provided by the imaginatively-named "Server" service.

What a country!

Well, you could probably say I'm still not fully adjusted to my new surroundings.

This is very much an offline society. There are extremely few public services and sources of information available online, such as about the budget and other political matters. Those that do exist are privately run and in constant danger of being sued into oblivion. Likewise, trying to achieve any official business like registration, passport matters etc. online is completely in vain, as is getting doctors' appointments and the like.

For years while living in the UK I have done a large part of my weekly grocery shopping online. Not having a car meant it was much easier to do a large bulk order and have it delivered, rather than transporting everything with my bicycle. All big supermarket chains in the UK offer online delivery within a selectable one hour time slot for a fee of £3.50 or free if the order is above £100. I also happen to think that it's ecologically sensible for one lorry to do a delivery round rather than every family driving to the supermarket in their SUVs. Of course, German supermarkets offer neither automatic check-outs to reduce queueing times nor online delivery nor even just a way to check their product range online. No surprise there.

The only way for a German edition of Wikipedia to exist in Germany is by constructing it such that only the domain name is run by a German branch of the federation while all content is being hosted in the US, a liberal and democratic country by comparison. As with the remaining WWW, 10 years have not been enough for German society (and by extension, its legal system) to accommodate a freely available encyclopædia.

This must also be the only country where WiFi in cafés and coffee shops is actually receding because of a brain-damaged interpretation of the law to make ISPs liable for any wrongdoings of their customers — yay for shoot the messenger!

Why is there virtually no online television? On the weekend, I wanted to watch the flagship show Wetten dass (I won't even dwell on the fact that it's now a 30 year old concept). I had to discover that only short snippets of the 3h show are available online.

There is still practically nobody who sells electronic books in Germany at a time where sales have long overtaken those of the dead tree variety in countries like the US and the UK. The consensus seems to be along the lines of »an e-book reader has no soul and looks silly on the bookshelf« — fair enough, I always thought books were mostly about the content.

Online services like Google Street View and YouTube are largely unavailable in Germany because the legal system has not been able to accommodate them 20 years after the WWW's creation. Street View doesn't even exist outside of a few select locations, and like millions other videos, YouTube's most-watched (400m) and most-liked (3m) video is unavailable to watch in Germany.

This society has such a stubborn aversion to change, technology and progress in general that it's amazing there is still such a strong self-confidence about leading the world in those very areas.

It's telling to observe the ludicrous consensus about what is forwards: questionable undertakings such as rebuilding Frauenkirche and the surrounding »original« centre of Dresden is counted as »progress«, as is the addition of grassroots elements to a parliamentary democracy.

If there was at least some decency to be content in the conviction of sociological and technological leadership. However, on top of all that, it really takes a country that hallucinates a »Leitkultur« for itself to become as condescending and patronising towards other nations as this one.

Building and cleaning Visual Studio projects from Explorer

I tend to have lots of project directories and sometimes I just want to build or clean them.

Rather than opening each solution in an instance of Visual Studio, I added items to Explorer's right-click menu. It doesn't look particularly elegant yet, but it works quite well:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build\Command]
@="\"c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\msbuild.exe\" \"/maxcpucount\" \"/target:build\" \"%1\""

[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Clean\Command]
@="\"c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\msbuild.exe\" \"/maxcpucount\" \"/target:clean\" \"%1\""

Blocking and unblocking downloaded files on NTFS

A downloaded file that is protected (»blocked«) by Windows because it is potentially unsafe can easily be unblocked using Explorer's Properties->Unblock.

But how does it work?

The security zone is stored in an NTFS Stream called Zone.Identifier.

$ more < file:Zone.Identifier
[ZoneTransfer]
ZoneId=3
The Stream has the usual INI format. This is how to create one manually for a random file in order to block it.
$ echo [ZoneTransfer] > file:Zone.Identifier
$ echo ZoneId=3 >> file:Zone.Identifier
To see the streams present on a file you can use dir /r.
$ dir /r
04.09.2012  12:49                13 file
                                 28 file:Zone.Identifier:$DATA
I haven't found a way yet to actually delete a stream, but they tell me PowerShell 3.0 is going to be able to do it, or you can download a separate tool from SysInternals.

Booting GParted on MacBook Air 11" (late 2010)

I wanted to boot GParted-0.13.0-1 (kernel 3.2.0-3-486) from a USB stick on my MacBook Air 11" (late 2010) using the EFI bootloader which appears when holding down Option while turning on the laptop. However, only HFS+ partitions appear to be attached in a way that GRUB can see, but GParted's initrd cannot mount HFS+ (or even exFAT) partitions, saying hfsplus not found in modules.dep or exfat not found in modules.dep, respectively.

So I used Disk Utility to create a HFS+ as well as a FAT partition on the USB key and copied the contents of the GParted image into both partitions using

$ pax -rw

A possible optimisation would be to try and work out which files exactly are really required on each partition, but since GParted unly uses about 120MB space shouldn't be an issue even for small USB sticks.

Interestingly, whether the USB stick is partitioned using MBR or GPT doesn't make a difference.

After that, the MBA's EFI bootloader (hold down Option while turning on) shows two items called "EFI boot", the first of which should refer to the HFS+ partition. After booting, GParted's initrd then finds the required boot image on the FAT partition. GParted loads and runs successfully using default settings.

There was still another small hurdle before I could reset the SSD:

# hdparm -I /dev/sda
showed the SSD's Security state as frozen which disallows issuing the SECURITY_ERASE command. Googling revealed a trick to change the state to not frozen by putting the laptop to sleep and waking it up. Amazingly, simply issuing
# echo mem > /sys/power/state
and closing and pressing the shift key to wake it up worked perfectly. If you're working on a detachable disk, it also helps to only attach the disk once GParted has booted.

Note: I tried again using GParted 0.19.0-1 (kernel 3.14). I had to select "VGA" mode in the boot menu in order to make X start and waking up from sleep didn't work. So I used 0.13.0-1 instead.

Broken "DNS relay" in DLink DIR-615

In my student days, I owned a DLink DI-624+ router. It needed resetting at least once a day and even more often under heavy use. Not exactly the behaviour you look for in a router... After this experience I vowed never to waste time on DLink hardware again.

As it happens, I just got a DLink DIR-615 router with my new cable connection. It has a setting to turn the "DNS relay" function on or off. I left it turned on because it was the default and I've always configured my routers to act as DNS servers -- if only because it enable neat little tricks like accessing the router as "dlinkrouter" (which doesn't work over WiFi, by the way).

I then noticed that my IM client failed to connect to several of my Jabber accounts (also known as XMPP). As it happens, the SRV records for those accounts which are required to find the Jabber server for a given e-mail address were not returned by the DNS server. After some digging around (intended pun: dig srv _jabber._tcp.domain.com) it eventually dawned on me that the "DNS relay" in the DLink router was eating those SRV replies.

Needless to say, after turning off the relay "feature," my IM clients could happily connect to all accounts again.

I'm now replacing the DLink router with an AVM Fritz!Box I have lying around...

Edit (January 2015): salvation for the DLink router was found at DD-WRT.