Thomas Bergheim dot com | Random ramblings on technology

KDE vs Gnome – who cares

So apparently Linus doesn’t like KDE anymore and here we go again. Apparently for people who LOVE KDE 3.5 the only choice if they don’t like KDE4 (yet anyway) is to switch to gnome. I’m writing this post on a KDE 3.5 installation and a big WTF floats in my head. If KDE4 doesn’t suit you, then why do you HAVE to move to gnome? People are raving about how good 3.5 was. Then don’t upgrade! It’s just stupid. Linus was apparently forced to “upgrade” from 3.5 to 4.0 which is fucked up. Fedora is obviously a distribution which suck nuts. KDE 4.0 was utter crap, and not recommended for average users, and for Fedora to force this upgrade and take away KDE 3.5 is just nuts. Actually a lot of other distros followed like sheeps, Kubuntu forced this upgrade with KDE 4.1, which is still a bad and not-yet-ready release in my book.

But all this poor handling and storm around KDE 4.0 just means what I (and many others) was thinking all along: releasing a major new version (4.0) and calling it a developer release is just stupid. Apparently they HAD TO DO IT in order to gain widespread adoption, all the while saying that this was NOT for endusers, and distributions should not include it. Sounds like a paradox to me. “KDE4: Developer Preview” or something sounds more like it. I’ve never heard of a .0 release not being intended for anyone except developers (sans all Microsoft software ofcourse), and KDE can’t just coin a new convention and excect it to work out flawlessly. I don’t like the convention either, it means that the average user will have no idea which version is intended for widespread release – it might be .1, might be .4, might be .129. Version numbering is pointless but if you are going to use it, .0 should be usable by anybody. KDE4.2 really is the first 4.0 for regular people. I still don’t think it is better than 3.5 though.

But, 4.2 really is starting to make KDE4 rise again. I never used kontact on KDE 3.5, but for some reason in 4.2 it just appeals more to me. Might be that it just looks better on 4.2, I d’no. Personally I am waiting eagerly for opensync 0.4 to stabalize and the kde4-pim plugin to be released. Nepomuk, when it is more integrated than in 4.2, will also bring lots of coolness to the desktop.


Back to Top | No Comments

Making fields unique when there are duplicate rows in mysql

So I had this table working as a many-to-many relationship for some things, with 2 fields, both foreign keys to other tables. Since there for some reason wasn’t anything enforcing uniqueness in the entries, there were several duplicate rows. If I tried to ALTER TABLE to add a primary key to the 2 fields (no PK was defined before), I’d ofcourse get a duplicate key error. I thought about it a bit – how can I clamp the duplicate fields on this thing without scripting?

After going back and forth with a few alter and join commands, it hit me; create a new table with the same properties, in addition to the primary keys, and populate it with the contents of the original table, ignoring duplicates. Easy!

INSERT IGNORE INTO new SELECT * FROM original


Back to Top | No Comments

Easy way to stop spammers/dos-attacks using lighttpd

First, enable mod_evasive, then add: evasive.max-conns-per-ip = X, where X is some integer.

This works, however if the same domain hosts images and files alike, it could lead to false positives. If a pagehit requires 90 requests, and the clientbrowser is set up to allow more concurrent requests to the site than max-conns-per-ip is set to, you will be blocked.

There is a very easy way around this though, enable this only for the frontcontroller. In my case this is what I ended up with:

$HOST["url"] =~"^/(index.php)?(\?.*)?$" {
    evasive.max-conns-per-ip = 4
}

This makes evasive track DOMAIN, DOMAIN/index.php?foo and DOMAIN/?foo, which is what I want. For finding a value that works well you’ll just have to monitor the errorlog for evasive-alerts.


Back to Top | No Comments

Strange Ubuntu 8.10 Ibex reviews

It seems STRANGE to say the least that all these reviews about the latest & gratest from Canonical doesn’t even comment the fact that session-support is for all practical purposes non-existant in gnome 2.24 (and therefore Ubuntu). Even more fucked up is the fact that gnome 2.24 does not even gracefully shut down applications when you log out of it, a mindnumbilngly critical releasebug that I can not for the life of me see why I seem to be the only one who cares about.

I don’t care about the OS. I care about my programs. Similary, I care much more about my home-dir than my root. I don’t care if gnome itself shuts down gracefully. I do care about the fact that logging out of gnome now is the equivalent to just pulling out the powerchord for all my programs.

At first I was pretty sure this was an Archlinux-specific bug, but it’s not. Reviewers keep bringing up tabbed nautilus and guest-support in the Ibex reviews. Tabbed nautilus, really? I was going to try gnome while waiting for kde4.2 but I think I’ll go somewhere else. It’s 2008 and session-support is not a fancy feature, it should be a requirement. Not to mention graceful shutdowns..

Reviews also mention how great it supports notebooks. These 2 features I just mentioned are quite critical for my laptop (if I had one), so what gives?


Back to Top | No Comments

Archlinux and gnome 2.24 != love

After struggling a bit with gnome it seems there are a few bugs (or unfinished features rather) with this latest version of gnome. First, session-support doesn’t work! That is really strange, since I consider it such an elementary feature. Second, systemtray-icons only work randomly. 2 really glaring bugs. Bodes well..


Back to Top | No Comments

