KDE4.0 desktop working with Xinerama

October 31, 2007 at 1:18 am | Posted in KDE | 8 Comments

Recently me and a few other people raised the issues with running a KDE4 desktop in a Xinerama setup. Aaron explained that he doesn’t have such a setup, so there was no testing. During the weekend we met a few times and I acted as his test droid 🙂

So after making things kinda worse first (having a clone of the left screen over on my right screen) Aaron managed to fix the issues I saw.

Sorry, seems like while saving the thing wordpress managed to cut it off. So here’s the rest:

That means I now have 2 wallpapers, one on each screen, one panel thats correctly positioned on my first screen and he even managed to fix the dropping of plasma applets. Those always went to the furthest right point on the desktop instead of the point where I released the mouse button.

And to prove that I’m right, here’s the screenshot (click to enlarge):

I hope we (as in you fellow reader 😉 can fix more bugs during the KDE4 bug krush saturday, so that the KDE4 desktop gets into shape for a release.

If you look close enough you’ll already see a pretty bad bug on that screenshot, the buttons in konqueror. This seems to be an issue that both KDE4 kstyles share, its fine when using a Qt style. The symptoms are different though, what you see is Oxygen, in Plastik I get black rectangles instead of buttons. I’ll try to get that fixed with the style devs this weekend. Another thing I noticed while doing the screenshot (and trying to write the blog inside Konqueror/KDE4) is that quite some message boxes/dialogs are not using the KDialog api correctly – or at least it seems like that. The last line in the dialogs text label is only displayed half (the upper half), this looks as if the dialog doesn’t use KDialog::centralWidget() as parent, but instead does something like setting a layout on the whole dialog (as you’d do with QDialog).

KMail – filtering from Pop to Imap?

October 28, 2007 at 5:38 am | Posted in KDE | 8 Comments

Just got my lost mail back. Apparently it was just moved into one of the existing subfolder and by simple accident I found the. After some reshufling of the mails I wanted to switch from fetchmail+maildrop to KMail filtering.

Unfortunately it turns out that KMail doesn’t support moving mails into an IMAP mailbox automatically, at least that what it tells me when I setup a spamfilter which should move spam into an IMAP box of my local mailboxes.

A little background: I’ve setup a small IMAP server to be able to use KMail as well as MuttNg on the same mailboxes. AFAIK its not possible to share mailboxes between KMail and another program because KMail uses extra index files to keep track of certain information about the mails (I’m using maildir’s btw.). And I need MuttNg when accessing my laptop via ssh, so thats why I’m using IMAP to access local mailboxes.

So if anybody has an idea how to fetch mail from a pop3 account, run it through some filters in KMail and put them into various IMAP mailboxes depending on the filtering result I’d appreciate a comment.

PS: Reasoning to switch to KMail also for fetching/filtering is that I’d like to use the “only store mails for XX days” feature so my mailinglist folders don’t get too crowded.

Edit:Seems like the “only store mails for XX days” feature works with the creation or modification times instead of looking at the Mailheaders. Not very good, as due to the reshuffling all mails have a modification time from last night 😦

Speaking of backups

October 26, 2007 at 3:18 pm | Posted in KDevelop | 5 Comments

I decided to setup dovecot on my local boxes to easily share them between mutt and KMail (need mutt for remote access), which meant to rename all maildirs in $HOME/.Mail into .<box> to make it possible to see them over imap – what a broken convention 😦

Unfortunately I didn’t pay too close attention to the renaming command and did something like

find -type d | xargs mv $i .$i

so I lost all mail 😦

Backup to the rescue, I though – yeah doing that every week. Then the horror scenario: The backup disc ran out of space last time I did a back in August – AAAAAH 😦

So any mail I received between august and today is lost, including some pretty important private stuff. Lesson learned, am already repartitioning the backup pc so the backup disc has more space.

KDE4 status update

October 23, 2007 at 1:12 am | Posted in KDE | 2 Comments

Recently quite some blogs featured the current state of the KDE4 desktop, so let me put my 2 cent into that as well 🙂

I just built a release-version of kde4 on an AMD 1.3GHz machine with only 256MB ram, so its not quite state of the art. It runs Xorg 7.3 with the nv driver (GeForce2 card, I made sure to disable composite). I still can’t just run startkde via startx, i.e. startx startkde in a KDE4 environment fails to start X11, because X11 starts missing some libs then (my kde4 env changes LD_LIBRARY_PATH). So I’m starting an xterm and run startkde from there, thats a local issue I guess and I’m not bothered enough to find out how to fix it…

The first thing I notice is that I don’t get a wallpaper here 😦 Later it turns out that Plasma just needed some minutes to render it. The second thing: There’s a strange widget on my plasma panel, seems like a garbage-drawing horizontal bar. And besides having compiled kdebase after the kickoff move, still now K-Menu in the panel 😦

Next thing I notice: The plasma-desktop-widget in the upper right now properly enlarges itself, so I don’t have to guess the buttons anymore, yay 🙂 Now lets see if I get kickoff this way and guess what, not only I could add it to the desktop finally I can even drag the plasma applets onto the panel (didn’t work last week when I tried that on my laptop). I’m starting to feel more comfortable with this new desktop.

I started a few random apps, one of the first was konqueror. I didn’t do any thorough site-testing, but in the couple of minutes it didn’t crash, certainly beta quality. One thing that was rather strange: It took about 20 seconds for the initial rendering of www.apaku.de, though google loaded instantly. Then I tried my page again and waited again for quite some seconds. Clicking on one of the links to the subpages took again some seconds and then I got a message saying that the server timed out. Huh? Check on my KDE3 desktop, no not the server. Later I saw a cookie-dialog waiting in the taskbar, after accepting the cookie and retrying the site everything was fine again. So again just a small glitch that will probably be fixed soon, I guess konqueror just forgets to bring the dialog to the front and then waits for the user confirmation or something like that.

I know the games and also edu apps are in quite good shape (I run quite some of the games almost every day in my kde3 desktop, specially lskat and ksudoku). Still I wanted to see how blinken works in kde4 as it moved from games to edu. Unfortunately it gets stuck currently because it can’t play its own songs via phonon/xine. I’m not sure whats going on there, the sound plays fine in my kde3 environment (though amarok on my kde4 machine started from kde3 environment doesn’t play it either, maybe the xine stuff is somehow not completely installed).

Speaking of phonon, I then tried to play an audio cd with kscd, unfortunately it crashes instantly after it reads the cd 😦 Bugreport for that is on its way.

All in all the whole kde4 desktop still feels a bit slow, at least on that machine. Though kate is much faster than on my laptop that uses a debug build. Apart from that I can see a basic working desktop at the end of the year really happening. Especially if the pace of development stays where it was the last couple of weeks (remember that I blogged about the “bad” shape of kde4 some weeks ago). Guys keep up the good work 🙂

Edit:Redirecting the output from startkde4 (i.e. almost all stdout/stderr from kde programs) to /dev/null and setting Composite disabled (as suggested by various people) does give another slight speed boost. So for a beta3 I think its usable enough.

Baby steps with Gentoo

October 19, 2007 at 12:08 pm | Posted in General Linux | 10 Comments

Yesterday I figured that adding my ancient PIII/500 to my “build farm” (consisting of only my laptop at the point) wasn’t going to cut it (well seemed to save about 20% gcc-time during qt-copy build, but in the end the overall saving wasn’t that much). So I decided to free some space on my girlfriends pc and put linux on it.

As I’m pretty familiar with setting up debian nowadays I thought a change would be cool, so I decided to give Gentoo a shot. And I’m impressed actually. If you know your way around linux its absolutely easy to setup a system using the online manual, you don’t even need to read all the text just check which commands to execute 🙂

So I managed to have an icecream-enabled gentoo within something like 1-2 hours, not bad at all given that most things have been compiled from scratch. And it did work quite well. But then I wanted to check the USE flags and set them apropriately and having a look at the list of available options I was blasted away – a ton of things to configure. Also keeping compiling every night to maybe have a basic KDE sometime next week doesn’t sound too appealing to me.

So while I think this is a nice distribution, its not something for me at this point as I need to have a system up-and-running faster and with less configuration effort.

Ruby On Rails Rocks

October 14, 2007 at 11:29 pm | Posted in Uncategorized | 11 Comments

Yes, you’ve read right, this post is about Ruby on Rails, not about KDevelop 🙂 (at least not directly).

Friday I started to look into Ruby, because a) its currently hype and I wanted to look into Ruby on Rails for some idea how other web frameworks (besides J2EE/Spring) look/work/feel like. Well, the language itself was done in a good half of a day, not much new stuff if you’re used to a scripting language like python or perl already (probably a bit more for perl-enthusiasts). A few nice things like their iterators and leaving out parenthesis (though that gets confusing sometimes) or the full object-orientation – where python still has a procedural way of working. There are also 2 downsides I noticed, which are non-native thread implementation (hooray for cross-platform, but not so nice if you want to use 1 ruby app with multiple cores) and the IMHO more serious problem of dealing with plain byte-strings. This means either using 8-bit encodings for your strings or doing some workaround like using jcode and having to use special new functions like jlength instead of length. This is something I really dislike, we’re in 2007 after all.

