EEE updated to hardy

Well, it got „boring“: After Gutsy worked smoothly for weeks on my Asus EEE Pc with desktop effects, some tweaks for hotkeys, overclocking and stuff I tried to run an update to the latest Hardy Heron Ubuntu version.

After having followed my own small Howto as preparation for the upgrade I noticed that I really got low on disk space. As I just installed the normal Ubuntu Desktop and few additional apps I had only about 28 percent of the four gigabyte which would be just not enough for an version upgrade. So as a work around I used a sd card and mounted it as /var/cache/apt/archives so that the hundreds of packages could be stored there during upgrade.

The upgrade (via „update-manager -d“) went without any disturbances but took about two hours including the complete download process. After reboot I noticed two major issues: Wired and wireless network were down (an uncomfortable combination 😉 ).

Wired network: The fix for the wired network network is the most silly thing I had ever done and after having found the hint for it on a web page I first thought that this *must* be a fools day joke but it was not: You have to plug off power and remove the battery for some seconds. Afterwards wired network is up and running. Yes, trust me.

Wireless network: The fix for the wireless network was nearly as easy (but not as funny) – just a wget/untar/make/make install of a patched driver copy of madwifi:

sudo apt-get install build-essential 
wget http://snapshots.madwifi.org/special/madwifi-nr-r3366+ar5007.tar.gz
tar xzf madwifi-nr-r3366+ar5007.tar.gz
cd madwifi-nr-r3366+ar5007
make clean && make
sudo make install
sudo reboot

So if you thought about upgrading your EEE: Do it. It’s time to find and report bugs for the thingie – in your own interest and as a nice way of contributing to the open source community. Just wondering where to file a bug about needing to remove the battery :)

Invitation to Ubuntu Hardy Heron Release Party in Berlin on 26th of April 2008

Here it comes: Though the release party of the „Ubuntu Berlin“ user group will be mainly in German we also invite all non native German speaking visitors to attend us. Here is the official English invitation (thanks to ninin for the work on the translation):

Ubuntu „Hardy Heron“ release party on April 26th at 4:00 pm at the c-base in Berlin

Ubuntu 8.04 „Hardy Heron“ is arriving. To celebrate the new release of the popular free GNU/Linux distribution Ubuntu the local user group Ubuntu-Berlin will organize a party. The event will take place on the 26th of April in the rooms of the culture project c-base and starts at 4:00 pm. Admission is free.

There will be a programme of short talks (about 20 minutes each) in relaxed atmosphere. Several features and applications which are integrated into the new Ubuntu version are presented by users, for example the optional 3D-Desktop. Furthermore there will be contributions of associated organisations like the „Free Software Foundation Europe“ (FSFE) and the „Förderverein für eine Freie Informationelle Infrastruktur“ (FFII). A „burning station“ provides visitors with Hardy CDs at cost price of one Euro. For anyone who wants to try out Hardy straight away there will be the possibility to do so on one of the computers there. There will be many experienced users around, who will answer questions.

Flyer for Hardy Heron Release Party
(please note the year 😉 )

Apart from the official programme, the event offers the possibility to get started with the world of free software and to get in touch with like-minded users. Musical entertainment comes from a variety of Bands and DJs who will also play free music. Beverages and snacks are available at the bar at moderate prices. Laptops can be connected to a free Wifi net (visitors could bring a power strip, switch and cable).

Who is „Ubuntu Berlin“?

„Ubuntu Berlin“ is a free group of interested Ubuntu-Linux users. The group sees itself as a local communication platform und organises regular user meetings and release parties. The group has no own legal form but it keeps loose contact with the registered association „Ubuntu Deutschland e.V.“ which supports selected activities.

Place, time and access route

Date: 26th of April 2008
Time: doors open 4:00 pm, open end
Place: c-base, Rungestraße 20 in Berlin Mitte, S+U Jannowitzbrücke
Route: https://wiki.c-base.org/coredump/AnfahrtsSkizze

Contact

E-Mail: [email protected]
WWW: http://www.ubuntu-berlin.de/

Ubuntu Hardy backgound guerilla marketing

Did I already mention I really like the default background image for Ubuntu Hardy Heron? It is called „Warty Final“ (confusing name scheme) and was created by Feta Kuti. It’s a new fresh style (correct me if it is older and I’s always missing it) apart from all those water-chocolate-thingies (which we have seen enough, haven’t we?). I already got asked about the background from people standing behind me several times. „Warty Final“ already enhances some Windows backgrounds. Ubuntu Guerilla marketing in an artistic way. Nice work!

