Linux: Automatically reconnect NetworkManager's VPN Plugin using D-Bus

In a previous post, I talked about how to use D-Bus to get information about network status changes. Now, since I have been using a private VPN with my Ubuntu as a client, I came across another scenario, where a script using D-Bus could help: The VPN works fine, but sometimes just disconnects. It does not happen very often, but when it happens, it is annoying and I'd like to see it reconnecting automatically. Moreover I'd like to stay in the VPN whenever I have a network connection available. Unfortunately, I didn't found any option within the NetworkManager to manage this. I ended up in writing this script which can be invoked like autovpn <VPN_NAME>, where <VPN_NAME> is the name of the VPN which is displayed in the NetworkManager under VPNConnections. You can even run it automatically on system startup by placing it in "Startup Applications". It does two things:

It tries to connect the VPN whenever it detects an active internet connection.
It tries to reconnect the VPN, whenever it disconnects unintentionally. The number of attempts is limited to 5 and there is artificial delay of 5 seconds between attempts.

Amazing Super Mario Piano Skills

This is probably the best live piano interpretation of a video game, that I have ever come across. Sure brings back a lot of memories...

Bush: 8 years in 8 minutes

The day after tomorrow Obama will be become the 44th president of the United States of America. His biggest challenge will be to clean up the enormous mess Bush has left behind. If you have forgotten how Bush has transformed the world's mightiest nation into deterioration, or just need to realize the full extent of it, watch Olberman's summary of Bush's 8 years after the jump.

Class Introspection in C++? Ask the physicists!

In my experience as a programmer, I have noticed that there always has been demand for a good way to achieve class introspection. Then the arguing starts: some languages already have class and object introspection, like Obj-C or Python, which, though becoming increasingly more popular, are still the minority of used languages. Then we have C++, which doesn't have class introspection by default, but most people use a lot. Is there a solution to this problem? Surprisingly, physicists have developed a great tool!

MacWorld Keynote Tomorrow

Don't forget to tune in to the MacWorld Keynote tomorrow at 6 pm Berlin time. As usual, there will be no live stream, but you can follow the keynote transcript live with pics at the known places, such as engadget, gizmodo, MacTechNews (German), and this year on MacRumors. As you have probably heard, although Steve is not giving the presentation, there are quite a few rumors surrounding the keynote, so that we are probably in for quite an interesting event. Read on to learn more.

Parser Generator in Python - Quick PLY Introduction

I have been using regular expressions within my Python projects for a while now, but I've never felt the need to use a full-featured parser generator. This changed yesterday and I had a look at PLY, a pythonic implementation for Lex/Yacc. Being used to parser generation in Java using ANTLR or Cup I came across some remarkable differences which I want to point out for you after the stop. You will also see a small calculator code snippet.

Moving to Dublin

What many of you have been hearing about is finally official: I will be moving to Dublin, Ireland at the beginning of next year. There, I will be working for Hermes SoftLab, an international software engineering services company, as a Mac developer. My flight off the continent is booked for January 9th, and as you can well imagine, I am very excited. I cannot say much more at the moment, but I will be sure to keep you guys updated on my situation. Of course, in the first few weeks I may be quite busy, but I am sure our other bloggers will provide the site with plenty of content. On that note, I also have created a personal "to blog" list of all the things I keep telling people I will blog about, but haven't so far. Expect more on that in the upcoming days. Until then, pop open a bottle of Guinness (fresh from the tap follows when visiting me in Dublin) and send out a toast to me! Cheers!

End of an Era: No More MacWorld Keynotes

Apple just released this press release a few minutes ago:

"CUPERTINO, California—December 16, 2008—Apple® today announced that this year is the last year the company will exhibit at Macworld Expo. Philip Schiller, Apple’s senior vice president of Worldwide Product Marketing, will deliver the opening keynote for this year’s Macworld Conference & Expo, and it will be Apple’s last keynote at the show. The keynote address will be held at Moscone West on Tuesday, January 6, 2009 at 9:00 a.m. Macworld will be held at San Francisco’s Moscone Center January 5-9, 2009.

Apple is reaching more people in more ways than ever before, so like many companies, trade shows have become a very minor part of how Apple reaches its customers. The increasing popularity of Apple’s Retail Stores, which more than 3.5 million people visit every week, and the Apple.com website enable Apple to directly reach more than a hundred million customers around the world in innovative new ways.

Apple has been steadily scaling back on trade shows in recent years, including NAB, Macworld New York, Macworld Tokyo and Apple Expo in Paris."

So what does this mean? Well, Apple could still hold its own special events (at more appropriate times than in early January), but there are two things that concern me (after the jump):

Obama's Team Disappoints with Answers

Frankly, I did expect more from the Obama team when they allowed users to post and vote for their most pressing questions a few days ago. It seems rather half-hearted that many of the questions were omitted, and that the answer to the top question was buried somewhere between other answers and given real-estate of a single lonely line. See their blog entry here. Furthermore, the answers did not seem at all personal, as if someone had really sat down and thought about these questions. Instead, standard political answers were given.

Now I don't expect miracles from the president-elect, but if you start such a democratic Q&A, you might as well do it right, and actually respect the vote counts. Here, I feel the most interesting questions were ignored, and those that were answered felt like a quick copy&paste from the campaign book. I may be over-reacting, but I feel gypped.

What do you guys think?

Obama 2.0

When I see America's future president using Web 2.0 technologies to create a Digg-like website, where users can post - and digg questions to the president elect, I begin to grasp just how much I look forward to the next administration. The idea is simple: Anyone can post a question to the site, and other (logged in) users can vote for questions of their interest. At the end of a round, the ten most popular (most votes) questions are selected, and answered by Obama and Biden themselves. Click Read More to find out the winners of round one. I can tell you this much: I am really interested in the answer to the top question!