- Entries : Category [ digital ]
- Things having to do with digital world items go in here.
17 October 2005
IE Bug Bitten
Internet Explorer Cannot Save to Cache error
We had been bitten by another IE bug here with the application we're building. Our customers using IE6 got a message "Internet Explorer can not save to cache", whenever they tried to save an image. Our application is working over https and puts out "Cache-Control: No Cache" headers. These are some ingredients that trigger the "cannot save to cache" bug in lame Internet Explorer 6. After suspecting my own code for a while and changing stuff around to check, I STFW (searched the f* web) and came up with that M$ support page. In case it goes away, here is the info in short:
- Affects only https pages.
- In the IE options/settings, having "Do not save encrypted pages to disk" checked will trigger the bug.
- Server sends "Cache-Control: No Store" or "Cache-Control: No Cache" head will trigger the bug. (Of course in secure applications I am quite often interested not to allow caching of stuff, to avoid having your confidential documents end up in some web cache for everyone.)
- There is no fix yet from MS, even if there will be you would have to convince every user with IE to upgrade. Good luck.
Workaround for Zope: I added a line to my python script...
this just overrides the header for this one method. It's not perfect, but it works for now.
19 October 2005
Switching to reject_rbl_client on Postfix / Mac OS X Server
Messing with the config file
On a Mac OS X Server 10.3 machine, the config file was having lots of warnings:
restriction reject_maps_rbl is going away.
Please use reject_rbl_client instead
I was searching up and down on the web to find out what exactly would be the right way to get rid of the warning. The problem is that I did not find where Mac OS X server stores the records from the GUI "Server Admin", so I could not "automatically" include them. (BTW: #postfix on freenode won the price for this weeks most unhelpfull irc channel this month, a well formulated question with a lot of background info and it gets ignored like it's a metaquestion from a known lamer? Go back to talking about beer, #postfix.) Read on for the solution...
Now I have the blacklist servers only in the /etc/postfix/main.cf file. The line in the main.cf file was:
And now it is:
permit_sasl_authenticated was needed, because without that clients who wanted to relay using SMTP AUTH were denied too, based on some blacklist. On another note, to wrap lines in postfix config files you add whitespace on the start of the line, it's not using the common format of escaping the line break with \. Generally I think postfix configs are not better than sendmails, you still have to dig through a lot of weirdly named keywords to find the one that does what you want.
Listen to iPod While on Hold
Stuffing an iPod Shuffle in a company phone system
Our new company phone switchboard can play music while callers are waiting "on hold"... off an iPod Shuffle. Our boss was not satisfied with having callers listen to some lame synthiepop Mozart castration, instead callers should be able to listen to the likes of The Cure, The Stones, Pink Floyd, and other similar bigshots. The phone center hardware has an audio input to hook up something like a portable CD player, but one CD is certainly not enough. So an idea came up...
The iPod shuffle holds much more music than a CD, it can do random playback. Why not hook up that one? No moving parts means less breakage, energy consumption is pretty low, sound quality certainly is good enough, loading up new music is a snap.
Connection was easy enough with an audio cable. Energy was a bit more of a problem, the battery lasts only 12 hours, not enough for 365/7/7, so charging the device was needed. First stop was USB, because that's the shuffles port and the ISDN connectors have USB connectors. But both systems want to be clients (peripherals), not computers. Plus it was not possible to find a matching converter cable, so we could not test out if the shuffle would charge off the ISDN equipment.
In the end we found out that a "wall-wart" 220V USB-charger adapter, bought from Apple, would do the job. The shuffle fits right on to it, making a mounting point for the device unnecessary. The pictures are a bit hazy, but one can make out the shuffle on top of the ac adaptor, plugged into the T-piece electricity outlet. The black cable on the first pic is the audio cable to the telephone switchboard. The Shuffle itself is the smallest part of all the installation.
25 October 2005
Comment Spammers from easymanaged.com?
Stepping into an ugly mess
Some (new?) spambot is trawling my site lately, possibly looking for open comment forms. I see some of them coming in from hosts like nac6.easymanaged.com (18.104.22.168) and nac3.easymanaged.com (22.214.171.124). Searching the web for references to easymanaged.com shows lots of guestbook and bulletin board bot entries and a page on the "Spam Huntress" weblog (and following to this one about "new master spambot"). Tracerouting those IPs reveals that they seem to go through 0.so-7-3-0.gbr2.mmu.nac.net -- which belongs to nac.net (Net Access Corporation, a spam-friendly hosting provider, who knows?). Maybe I'll send the URL of this post here to email@example.com. Read on for a bit more details...
The bot lists several typical IE user agent strings. Typical for the log entries is that they don't load images or css files and that the referrer is the same page that it accesses, but without the ending slash. Some samples:
126.96.36.199 - - [25/Oct/2005:15:10:17 +0200] "GET /blogs/ch-athens/112/ HTTP/1.1" 200 6917 "http://betabug.ch/blogs/ch-athens/112" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1)"
188.8.131.52 - - [25/Oct/2005:15:19:10 +0200] "GET /blogs/ch-athens/89/ HTTP/1.1" 200 5616 "http://betabug.ch/blogs/ch-athens/89" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
184.108.40.206 - - [25/Oct/2005:15:24:49 +0200] "GET /blogs/ch-athens/88/ HTTP/1.1" 200 6257 "http://betabug.ch/blogs/ch-athens/88" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
The rate of access is not very high, the bot is possibly trying to avoid throttle defenses. It sounds very much like this bot is just searching for blogs/guestbooks/bulletin boards to spam, while the spamming itself will be done by another bot (what "Spam Huntress" refers to as "master spambot"). Filtering them out could be done at the IP level, untill they move on to another provider.
UPDATE: It seems my thoughts on Net Access Corporation were right, see this Senderbase report on Net Access Corporation showing lots of SPAM coming from their IPs.
15 November 2005
Interactive Fiction Interpreter for the P910i
Finally playing it out in text
For a long time I had on my to do list the idea to find an IF interpreter to play text based adventure games on my mobile phone. Something like I mentioned (in German) on my ages old if german page. Finally I found what I was looking for, after being reminded by this story about Interactive Fiction appearing in the online Wall Street Journal on slashdot. What did I find? On this page from a company called Malinche Entertainment a link to Frotz UIQ (download).
19 November 2005
Editor Wars: Keyboard Shortcuts for Regex
vi rules (once more)
In the book "Code Reading" by Diomidis Spinellis, there is a small
table about what commands are needed to search in code editors. (Section
10.1 "Regular Expressions" serves to remind programmers that regular
expression can be a powerfull tool when trying to find your way around
foreign (and own) source code. As a vi user I think the table is
incredible funny and revealing:
|Table 10.2 Regular Expression Search Commands
in Popular Editors|
||Forward Search Command
||Backward Search Command|
||C-M-s [b] isearch-forward-regexp
||C-A-s [c] regex-search
[a] After performing a regular expression toggle.
Of course you might not get my fine point here. So let me explain
what I learned: First, there are some editors around that I have never
heard of, like "BRIEF" and "Epsilon". But the highlight is the
complexity of these commands. In vi it's just one single
character for each, while others have something that I can only
assume to be menu commands, not to mention three letter salute keyboard
shortcuts. Of course it's maybe harder to grab the concept of vi
editing, but once you got it, you are rewarded with simplicity and no
waste of time for such an often used tool.
23 November 2005
Playing Around With a Blackberry
My boss just dropped a Blackberry on my table for me to play around with. I did, and now I am wondering: What is all the fuss about? It's just another phone with PIM. The form factor (especially the keyboard) reminds me of my old Treo 270, sans the flip. The wide format display sure may be more useable for ssh than the one in my P910. The display does not seem to be touch sensitive.
Having a quick look through the web for an ssh client reveals an open source one and a couple of weird commercial solutions, some of them in client-server setups. Also there seems to be some question of special blackberry coverage that needs to be available on your network. Does not sound like another field I would have to read myself into, if I can lazily avoid it. TCP/IP (over something like GPRS) is good enough for me.
The integrated web browser seems to download background images, but not display them. It shows my blog good enough (see screen on picture). The browser id string was "BlackBerry7290/4.0.2 Profile/MIDP-2.0 Configuration/CLDC-1.1". Traceroute to the connecting address was kind of funny. The machine seems to connect through Vodaphone Greece, but the traceroute went to some server in England. That client-server game again, I guess.
24 November 2005
Site was off for a while
Since I set up another virtual host today, I managed to mess up the virtual host setup in my httpd.conf. It took me some time to find out. So if you came here and got some funny error about "page zope not found", I'm sorry :-) Things should be up and running again. If you are interested to know what happened: I forgot to activate the NameVirtualHost directive. And when I had it set up, the wrong VirtualHost was used as default.
06 December 2005
Not matching settings name in M$ Knowledge Base
Typing is random
In the post "IE Bug Bitten" I wrote about a stupid IE bug that causes us and our customers trouble. Even though I used a workaround on our Server, today the bug bit me again, as likely customers have the setting that produces the bug again, even after the workaround is on the server. So I looked up that Knowledge Base article again.
Isn't it funny how badly confusing the M$ Knowledge base article is? The error description somehow matches what our customers experience, but not exactly. The error message is slightly different. Our customers get an error message that says something about not being able to save to cache. And I don't get the feeling that the difference is due to different Windows / IE versions. I think the Microserf in question was just too lazy to type it all in properly.
Even the name of the setting that has to be unchecked at the customers is not the same as on my test machine (IE 6.0.2600.000 - yes, you have to have 2600 in your IE version number to be truly 31337): The KB says to uncheck "Do Not Save Encrypted Files" while IE here has "Do not save encrypted pages to disk". A small difference, but if you can't even get this one right, how might the code look?
02 January 2006
Re: A lot of people must have had iPods for Xmas
Is there a real "reset problem" with iPods?
As Tor shows in his post A lot of people must have had iPods for Xmas, he has gotten a lot of referrers from search engines for people looking for phrases like "ipod hard reset". To which I just can add: Me too. "ipod hard reset" and "hard reset ipod" are constantly on the top of my incoming search phrases.
I guess that altogether ipod hard reset related stuff accounts for about 20% of my search phrases. Indeed when searching the major search engine for one of these phrases I am on the first page with the post Re: iPod hard reset and as mentioned in the previous post, that page is way up in my access stats. My post does not even spell out the procedure (Tor has it in his post about the topic). For some time my post was about on place 2 or 3 there, now it went a bit more below.
For me there is no gain, as most (>99%?) of these visitors don't stay on my weblog to see what interesting stuff might be here. And I don't think it's a "christmas only" phenomenon, I think there is a general problem with iPods, more on Windows than on Mac. As Tor says, lots of people got iPods for Christmas, so the problem comes to the surface.
08 January 2006
vim, Greek, and utf-8 Keyboard Commands
More progress, getting it to work with utf-8
Trying something I wanted to play around with for a long time, I made
more progress in setting up vim to work with Greek. As seen in the
previous posts about this topic there are some prerequisites to get this
working (especially on Mac OS X). To get keyboard commands work with the
greek keyboard too, you can use the map keyboard command, it's a bit
more tedious than langmap, but you can put it into your .vimrc and have
it always ready. Read on for details...
- You need vim with multilingual capabilities (multibyte support
compiled in), as described in State of Greek and UTF-8 in the Mac OS
X Terminal and in OS X you will have to set up your Terminal
- If you work with ISO-8859-7 (I don't), you can use the langmap
command, as described in Greek in vim
with langmap - only ISO-8859-7, on OS X more mucking around with
- If you prefer to work with modern Unicode UTF-8, as I do, you can
use the map command to assign the greek letters in command mode to the
latin character that command mode expects.
Let's go in for the details about using map:
The book "Learning the vi Editor" describes the map command as
While you're editing, you may find that you are using a command sequence
frequently, or you may occasionally use a very complex command sequence.
To save yourself keystrokes, or the time that it takes to remember the
sequence, you can assign the sequence to an unused key by using the map
The map command acts a lot like ab except that you define a macro for
vi's command mode instead of for insert mode.
So we can use the map command to define ξ to act like j, moving the
cursor down one line. We will therefore just define one map command for
each character we need. This would be tedious to do each time we need to
edit a greek file. That's why we put it into our .vimrc file and then we
are ready to use it anytime. Here is the part of my .vimrc file as far
as editing for Greek is concerned:
" greek stuff:
" always edit in utf-8:
" but be ready to change encoding with a couple of shortcuts:
map _u :set encoding=utf-8
map _1 :set encoding=iso-8859-1
map _7 :set encoding=iso-8859-7
" assign keyboard commands while using the greek keyboard:
map Α A
map Β B
map Ψ C
map Δ D
map Ε E
map Φ F
map Γ G
map Η H
map Ι I
map Ξ J
map Κ K
map Λ L
map Μ M
map Ν N
map Ο O
map Π P
map Q Q
map Ρ R
map Σ S
map Τ T
map Θ U
map Ω V
map W W
map Χ X
map Υ Y
map Ζ Z
map α a
map β b
map ψ c
map δ d
map ε e
map φ f
map γ g
map η h
map ι i
map ξ j
map κ k
map λ l
map μ m
map ν n
map ο o
map π p
map q q
map ρ r
map σ s
map τ t
map θ u
map ω v
map ς w
map χ x
map υ y
map ζ z
For this to work, we have to be sure to be using utf-8 encoding while
editing the .vimrc file itself. I believe you can use this in parallel
with langmap if you want to edit ISO-8859-7 and UTF-8 files.
Now my next target will be to get
spellchecking too, since my spelling in Greek is pretty bad :-).
31 January 2006
Awaiting Home Connection
Getting Internet at home finally
Yesterday I got a phone call from Vivodi. Looks like today a technician should show up at my home, installing ADSL (a meager 256/128k line) and phone service. It's been a looooong time that I had proper Internet access at home. Now of course there is still the chance that the technician will say something like "Oh, your [something] is not [like I expected | as it should be | as we always do it | the way I like it] here. And besided I did not have coffee yet. I will come back next month." So let's cross fingers and see what we get.
Next step will then be: How to get the connection to all the flatmates and to my room (which is on the other end of the flat from the likely location of the connection). Wireless? Ethernet over power line? Stringing a cable? We'll see.
01 February 2006
The Line Is Up
Yes, ADSL at home
Yes, everything worked. The technician from Vivodi came around at the
specified time. He was delighted to find my two flatmate-grrls there.
The installation seemed to have gone fine. I was already looking out to
get a wireless kit or some other means to get the net to my room. But
then I came home and discovered that the ADSL modem is also a router and
wireless access point. Nice.
Even nicer was the setup of the wireless: It was wide open. At least
there was a password on the admin account, but the network was open and
unencrypted, and the built in firewall was off. So as a first measure
I set up that stuff a bit, WEP 128, MAC address registration, and
the firewall will at least deter the lazier script kiddies. Anything
important will have to be encrypted anyway to go over the line. At least
my paranoia is well developped enough that I use PGP/GPG daily, have the
firewall on my personal machine on and use encrypted protocols for
everything I can. It would be cool to have a Soekris with OpenBSD to
secure the wireless, but that is currently out of the reach.
Oh, and the technician was really happy to have my flatmates around,
he gave them his phone number and reminded them to call him if they have
questions. "Any questions! Just call me!" Yeah, sure :-)
02 February 2006
Μαθαίνοντας Zope στην Ελλάδα
Learning Zope in Greece - Weblog
Στην δουλειά είμαι προϊστάμενος τώρα. Η Μαίρη και ο Ανδρέας με βοηθάνε και μαθαίνουν το Zope. Ενδιαφέρουσα κατάσταση. Από την μια πλευρά δεν είχα πότε "μαθητευόμενο" στον προγραμματισμό, και είναι ωραία να βλέπω πως μαθαίνουν, κάθε μέρα προχωράνε. Από την άλλη πλευρά πολλές μέρες μου σπάνε λίγο τα νεύρα που ρωτάνε συνέχεια. Για να τους έχω απασχολημένους, τους έβαλα να κάνουν ένα weblog Learning Zope in Greece. Έτσι...
- Μαθαίνουν πιο γρήγορα (γιατί για να γράφεις πρέπει να διαβάζεις και να σκέφτεσαι)
- Επιστρέφουν κάτι που μάθανε από άλλους (δεν υπάρχουν και πολλά για το Zope στα Ελληνικά)
- Μπορώ να βλέπω τι διαβάζουν
Κανονικά τους έχω πει να διαβάζουν καθημερινά την Zope mailing list, και να γράφουν κάτι για το τι διάβαζαν εκεί. Αυτό δεν έγινε (εκτός από μια φορά) δυστυχώς. Μήπως κάποια μέρα τους έρθει η όρεξη για κάτι τέτοιο. Χρήσιμο θα ήτανε σίγουρα. Άλλα και μέχρι τότε, το "blog" τους έχει πολύ ενδιαφέρον. Καλορίζικο!
08 February 2006
Greece Moves Forward To the Past in Informatics
"Strategic" agreement of the greek state with Microsoft
It's bad enough that a few days ago statistics showed us that only about 1 in 5 Greeks ever used a computer, and that most of those use it only for entertainment. Now the government went for the total sell-out. In a new agreement, they ensured that the states software will be from Microsoft for the next years... likely till 2013. Everybody is now wondering if there was ever a public call for offers for this deal. Likely not, the way it came just out of the blue. For the country this is a problem, since a monoculture is the opposite of a healthy informatics society...
The problem is that computers over here means badly maintained grey boxes, with a monoculture of (often stolen) M$ software. Not what you need to get a well educated group of people that can help you "propel the country into the 21st century" (or whatever bloat the politicians blast at the moment, in a couple of years the line with the 21st century will get old fast). When we were looking for a junior programmer at the place where I work, we had tons of resumes of kids who came out of university with the basic skills to use Windows and not much more. That may be fine and dandy if you think that MS software is the greatest and shiniest thing, but it is no way to compete on an international scale. When was the last time you heard of any IT project that got moved to Greece?
One could argue that it's all MS already, be it on the informal level (prescribing "Pentium" processors for acquiring computers for public offices) or on smaller scale agreements (lots of greek universities have "deals" with Microsoft). But the fact that it's already bad as it is does not make this step better. The tag-line of the agreement is that Greece gets "preferential" financial terms. Which means they will still pay a big, big deal.
As a weblog from Bulgaria mentioned (How a government must deal with Microsoft), the Bulgarians possibly dealt even worse. That guy admires the Greek government for getting out so much. But he is wrong. Look at countries like Thailand, and cities like Munich in Germany. You just have to wave the flag of Open Source software in the general direction of Redmond and you suddenly get offered MS Office for $30 (in Thailand) or everything for free (in Munich). (And not to mention that you could still go the road of Open Source and as a result get an IT industry with a bit of a clue what they are doing.) The Greek government prefers to bend down and invite Mr. Gates over for a visit. Press release from the Greek embassy in Washington: Stone Age in Greece extended till 2013 and in Greek: το ξεπούλημα τον παιδιών μας μέχρι το 2013.
21 February 2006
First Glimpse of Athens Wireless Metropolitan Network
...and Wifi mucking around at home
In Athens there is an open wireless network. I knew as much and had
visited the website of the Athens Wireless Metropolitan Network.
Apparently they use directed antennas to build
"backbones" that at some point connect to the greater Internet. It
follows that you need some equipment to find out if you have any
connectivity. They have a map where you can look up access points and
"connectors" in your area, but this won't tell you if you really have a
signal. This morning, due to mucking around with my own miserable
wireless connection, I catched a glimpse of an AWMN signal myself.
With my own wifi access point I'm having a bit of an interrupted love
affair at times. Or rather it's my Titanium PowerBook that has a problem
due to the (known) problem of the case shielding the Airport card and
antennas. It has happened to me before that I was sitting next to
someone with an iBook and the other guy got a signal just fine, while I
was out myself. At home the result is short bursts of misery, trips to
the access point to wiggle the antenna, and starting KisMac to see if
the signal is really that low.
This morning I woke up early, cuz I had an idea: What if my problems
were due to the channel setup being on "automatic" on the AP. One
symptom was that KisMac reported good enough signal strength usually,
but dropping to 0 for a second or a half a lot. So I went
and tried it out. At first I got kicked off the net after switching
the setting to a fixed channel. But then it worked reasonable enough.
We'll see how well it will work in the long run. But then I noticed my
version of KisMac to be grossly outdated. So I went to download a new
version of KisMac.
And funny enough, this new KisMac showed me a glimpse of a wifi access
point with an ID starting with AWMN-... Hello Athens Wireless Metropolitan Network (site in Greek)! Unfortunately the
reception wasn't good enough to actually try and connect: KisMac only
gave it about 3-4 points, sometimes going back to 0. But with a proper
antenna setup I likely would have gotten a useful connection out of it.
So, "bummer, I could have gotten Internet for free"? Somehow yes, but on
the other hand getting an antenna and hax0ring my PowerBook to use an
external antenna would have cost money too. Having my own connection
gives me another level of support and quality-of-service. Also we have
telephone at home too now. But taking part in the wireless network is
still an interesting option for the future, even if it is just for fun.