Anyway, yesterday I started with a small nice-to-read Rails tutorial and got some of the basics straight. Also nothing really fancy here, except that its a lot less configuration compared to J2EE/Spring and also a lot more pre-generated-already-working code. So I have to code less and can create more 🙂 It also turned out that Rails people like to write books and get money off of teaching other people Rails. I managed to borrow a Rails book for a few days from a colleague and worked through most of the example-app (simple ordering-system for books). The result is that I’m really amazed how this stuff works together and how easy it is to create new stuff based on what you’ve seen so far. Like adding a remove-item-from-shopping-cart button that uses AJAX, if available, based on the add-item-to-shopping-cart. Really cool stuff and I guess if I can I’ll see that I get a job where I can use RoR.

Last but not least I’ll try to get KDevelop into this post: I’m using it to work on my rails app. Even without any parsing-support it already helps finding your way around. You get the quick-open stuff (at least file-based) to quickly jump to the files you need, there’s support for running the rails server and opening a browser that points to your app. And for coding there’s kate with syntax-highlighting for ruby, rjs, rhtml and all other filetypes, even indentation works quite ok once you’re not using the C-indenter 🙂 The only thing that I didn’t manage to get working are a few actions that should allow to directly jump between model/view/controller and the integrated shell, but thats already reported on our mailinglist.

