Thanks for the great time, KDE
After years of being a dedicated KDE user it seems like it’s finally time for me to go “back” to Gnome. I once tried KDE 4.x from the Debian ‘experimental’ branch knowing that it’s probably unstable and will require a lot of patience. But I was willing to report bugs and dive into new things.
It didn’t take long though to find out that graphics were extraordinarily slow with the new “desktop effects”. The worst was resizing a ‘konsole’ (KDE terminal window). It took 25 seconds until the window was resized and redrawn! On the interweb I found KDE developers rant about NVidia who didn’t support some special extension they needed. They suggested to get an ATI card instead. (No, thanks, I was struggling with the crappy radeon and fglrx drivers on my new work laptop and am sick of ATI for Xorg.) Or I could use a bare XTerm instead. Yeah, right. So I couldn’t use the desktop effects. After all I used the non-free NVidia driver for years and it never let me down.
I don’t mind doing without eye candy. But the desktop effects were about the only serious way to switch between virtual desktops. Point the mouse into a corner or edge of the screen and get a “zoom-out” bird’s view of the virtual desktops. Nice but quickly annoying. Besides you had to push the mouse pointer a few pixels “into” the edge (it’s not sufficient to just hit the edge) which means that after 10 desktop switches I had to lift the mouse and set it back on the mousepad.
Another annoying issue is that up to now I can’t assign functionality to every key on my keyboard any more. I had a neat trick by having 3×3=9 virtual desktops and use my numpad keys 1 to 9 to page through them. “0″ on the numpad opened a new shell window. “+” on the numpad maximized a window. But now I couldn’t assign any of those numpad keys. I pressed the “1″ but KDE didn’t detect “Numpad_1″ but just “1″. Guess how useful it is to not be able to type the “1″ any more. There is a low-priority bug report for KDE from users who want this fixed but it will likely not happen any time soon. So the only way to switch desktops was to poke on the tiny pager widget in my panel. Yuk.
Not to mention that I couldn’t put icons on the desktop any longer. There was just a sissy widget that I could use for that purpose but it didn’t work like a conqueror or dolphin at all. It was pretty amusing when in KDE 4.2 there was suddenly a feature to re-enable the old behavior. Let me guess, KDE developers - I wasn’t the only user you couldn’t persuade of the new paradigm?
Next evil thing was performance. KDE 4 takes ages to load. Simple window managers get me started within seconds. Even Gnome. But KDE takes 30 seconds until it’s loaded plus some disk grinding in the background. And memory usage wasn’t nice either.
And what finally made me mad was stabilty - or rather lack thereof. Everytime the screen saver ran my kbluetooth module crashed. kmail crashed even more frequently than before. (I loved kmail for it’s great customizability and feature set.) plasma (the actual window manager) died at least twice a day. Suddenly the panels were looking ugly or crashing.
As a Debian developer I have to follow the ‘unstable’ branch on my workstation. And there is no distinction between KDE 3 and KDE 4 any more so a ‘dist-uprade’ inevitably gets all of my applications upgraded to KDE 4 (plus an hour of manual engineering in ‘aptitude’ because half of my applications weren’t upgraded automatically due to different application names and I had a mixed environment). So there I was with KDE 4.2. I really worked with it for a month. I tried hard to get acquainted to its bloatedness and instability. It’s really a nice technological preview of what might be possible in the future. Everything is really automatic. Mounting external media. New ways to find programs (although I’m not happy with the new K start menu). Funny effects and nice eye candy. But it’s far from the rock solid desktop environment that I was used from KDE 3.5.8.
So there I am on Gnome now. I was switching back and forth. One day working on KDE 4.2 and the other day using Gnome 2.26. And although it makes me feel sad I think it’s finally time to say goodbye to KDE 4. I have invested a good amount of time and energy into it - even just from a user perspective. But it’s not ready. And I finally need to get some work done. A number of projects suffered from my playfulness (my ispmail tutorial, screenshots.debian.net, debexpo, my kids) and it’s time to get back to work. And Gnome was pretty surprising. With compiz I have the KDE desktop effects working (here they really do) and they are all customizable. I can assign keys properly again (even the numpad). Everything is pretty fast and stable. I have replaced kmail and its buggy “shared calendar” feature by Icedove (aka Thunderbird) with the “Lightning” plugin. Worked from the first minute and hasn’t crashed in a week (just have to remember next time to install libstdc++5 to be able to use Lightning). With enigmail I finally have a proper simple working PGP key management that doesn’t die and is buggy like hell like in kgpg. And there’s the nice “Nostalgy” add-on that allows me to file emails into IMAP folder quickly again - a feature that just kmail seemed to support so far. Oh, and I see new mail instantly because Icedove supports the IDLE command while kmail has never learned that neat little trick. The Gnome file manager isn’t really great for my taste but it’s doing its job (dolphin is just much nicer). It’s not as nice as KDE but I had to learn that working and stable weighs more than nice. The hard way. And many things I liked about KDE 4 (like starting a new program with Alt-F2 and having a smart application finder and simple calculator in one) are built into Gnome, too. So why bother.
Thanks, KDE, for the years of fun and service. I’ll surely miss you. Get back to me should you grow up one day.
Don’t (ab)use CSS for page layout
Before you BBQ me - note the word layout here. I’m not opposed to CSS. Instead don’t get me started about crappy web sites that use “font size=+5 face=Arial” in every sentence or are even just saved from Micros*oft W*ord “as HTML”. CSS is great for styling your contents. How do I want to make my H1 heading look like? How much space does a P paragraph have above and below? Which font style do I want to use? That’s what CSS is good for. I like it. Keeps my (X)HTML clean and readable. And the CSS if often pretty readable, too, even if you are a web design mortal.
But the worst thing that was ever attempted in CSS is (ab)using it to create page layouts. By layouts I mean multiple columns on a web site for example. There are hacks to accomplish that. But CSS was never conceived for complex page layouts. Would you use OpenOffice style sheets to position certain elements across your stationary? No, you use it for styling elements. Hacks are often cool. But they are no paradigm to improve the web world.
“Just use a float or two and define widths and that’s it.”, right? CSS evanglists even talk about “fluid designs”. IMHO it’s not really fluid because you need to fix your floats. There is no way to say “this DIV should be as wide as the widest text in it”. Your only ways are to specify the width as percentages or as absolute pixels. Most people seem to use absolute pixels. Now how poor is that? I’m designing a fluid web site that is supposed to work on any monitor and I’m dealing with pixels? Many web design documentations say that you should stay away from pixels. Specify your text size in “em” instead so that the user can choose the font size. And now all of a sudden I’m supposed to assume that some random navigation column is supposed to be 235 pixels wide? Everybody is complaining about crappy web sites saying: “This web site was optimized for 1024×768″. Why not even say “You should have a good glass of red wine at the right temperature, a furry animal on your lap and dimmed your ceiling light when watching this web site.”? (Yes, that’s how I prefer to spend my time on the web.) Web designers seem to use the mathemical average resolution and use that for their design. Have they ever tried to view the web site on a monitor with a much larger resolution? Have they bothered to try it on a mobile phone? No. It just looked cool on their monitor. Browse most cool CSS-layouted pages on your BlackBerry and you will see the whole mess. Because 235 pixels on a mobile device may well cover up the whole width of the display.
So what is my proposal? Use the crappy tables again? Aren’t they supposed to be used for tabular data only? Yes, actually the solution is tables. Because there is still no other way to do proper layouts. And the kind of tables I’m think of is “left colum + center column + right column” with the center column occupying 99% of the width. Job done. I’m not talking about tables with invisible 1×1 pixel GIFs that serve as spacers to control the size of each column done by people who got told that web sites are done with DreamWeaver.
Perhaps we need three different way to describe a web site:
- HTML: to define the content
- CSS: to style the content
- whatever: to define the page layout
So long tables do have their right to exist because:
- You don’t have to specify widths in pixels thus rendering the columns to the exact width that is necessary.
- You don’t need hacky CSS that will likely not work in 5 years.
- Your web pages will look good on any browser.
It’s really interesting to search the web for other people who feel that using CSS for page layouts is plain wrong. But they are often toasted by CSS nerds who haven’t understood that CSS is the wrong tool for this job and who claim that it’s the way to go and the CSS haters just haven’t learned how to use it properly. Just because it’s possible it doesn’t mean it’s the “proper” way. Just look at how GUI libraries work. They specify their elements in a grid. For a reason.
CSS page layouts are a nice proof-of-concept. Okay - you can abuse CSS for layouts. Well done. Now let’s get back to work. Floating DIVs serve different purposes. And unless the W3C comes up with a decent way to handle page layouts let’s just not try to be cool but get our work done. With tables. Or next time a Javascript guru will come along telling you that Javascript is the way to layout your pages and that both CSS and HTML tables suck. (Yes, it can be done with 90% Javascript… just look at ExtJS.)
I rest my case and will now fix the Drupal Zen theme to work in a good old-school working table manner. No, seriously, I probably won’t use tables everywhere. But I felt like saying that CSS layouts are not the obvious solution. Just because the majority of people on the web seem to think that tables are evil doesn’t make it right. And that the W3C claims that tables shouldn’t be used for layouts is nice and all - then why don’t they offer something to do layouts?
Debian 5.0 cake
Thanks to all involved people for the Debian 5.0 “Lenny” release! My wife made me a cake for my coworkers so we can celebrate a little. But even my boss believes that it must have been my birthday because no sane person would bring a cake to celebrate bits and bytes. Well, here it is (black forest cake style):