Reinstall, ArchLinux, gnome..

So I’ve had a 1TB drive lying around for a few months, and since exams are comming up fast ofcourse now is the time to set it up. I’m moving everything from my old disk to the new, and at the same time I decided to just reinstall everything.

I’m leaving room for a 64bit distro, vista and possibly more as well, but my main-os will be ArchLinux 32-bit. I’ve used 64-bit a bit, but frankly there are no benefits in practice and more than a few inconveniences.

Since KDE is a bit in limbo for me these days I also thought I’d try out a few of the alternative desktops, and I’m starting with gnome.

The first thing I noticed is that gnome 2.24 in arch seems to have a problem with the systray icons. All the programs that use trayicons (xchat etc) ended up with 2 windows, one for the program and one for the traycons. I tried a bunch of things, including erasing ~/.gnome* and ~/gconf*, but that didn’t do anything. However a pkill gnome-panel twice did! I tried a pkill gnome-panel again just to see, and then the icons went back to the windows again. This seems related, although none of the advice there helped either. I’ll see if this just magically resolves itself..

gnome-terminal didn’t play nice with my keyboard either. Found this on the zsh wiki, and well, now it does!

I could never quite understand the need to duplicate a project just because it doesn’t have the right toolkit, but since alternatives exist, I’ve tried Exaile instead of amaok and emesene instead of kopete. They both seem to work pretty well. Actually emesene is very good, the only thing is it only works on MSN.. Evolution replaces kmail at the moment, and thunderbird will replace evolution, depending on my experience with it. Frankly I’m not too impressed with kmail, so this is a pleasant change.

Arch is semi-simple to set up. I like the bare-bones approach like Gentoo, but sometimes it can feel like you have to do a few unnecessary things. Edit /etc/rc.conf, /etc/inittab, /etc/locale.gen.. It’s not hard if you have an idea where to look though, and even though it takes a bit more effort to get installed, the end result is well worth it.


Back to Top | No Comments

PHP sessionfiles in the hundred-thousands?

If you are using Debian, session.gc_probability is set to 0. Apparently a cronjob should take care of things, but in my case I ended up with 300k+ files in one folder. Since the process is running as the same user, setting session.gc_probability to 1 shouldn’t be a problem, and it wasn’t. A few seconds later I was down to 2-30k files instead.


Back to Top | No Comments

Subversion troubles

So I was trying to set up svnsync today. After reading a quick guide, I got to it. After running

“svnsync synchronize URL_TO_MIRROR_REPO”, it started synching until revision 9, where it stopped with an error – “Filesystem path ‘%s’ is neither a file nor a directory”. After comming up with basically nothing from searching, I tried a svnadmin dump instead, but I got the same error:

* Dumped revision 1.
* Dumped revision 2.
* Dumped revision 3.
* Dumped revision 4.
* Dumped revision 5.
* Dumped revision 6.
* Dumped revision 7.
* Dumped revision 8.
* Dumped revision 9.
svnadmin: Filesystem path ‘trunk/data/servers/servers/HLS.localhost;27015′ is neither a file nor a directory

I looked around and found fsfsverify, but it didn’t do anything for my problem.

Revision 9 and 10 is about 2 years old, running on Centos 4.7 (which I absolutely hate by the way – what, you can’t upgrade between major versions? A REINSTALL is what they recommend? Okay, Debian and its derivatives has supported this for about a decade with apt but whatever), so it is safe to say that the svn version was <= 1.1 at the time (and it actually would be now still, if it hadn’t been for RPMForge. I’d upgrade Centos to 5.2 which contains packages that are only old instead of ancient if it wasn’t equivalent to destroying that ring everybodys talking about.)

Anyway (I don’t like rpm/yum, can you tell?:)), the actual path it complains about in the errormessage (the %s) contains a semicolon (“foo;bar”), and since it is the only file in the repository with a semicolon in it, I am enclined to think it is related. I then tried running svnsync dump -r1:9 > svn.dump (-r10 was the revision that it stopped at), and then svnsync dump -r10 –incremental REPO >> svn.dump and lastly svnsync dump -r11:HEAD, but the second command failed with the exact same error. What to do?

Luckily the error was early in the revisionhistory (-r1:10 revisions) and there was really nothing worth keeping historywise either (basically just initial commits, files added etc). So in the end, this command did the trick: svnadmin dump -r11:HEAD REPO > svn.dump. This means I lost the first commits, but since they only added files it didn’t really matter. Ideally I’d like to know why this happened, but the svn version was so old at the time (<=1.1) that I’ll just forget about it for now. Let’s hope it doesn’t happen again!


Back to Top | No Comments

Cheezburgers for all!!!1


Back to Top | No Comments

Gentoo updating or: why I don’t like Gentoo on a server

So the other day I decided to do a full update on Gentoo. I normally do these things way less often than I probably should, but there is a good reason for that.

I’m not even halfway through a systemupgrade, and here’s just a few things that failed during compile: openssl, wget, sgml-common, glibc, libcrypto.. and I’m not even halfway finished compiling. Everytime this happens I have to investigate the problem and manually continue with the upgrade.

Such a change from debians 1-minute aptitude upgrade. I like the useflags, but if I ever reinstall I’m thinking it won’t be Gentoo again.


Back to Top | No Comments