KDevelop4 Subversion Support

October 1, 2007 at 12:31 am | Posted in KDevelop | 4 Comments

The last week I fully dived into reworking the Svn support. I know this sounds like waste of time, as Dukju already had quite some parts implemented. However I found the architecture quite weird, with a core-class which was mainly just a ton of methods to create jobs and threads for the various actions. All this somehow looked like procedural programming in an object oriented plugin.

I started by cleaning up filenames and such things and do a few small changes here and there until the point came where I wanted to start removing the need for the core class and making the threads an implementation detail of the svn-jobs. While looking at the existing code and how it did I noticed much, very much plain svn/apr setup code, like allocating memory for an array to store the paths to be comitted and such things.

I tried to separate the code out from the core class and put it into a ThreadWeaver::Job (to make it possible to steer the number of threads started within kdevelop), but at a certain point it became quite obvious that the svn C-API is very hard to use in an object-oriented way without building a OO layer on top of it. At that point I restarted the discussion I had quite some time ago among the kdevelop developers to introduce a new requirement and use RapidSvn’s C++ library.

Luckily this time I was in a better position to convince them and to prove that the code I have now (Just added svn-add action) here are two snippets.

The new code for svn add looks like this:

svn::Client cli(m_ctxt);
foreach( KUrl url, m_locations )
QByteArray ba = url.path().toUtf8();
cli.add( svn::Path( ba.data() ), m_recursive );
}catch( svn::ClientException ce )
kDebug(9510) << "Exception while adding file: "
<< url
<< QString::fromUtf8( ce.message() );
m_success = false;

And this is the equivalent old code.

kDebug(9500) << "SvnAddJob::run()";
apr_pool_t *subpool = svn_pool_create (pool());
for( QList <kurl> ::iterator it = m_wcPaths.begin(); it != m_wcPaths.end(); ++it )
KUrl nurl = *it;
nurl.setProtocol( "file" );
svn_error_t *err = svn_client_add2( svn_path_canonicalize( nurl.path().toUtf8(), subpool ),
m_recurse, m_force, ctx(), subpool );
if ( err ){
setErrorMsgExt( err );
svn_pool_destroy( subpool );
svn_pool_destroy (subpool);

Right, the absolute number of lines isn’t that different, however this is a really simple action, for other things its more visible. Also in the new code you see directly what happens and you don’t have to ignore certain code lines because they just setup some memory pool or set a protocol on a url thats a local path anyway.

One thing I have to investigate still is how much we loose by using svncpp, for example in the above code snippet you can see that the client api also supports the force-flag, while svncpp has no support for that. We could probably extend the svncpp api if really needed.

Create a free website or blog at WordPress.com.
Entries and comments feeds.