(Sorry for the quality of the photo. My real camera died yesterday.)
((Now I have to verify the complaints of a coworker that LXDE still doesn’t install.))
Automatic HTML validation of Pylons (or any WSGI) applications
While many other “web designers” create hacky websites (that break in many funny way once the browser developers figure out how to do their jobs right making the hacks fail) I almost always try to use W3C’s web standards. Just that sometimes I forget to validate my own pages for proper CSS or (X)HTML. Thanks to the great “Web Developer” Firefox plugin I can press Ctrl+Shift+A and validate my local (X)HTML using their validation service. But I felt that a more automatic way would be nice. Besides I use Pylons (a shiny Python web framework) for a few closed-source applications and don’t want to send that information to a public web site. So a while back we were discussing automatic validation in Pylons applications. And today Michael van Tellingen told me in #pylons that Ian Bicking’s Paste has automatic validation built-in as a WSGI middleware.
(For those who don’t know WSGI. It’s an interface similar to CGI that is used by Python web frameworks. It’s what is spoken between an application creating the HTML output and the web server. WSGI allows you to hook up several layers of functionality which are called “middleware”. Middleware can be used for example for authentication or for intercepting errors. It works similar to a UNIX pipe. The output of one layer is the input to the next layer. You want to profile every HTML page? Just add profiling middleware.)
So all I had to do was import the paste.debug.wdg_validate module and use the middleware in the right place. One way to do that is edit the config/middleware.py file of a Pylons application and just insert this line where it reads “CUSTOM MIDDLEWARE HERE”:
app = paste.debug.wdg_validate.WDGValidateMiddleware(
app, global_conf, wdg_path='/usr/bin/validate')
But I’m not a big fan of hardcoding such functionality. So I enabled it only if a certain variable (’html_validator’) in the application’s INI file is set that points to the ‘validate’ binary and if the application is run in debug mode like during development:
if config['debug'] is True and ‘html_validator’ in config:
import paste.debug.wdg_validate
app = paste.debug.wdg_validate.WDGValidateMiddleware(app, global_conf,
wdg_path=config['html_validator'])
And in the INI file I put:
[app:main] html_validator = /usr/bin/validate
The validation software is from the WDG’s web site. But in case you are lucky Debian user an “aptitude install wdg-html-validator” is all it takes.
Voila - now every (X)HTML validation error gets displayed on the bottom of a page. The output isn’t very nifty but it’s sufficient to find typos without having to run every single page through the validator. And it’s completely local thus being faster and avoiding to disclose internal HTML data to the W3C web site.
NFS: sec=sys or ruin your day
And once again I was bitten by problems on my Debian laptop mounting directories from the file server via NFS. After a Debian dist-upgrade I couldn’t login to KDE any more. Shell login worked somehow but I quickly found out I could neither read nor write any files there. Apparently an “ls -al” showed me the right permissions (not just unmappable numeric UIDs or something of that kind) and an “id -a” confirmed that my LDAP PAM configuration still worked. But reading or writing any file just lead to “Permission denied”.
I’m not sure if it was an update in the nfs-common package in Sid. But I had the same problem before and it took me hours until I finally figured out that Debian’s NFS seems to use non-standard defaults. Namely the “sec” parameter when mounting the NFS share. According to the Solaris documentation the default is “sec=sys” which means that NFS uses the locally acquired UIDs and GIDs. Like /etc/passwd, NIS or LDAP/PAM. But on Debian it seems to default to “sec=krb5″ or something. As I have close to no idea how to set up Kerberos and don’t want to (and talking to other people hardly anyone has used Kerberos either) I figured that it’s not really a sane default. I didn’t even ask for NFSv4 - just NFSv3. Perhaps I undeliberately set some /etc/default/nfs-common configuration setting wrong or whatever. It was just strange. So I set “sec=sys” in the options of the NFS share of my /etc/fstab and the problem was fixed.
Actually I wonder what network file systems other people use in a Debian environment. NFS somehow feels antiquated to me anyway.