How do I get the backspace and forward delete keys to work correctly?

  • In the Keyboard section of the Terminal Inspector:
    • Turn on the Delete key sends backspace option.
    • Map the forward delete key to the following string:
      \033[3~
  • Add the following line to your .profile:
    stty erase ˆH
    Since ˆH is a non-printable control character, the easiest way to do this is to execute the following command:
    echo -e "stty erase ˆH" >> ~/.profile
    Type the ˆH by pressing Control-V and Control-H.
  • Add the following line to your .inputrc:
    "\e[3~": delete-char
  • Apply changes by doing a source ~/.profile and a bind -f ~/.inputrc.

Very helpful! I found this information on this website. Thanks, desp!

Read more…

Just as a little warning beforehand:

I will probably be blogging on web application development with CakePHP a bit in the near future. As mentioned before, I started working at Mozilla recently, and the current project I am on happens to be written in PHP using the CakePHP web development framework.

I have to admit: Though the MVC design pattern is pretty well known (and well-taught everywhere), actually using it exclusively (pretty much no exceptions) takes a little bending my mind and makes me want to cry sometimes.

It's not that complicated, but, well, it's different.

So stay tuned for the little weird things I might come across on my journey through the bakery.

Read more…

Truly, there have to be things you are looking forward to at work. Here at the Mozilla Corporation, this is currently the Firefox 2 release:

Firefox 2 Champagne

(picture of my boss' office window)

I can't wait for the Fx 2 release. And a little bit, I am even looking forward to the Veuve Clicquot :)

Read more…

Some things in geek world tend to be a little confusing. Such as the internal differences between SCP and SFTP. Both of then use the SSH protocol to transfer files from one server to another securely encrypted.

Now, sometimes I copy a few things over the "big pond" from Germany to the U.S. and even though the sender is able to upload more than 50k/s (and the receiver can download much more than that), SFTP doesn't get any faster than 15 kilobytes per second.

When I try the same transfer, a minute later, with SCP, I get roughly 60k/s, which happens to be the upload limit of the sender.

Any clue why this is happening?!

Read more…

So, this last week I had to move to a new ISP with my web pages and domains because the old one decided to close their business. Sad enough, but then I decided to get a new virtual server, mainly because I have much more disk space there now and the performance should be a little better if you only share one physical box with a handful instead of hundreds of people.

Now moving is over and this blog is proudly served to you by my new server (which by the way listens to the nice name aurora, the ancient greek goddess of the dawn).

Aurora serves HTTP, Mail and a little MySQL obviously, all of which using SSL transport encryption where applicable.

My Mail servers of choice are, by the way, exim and dovecot.

I chose Exim for a number of reasons: I recently read a lot of good things about it, for example in the Linux Weekly News MTA comparison. It is easy to set up, quite secure, and it is the default MTA delivered with Debian stable. Then again, as a good example of how well Exim works (and scales) I have my German home university which uses it for all > 20000 people on campus.

I got it working with virtual domain handling, virus and spam filtering and SMTP-Auth over TLS in little time. A few very good howtos are available on debian-administration.org.

Then for IMAP serving, I had the choice between Cyrus, Courier and Dovecot. I decided against Cyrus because fellow sysadmins warned be that it is a beast to set up and there is little use going through all that pain unless you have a good reason to (a big, big userbase for instance?). I only have a handful of users (as you might have guessed from me mentioning a virtual server up there). I eventually decided against Courier because I knew that dovecot was exceptionally easy to set up and it would server IMAPS for me almost immediately.

However, one good thing I used from Courier are Maildir mailboxes. Dovecot can handle them too, and they provide a much better immunity against breaking your mail folder than traditional UNIX mbox files. (They also scale better.) One thing to consider though is the block size of the filesystem, because for every single email at least one of these blocks is going to be used. But the block size happens to be 1k on my virtual box, so even 1000 small emails would only take 1 MB on the disk.

If there are any questions, or if something that worked before magically broke now ;), let me know.

Read more…

Update on the open source humor post:

In the current issue of Linux Weekly News, somebody wrote an article mentioning the following Python command:

from __future__ import braces

Let's try:

$ python Python 2.4.3 (#1, Mar 30 2006, 11:02:16) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from future import braces File "<stdin>", line 1 SyntaxError: not a chance >>>

Hm, not bad for a programming language.

(Oh, and if you didn't understand it, don't worry, it's pretty easy: Python uses indentation to distinguish between code blocks, not curly braces like C, Java and others. And they are proud of it.)

Read more…

Almost everything in our world goes bad eventually. The milk you bought a week ago will be bad in a while. The leftovers you brought from that Chinese place last Tuesday expired long before but you took them anyway. Hell, even your domains expire if you don't renew them.

Everything is changing, faster than ever before. Some countries even put expiration dates on their laws so that they don't keep around bad ideas for centuries. Smart idea. And yes, also copyrights expire.

Only our blog posts are meant to be there for eternity.

Yes? No, not quite. And yet there is no expiration date we could set in our blog softwares to get rid of them after a while (deactivate, maybe, not necessarily delete them). Think of all those old, useless blog posts, moldering in the attic of your blog, waiting to catch dust, comment spam, or both.

Admittedly, some of the things we write are quite useful for a long, long time. But, admit it, that's not true for a lot or our posts.

So how about a wordpress plugin (or whatever software you use) that does the following:

  • gives you the choice to set an expiration date for every blog post you write (defaulting to does not expire, or maybe something sensible)
  • deactivates said post after the specified period
  • and maybe has some fancy more choices like letting you choose on your dashboard if you actually want it to expire (yes, deactivate or yes, delete) or if you want to reactivate it. For a new expiration period, or forever, finally, because this article turned out to be helpful for all generations to come.

Hm, so what do you think about my crazy Monday night plugin idea? Let me know.

Read more…

Windows Vista is now much more secure:

You are not allowed to do this! Do you want to?

What do they call this, half-root? :)

Read more…

OpenOffice LogoI am a convinced OpenOffice user. Part of it is because the "old bull" of office suites, Microsoft Office, is expensive, even for students. Even more convincingly, though, MS Office often just plain sucks.

I have worked for a few years as a research assistant, among my major everyday tasks being "please fix my Word document".

Now admittedly, the people I was working for are not even close to being computer geeks, or experienced wordprocessor users, for that matter. But they happen to have a job that requires them to write. A lot. Sometimes documents with a few hundred pages.

Unfortunately, they never really understood what those predefined formats (header? foot note? page break?) actually meant, so they passionately screwed up their entire document's formats. Eventually, a few hundred pages later, it turned out that changing a single line's format for the fiftieth time in a row broke all subsequent 183 pages, requiring them to cry and forward the file to me for help.

Sadly enough, sometimes it was too late. Word had choked itself trying to open the file and left little more than a sad pile of 0s and 1s, unreadable for itself and -- oh lovely closed-source formats -- unfixable by any other program.

Now another time, one person tried to be smart about it. He used OpenOffice, well, actually StarOffice, because he had heard good things about it. He wrote a 200-page-document and, not surprisingly, he made the same mistakes they all did with Word before. StarOffice became quite slow when accessing that document, and yes, it also crashed a few times. My help was only needed shortly, to redefine some font faces for a few foot notes. Eventually, he was fortunately able to finish his document anyway, and he could successfully publish it. Oh surprise. No sad, useless pile of data involved? No, not this time.

This little story leaves us with two conclusions. If you screw up, you'll kill OpenOffice just as well, or at least close to the way you do with Microsoft Office. You are still able to absolutely horribly destroy your documents, just like you always did. Nothing new here. But if you do not want to pay several hundreds of dollars for that, you are right at OpenOffice. Not even mentioning the open source file format which guarantees that you will still be able to access your files in 20 years, and not being locked out of your own documents because Microsoft decides not to support an old 2006 .DOC file anymore in 2015.

Oh, and recently, not even Mac users have an excuse anymore to run MS Office on their boxes: NeoOffice, a native, open source clone of OpenOffice for OS X, released their NeoOffice 2.0 beta earlier this week, and it works like a charm.

So what are you waiting for?

Read more…

Some Linux stuff; CC-licensed of flickr by Andrew Lewine; source: http://www.flickr.com/photos/andrewlevine/153752375/One thing I like about Open Source programs is that the programmers seem to have a little humor. This leads to things like the "insult" setting for sudo, which makes fun of you everytime you mistype the password. It's interesting to get messages like

"Maybe you should use more than two fingers, next time!

when you happen to hit the Enter key too fast.

Or, today I realized that another command works quite flawlessly:

who mom loves

gives you information about... you. Who else would mom love? Interestingly the Mac OSX programmers don't quite seem to have that kind of humor, so they just allow who am i, which also works on Linux.

Any other funny commands you guys know about?

Read more…