ubuntu background image

[update]
A comment by user AshCroft (thank you!) stated that Feta Kuti is an „Afrofunk/Jazz Saxophonist whose music was some of the inspiration for the heron and was chosen as the name for the art submission“.

good howto: Bash Pitfalls

There is a very nice collection of common Bash scripting pitfalls and hints on how to avoid them on Greg’s Wiki: Bash Pitfalls

If you are writing little Bash scripts from time to time or are even a heavy Bash scripter, give it a try – it helps you avoiding errors that might work perfectly under normal circiumstances but suddenly go wrong… A good guide especially for writing server bullet proof scripts.

Having a Hardy day – Ten steps helping you not to have a hard time upgrading

So just before the first beta I finally updated my production machine to Hardy after feeling bad about not giving enough effort in testing for the last weeks. In one short sentence: It worked! In a longer sentence: It worked quite well, but…

If you plan to update your machine by calling „update-manager -d“ on Gutsy or actually any other Ubuntu upgrade you might have a better time with the update by taking the following then steps before:

  1. Remove all applications you installed for testing purposes but don’t use them. It’s a nice feeling to have a mostly cleaned machine. Removing applications before an update reduces download time, the space needed and dependency calculations as well as the risk of a dependency failure. So just drop all those only once clicked applications, games and even libraries. Take some time for this, it will save you time later. Trust me.
  2. Check that you have enough space left on your device. Hundreds of packages are being downloaded in one step, therefore you should have enough disk space for this. Keep this in mind.
  3. Compiled software by your own? Installed external .deb-files? If possible: Uninstall them, you can later reinstall them if they are not provided by Ubuntu+1.
  4. Added software repositories to /etc/apt/sources.list (or Synaptec?). Disable them for now.
  5. Switched to a server close to you? For an update to an alpha or beta version it might be better to switch back to the main repository server as you are getting probably urgently needed updates faster (correct me if this is wrong).
  6. Of course: Back up, back up, back up. Decide, if a backup of your home directory fits your needs or you also want the rest of your partitions.
  7. Bring enough time: A full upgrade might take two hours and more, depending on your ram, cpu power, network speed and amount of installed applications. Don’t think an upgrade runs automatically – it will ask you several questions during package upgrades and therefore awaits your attention. Make the day your upgrade day or at least the afternoon your upgrade afternoon. A cup of tea might help.
  8. Check for already known caveats that you might take care of. Normally the most important ones are collected on the wiki page to the current alpha/beta release like this one.
  9. Make yourself clear what „alpha“ an „beta“ mean: Take them as warnings and only take the risk of an upgrade if you are not under time pressure for a project (like writing an essay, developing an application or anything with a deadline close to your upgrade day).
  10. Check if you have the possibility to have a second computer around enabling you for checking against discussion boards, wikis and other ressources of useful information. In case of an emergency it is crucial to be online in way because often really simple tricks can save your day.

After these steps, feel free to give „update-manager -d“ a try. Take notes of things that look strange and check launchpad bug tracker if they are already reported. Now it is up to you to help making Ubuntu a better distribution and Hardy a really success.

Good luck!

p.s.: And if you want an example of things that *can* go wrong: After upgrade I noticed my wireless connection was down as the device was missing (no eth1 anymore). After searching the web I found out that the package „linux-ubuntu-modules-2.6.24-12-386“ was not installed though it should have been. An „aptitude install linux-ubuntu-modules-2.6.24-12-386“ over a wired connection solved the problem.

One step forward, two steps back – AOL’s new „openness“

Great news! AOL finally opens it’s OSCAR protocol for developers by providing extended information through its OpenAIM program with a SDK, tutorials and all you need to build up aim compatible messengers or even bots. But is it that open? I mean, we know the difference between „open“ and „free“, don’t we? So a closer look at the license terms shows things you really don’t want to see and that are just unacceptable:

1. The „choose two from five“ rule:


„Additional Feature Requirements. Any Custom Client or Web AIM Developer Application that you distribute must include at least two of the following features or functionalities („Additional Features“) as an integral part of such distributed Developer Application:
  1. AIM Expressions. Inclusion of the capability for your users to choose and display a Buddy Icon to customize his or her user experience and provide a link to the AOL-Hosted AIM Expressions web page as documented in the AOL Additional Features document.
  2. AIM Toolbar. Inclusion of the AIM Toolbar as a user-selected option during the registration/download/installation process for the Developer Application, as applicable.
  3. AIM Start Page Launch. Inclusion of the launch of the AIM Start Page upon users. logon to your Site or to the Developer Application.
  4. Buddy Info. Inclusion of content provided by AOL that includes information about a user’s online status, including the user’s AIM profile, and AOL-supplied advertising.
  5. Advertisement. Inclusion of an AOL-provided display advertisement („Advertisement“) within your Custom Client, Site or activity window. Unless otherwise provided in a written agreement, all revenue from such Advertisement will belong to AOL.“

source: http://dev.aol.com/aim/license

So let’s say you want to develop a free, non-commercial client. Your best choice’d be choosing to implement „AIM Expressions“ and „Buddy Info“. That might be okay but it might be not. And actually it should be your decision, shouldn’t it? Even more interesting: What about console clients? Yes, they are around and it might be possible they haven’t ever heard of icons. Are they disallowed by default? Aren’t you free to choose a very different style of artwork for „expression“ by dropping the standard set and developing a new one?

2. The additional „hope to be unsuccessful rule“

Okay, this might be pettifoggery, but let’s also assume your client is implemented with the mentioned
requirements, people start to download your client, so it is widely used. Fine? Uh, yes, AOL thinks so too, as they are really interested in that:

„In addition to, and not in lieu of, the above requirements, in the event that the number of simultaneous users of your Custom Client or Web AIM Developer Application reaches a peak level of 100,000 at any time (as defined by AOL and provided at http://developer.aim.com/manageKeys.jsp) you must either: (i) within ninety (90) calendar days also include an Advertisement within your Custom Client, on your Site or the primary activity window of your Open AIM Developer Application, and discontinue any version of the Custom Client or Site/Activity Window that does not include an Advertisement; or (ii) within fifteen (15) calendar days, contact AOL at the following address: [email protected] and reach agreement on alternative arrangements satisfactory to AOL.“
source: http://dev.aol.com/aim/license

So what is this about? If your application is a success, make it commercial in a way. Free software is for a niche, big market shares are for winners? Be afraid of having 100.000 peak users? Stop distributing uncommercial clients if having success?

So, really thank you, AOL, for moving towars openness. But the way you define „open“ is not the way we mean it. It is not even „free beer“ you are giving away, it’s a glass of free beer with a big refund sticker on it. But you already showed that you know what is all about: Just a couple of weeks ago information about a xmpp/jabber aol/aim test server leaked and you might have noticed how enthusiastic people were. Stick to it, be brave! Other big companies already use it by default.

Think about companies forcing developers to implement similar „features“ into mail applications just because they transport mail to a specific domain, with a specific mime type or whatever. You would not like it? We don’t either. Make your protocol open and free. Your users are users – not customers, developers not employees.

using postfix for secure tests with live data

During web development and quality assurance you sometimes want to test an application with live data (e.g. a web shop test instance with live customer sql data). As your application implements mail functionality you have to make sure that no mail on the test server is sent to a real user but you probably want to be able to send mails to developers and receive all other outgoing test mails in a catch-all account. An easy Postfix tweak for this is using a pcre regular expression virtual map.

So our goal is: All outgoing mails to a specific domain should be delivered normally (e.g. your company domain) while all other outgoing mails should be delivered to one specific catch-all mailbox.

Actually this task can be resolved by adding not more than three lines of configuration code in two files.

1. in /etc/postfix/main.cf add

virtual_alias_maps = pcre:/etc/postfix/virtual.pcre

2. the new /etc/postfix/virtual.pcre should look like

/(.+)@yourowndomain\.tld$/ ${1}@yourowndomain.tld
/(.+)@(.+)/ catchoutgoing@yourowndomain.tld

After having restarted postfix you are already done.

Please note, a ${0} instead of ${1}@yourowndomain.tld did not work for me, so this a tiny workaround which does not look beautiful but really does it’s job.

p.s.: A really nice (but somehow old looking) tool for developing and testing regular expressions is „redet„, a „regular expression development and execution tool“ which knows nearly every important regex syntax depending on the tools you have installed. You’ll find redet in your Debian/Ubuntu repository.

libapache2-mod-xsendfile – processes X-SENDFILE headers with apache2

For some projects I had to figure out a way to deliver a file via Apache2 but still being able to put some business logic before the download. Imagine you have a php, perl, rails, ruby or whatever project and want to check credentials before delivering a file while not blocking your application with submitting large amounts of data. Lighttpd has a mechanism called „xsendfile“ for this. To make it short, this looks for a X-Sendfile header sent by the application. If this header is set and directs to a file the web server stops processing its script and starts delivering a file.

Fortunately there is a promising Apache2 port for this: mod-xsendfile. As I had to compile this serveral times and did not find it in Debian unstable or Ubuntu I made it my first packaging attempt (after having attended the first German Packaging Jam held by Daniel Holbach – thank you!).

If you like, you can test the module for hardy by enabling my ppa archive:

deb http://ppa.launchpad.net/damokles/ubuntu hardy main
deb-src http://ppa.launchpad.net/damokles/ubuntu hardy main

and „aptitude install libapache2-mod-xsendfile“ afterwards. See the website for reference. I will also upload this to my ppa for stable releases within the next days.

There is a launchpad bug I created for this. Feel free to test the module and the package and add comments there or directly here. Sadfully this package is to late to be integrated into hardy, so maybe the Intrepid Ibex (what a name…) will be a good milestone.

fast installation of apc php optimizer/cache on Debian / Ubuntu

If you want a fast installation of the php apc bytecache/optimizer for PHP5/Apache2, try the following snippet when already running a standard PHP5/Apache2 environment:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# install dependencies for compilation
$ sudo aptitude install apache2-dev php5-dev build-essential
# get current version of apc - check if there is a newer one!
$ wget http://pecl.php.net/get/APC-3.0.16.tgz
$ tar xzf  APC-3.0.16.tgz
$ cd  APC-3.0.16
$ phpize
$ ./configure --enable-apc --enable-apc-mmap \
  --with-apxs=/usr/bin/apxs2 \
  --with-php-config=/usr/bin/php-config
$ make
$ sudo make install
# in /etc/php5/apache2/php.ini add: extension=apc.so
$ sudo apache2ctl restart

No a phpinfo(); should show you a new apc section.

Joining an Active Directory domain with Ubuntu

What a pain. Imagine you are in Windows network environment and have a small amount of Ubuntu desktops. You task is to let them join the Active Directory so users can login with their known credentials. There is a package in universe called „authtool“ even providing and promising to do what you need. Sadfully it is quite broken in it’s current status and if you ask me one should even consider removing it until it does at least not break you boot (don’t ask for details) and has a good set of working dependencies. There are other methods as ldap-binding but in my eyes there are either not stable or just too complicated to configure (and therefore hardly qualified for convincing people).

But a solution approaches if you read the following Ubuntu blueprint „Single User Interface to Join and Participate in Microsoft Active Directory Domains„. Currently you might not find much more information about it. So I dropped a line to the blueprint creator Gerald ‚Jerry‘ Carter who was so kind of updating me with the current status of the project (and happens to be directly involved in Likewise):

It is planned to package the open source version of Likewise called „Likewise Open“ for Ubuntu Hardy. Likewise Open enables you to join an Active Directory with actually some simple clicks or one console command. There is already an updated source tarball which can be installed quite easily:

1
2
3
4
5
$ wget \http://archives.likewisesoftware.com/\
likewise-open/src/likewise-open-4.0.4.tar.gz
$ tar zxf likewise-open-4.0.4.tar.gz
$ cd likewise-open-4.0.4-release
$ make dpkg

If you have all necessary dependencies resolved the make process should provide you with .deb files which you should install. As Jerry states there is currently one blocker which can be worked by not using the gui but calling a line like this

1
$ sudo domainjoin-cli join AD_REALM ADMIN_ACCOUNT

Afterwards you should be able to login like this „realm\username“. I tried the process on Gutsy and it worked quite well. I had to reboot once as my gdm hang – maybe it’s better to call the command directly from a „real“ console. So what is missing? Check the comparison of Likewise Open and Likewise Enterprise, the commercial version of Likewise. The thing you might miss at first is:

Do more during logon: Create a home directory, copy template files, set permissions, run scripts, deliver messages, and more.

This means that Likewise Open enables you to login as AD user, creates his home under /local/AD_REALM/USER but you have be smart and hack around a bit to get things working like managing sudo, running scripts and so on. But nonetheless Likewise Open seems to be a promising approach for solving the problem of Ubuntu-Windows-network integration and I am sure to see some nice addons from the community in the future.

Please note: Installing software that changes login procedures is a deep intervention into Linux core procedures. So please: Do this with a test environment before considering it for production purposes.