[Screencast] KMix QML Applet, the real one

When I started writing my last blog post, exactly two weeks ago, I never imagined that I would receive so many positive feedbacks and responses1 for a project that, as I’ve always restated, was just an proof of concept and nothing more.

Anyways that experiment (and the act of sharing it with the community) leaded, besides the comments, to an awesome consequence: the developer in charge to improve KMix DBus interface and provide the Plasma applet replacement, Igor Poboiko2, sent me an email the same day I wrote the aforementioned post.

Long story short: he was busy (like me) with College duties so, after refactoring the DBus interface, he was forced to stop his work. But theย  amazing news was an other: he even wrote a Plasma DataEngine, and a Plasma Service for KMix ๐Ÿ˜€

So we joined our forces,ย  I advised him to publish his work on reviewboard (he did a huge work, kudos!) to receive more feedbacks about his doings and I started coding, on my spare time, to a new KMix applet replacement. Since I had at my disposal this new “mixer” Plasma DataEngine, I started wondering why not making a QML applet, instead of a regular C++ plasmoid.

No sooner said than done, and this is the result (still incomplete) of my work:

[blip.tv http://blip.tv/play/AYKsjjsA%5D

[HQ Version]

The applet has all the basic functionalities required for a mixer, you can modify the volume level/state for each control (in my past experiment, I was only able to act on the Master) but still, there is a lot of room for improvements.

I was really impressed about the power of QML and Plasma technology combined (plus some Javascript flavors),ย  I think I’m in love with them ๐Ÿ™‚

As soon as Igor’s work will be published, also mine will land on reviewboard and, hopefully, will be part of the kdemultimedia module ๐Ÿ™‚

Stay tuned for updates, cheers!


1: I even scored the busiest day on my blog, and my previous record was half of the visit I received that day O.oโ†‘
2: Unfortunately, he doesn’t have a blog; I’ve found his sourceforge and twitter page, if you are interestedโ†‘

KMix plasmified [Screencast]

Hello folks, it’s been a looong time since my last post. Three months ago, during the Christmas holydays, and inspired by Aurelien’s posts about how improve UI’s in KDE-Land, I got inspired and started submitting some small patches to plasma and ksysguard, and then I focused on an application I (and I think all of you) use a lot: the audio applet.

KMix has a fancy monochrome tray icon, which makes it appear homogeneous with the other plasmoids contained in the Notification area. From a non-developer point of view, this is great: the user doesn’t need to know the difference between a regular application and a plasmoid placed in the notification area; he/she simply has to use it. The problem raises exactly when we want to use it: instead of showing to the user a beatiful interface which takes advantage of the Plasma API, the audio applet shows the old and plain slider with a regular pushbutton, destroying the feeling of an homogeneous and polished panel. Moreover, if the notification area is embedded in a vertical panel, when you click the KMix tray icon, the widget partially covers the panel.

For these reasons, I started porting KMix as plasmoid. I encountered some troubles so I contacted the mantainer whom kindly told me that port was already started by an other developer. So I leaved that project, and focused on something else. Why this post then, you may ask?

About one month ago my exams session started and, as usual, I got inspired on some projects (daaaamn :P) and specifically on KMix. I was curious to see how a possible port of KMix to Plasma would look like, so I’ve started this small experiment/proof of concept.

In the video below, you can see what I did, plus a cool feature made possible thanks to Plasma:ย  a minimalistic media panel ๐Ÿ™‚

(Sorry for the bad quality of the video, but recordmydesktop is not working on natty, plus I’m having problems with fglrx so I’m using the opensource driver1)

[blip.tv ?posts_id=4858227&dest=-1]

[HQ Version]

Some screenshots for those that don’t want to download 53 MB of video:

KMix Applet - Collapsed in an icon

KMix Applet - Popup shown

KMix Applet - Controls shown inside panel

Pretty cool, isn’t it? ๐Ÿ˜‰

However, there are a lot of issues with the current implementation, mostly because I’m using DBus calls to an interface exposed by KMix. Don’t get me wrong: it is awesome, because saved meย  a lot of headaches like dealing with alsa/oss and whatever but, on the other hand, the interface exposed to DBus is outdated and far from complete. For example, you can retrieve only the ID of the master device and set/get/mute/unmute only that device, there is no signal exposed for notifying changes of the volume level, so you cannot be notified of the volume level if an other app is modifying it unless you repeatedly poll the result of the masterVolume() call2. Sometimes, when adding/removing multiple instances of the applet3, plasma crashes (this is my fault). Since I rely on DBus calls to get/set the volume, this means that you can’t quit the old KMix application; however, you can open KMix main window, click on “Configure KMix”, uncheck the “Dock in system tray” option, and then close the KMix window.ย  In this way KMix will run in the background, wihtout showing himself in the notification area, and you can enjoy the plasmoid version ๐Ÿ™‚

If I didn’t scared you enough and you still want to give it a try (until the official version will be released) you can grab the code from my personal repo, and then compile and install it as usual.



1: By the way KWin’s “Magic Lamp” effect works way better with the opensource driver rather than the closed one, so much win ๐Ÿ˜€ โ†‘
2: The mantainer told me that the developer in charge of porting KMix to plasma is also writing a better and efficient DBus interface, to allow a fine-grained control of the Mixer object, so the official release will really kick ass! โ†‘
3: I know that it does not makes sense with the current implementation, since I can only modify the master channel, but I like to test all the possiblities ๐Ÿ˜›โ†‘

KDE project template(s) for QtCreator

Laziness is such a great virtue, sometimes ๐Ÿ˜€

Yesterday I was sitting in front of my computer, ready to start an application from scratch, and I felt very bored when I thought about all the files I need to create every time in order to have a minimal and functional application to start with. You have to write a CMakeLists file (and every time I forget to set some vars, or make some stupid typo), a .desktop file, a main.cpp source file and a class.h/cpp files. Oh God, why QtCreator doesn’t ship with some simple and handy template for KDE projects?

So I sat down, learned how to build a custom template wizard, and here you go: I made three project wizard: one for KDE console app, one for GUI ones, and the last is a plasmoid wizard template ๐Ÿ™‚

And, of course, now I’m gonna showing you some screenshots!


Overview of the Projects page

Overview of the options inside the KDE gui project page

Overview of the options inside the Plasma Applet project page

Final result

Of course these wizards are far from being complete, so any comment/suggestion/critics is highly appreciated ๐Ÿ™‚

You can grab the templates by cloning my repository:

$git clone git://anongit.kde.org/scratch/casella/qtcreator_kde_wizards

and then simply copy the folders under $HOME/.config/Nokia/qtcreator/templates/wizards or /share/qtcreator/templates/wizards/ .


Say hello to KDE on Ubuntu Natty Alpha1

Pheeew, after some struggling, I finally managed to compile KDE from trunk (4.6.40) on Ubuntu Natty Alpha 1 ๐Ÿ™‚

KDE SC4.7 from trunk (4.6.40) running on Ubuntu Natty Alpha1

KDE SC4.7 from trunk (4.6.40) running on Ubuntu Natty Alpha1

For those whom are waiting for a step by step guide about how to build KDE SC from trunk, I will not release it until the git migration will be done. The situation now is both delicate and a little messy, with modules partially splitted over git and svn. Almost weekly, a couple of submodules are moved from svn to git, and keep track of that changes in a blog post before a reader tries to build the whole thing is not feasible.

Anyway, Merry Christmas ๐Ÿ™‚

My New Laptop Review

Ok, it’s been over three weeks since when I got my windows-free laptop. During this time, I’ve ran KUbuntu 10.10 with KDE 4.5.?ย  for about a week, then I moved to KDE trunk as usual and now it’s time to share my two cents (and personal random thoughts and rants) about this laptop ๐Ÿ™‚

Technical Specs

The full reference is listed over here; below, I’m listing only the changes I’ve made from the configuration showed in the website.

  • Cpu: Intel Core i3 330M (2 cores@2.16GHz with 4 threads running concurrently);
  • Hard Disk: removed the default 320GB hd and replaced with a 128GB Kingston SSD;
  • Ram: upgraded to 4GB ddr3.

One really cool thing about this laptop is the possibility to mount up to two (sata) hard drives and, since my old laptop has a sata drive too, data recovery was amazingly easy: I simply had to remove my old hd and install it in my new laptop, and then move the content of my home directory to the new location, that’s all!


Design is the first thing you notice when you unpack you laptop, be it its finishes or its input/output ports placement. Design (and design choiches) affects the way you are going to use your notebook, and it is responsible of the sensations you feel when you see it for the first time1.ย  Since I really care about design, let’s start with showing some pics I took to both my new and old laptop, and sharing my nit-picking opinions (I’m sorry for the quality of these pictures, I made it with my cellphone):

New laptop
My new laptop
Old laptop
My old laptop

The overall look of the new one is quite good: the 17.3″ screen is absolutely amazing, and the satin-finished chassis gives a professional appearance to the whole.ย  I said “quite good” because, on the other hand, this laptop gives me a sensation of brittleness due to its tiny screen pivots (in the old one, they are firmer and bigger).

One thing I reallyย  miss in this laptop is the presence of the multimedia keys (play/pause/stop/next/previous); every time I need to change track within amarok, I need to switch the application I’m currently working on, or set a weird shortcut to do the dirty work for me ๐Ÿ˜ฆ

Other minor annoyanceย  are the ports placement. Let’s start, for example, with the audio jack port. In the following picture I’ll show where they are situated, and the nuisances arose with a wrong2 positioning.

Audio jack placement, new laptop

Audio jack placement, new laptop

Audio jack placement, old laptop

Audio jack placement, old laptop

Audio jack, new laptop

Audio jack, new laptop

Audio jack, old laptop

Audio jack, old laptop

As you can see, the audio jacks has been moved from the bottom-right border (old laptop), to the top-right border (new laptop); since I’m used to wear headphones for about 90% of my time (so does my brother too, in order to listen our favourite songs, watch our favourite movies etc.. without bothering each other), this means a headphone cable always annoying my right hand3. The annoyance is even greater when you play a game (did I mentionend quakelive? :P), and you notice that your movements are not as fluid as before. An other detail I miss a lot is the wheel volume controller. You can clearly see it in the Audio jack placement, old laptop picture: it’s the first element from the left. This could sound silly, but how many times happened that someone has turned on his/her laptop in the College library, and the infamous login sound spreaded loudly all over the rooms? With a simple wheel scroll-down, the quiet of the library would be preserved ๐Ÿ™‚

The power supply jack is an other example of not so wiseโ„ข placement.

Power jack, new laptop

Power jack, new laptop

Power jack, old laptop

Power jack, old laptop

In fact, it is now placed between other I/O devices (ethernet, usb, e-sata and ieee1394), rather than being situated near an edge of the chassis, far from other ports. So, in the worst case (which also happens to be mine), the power supply cable lies along the whole length of the back panel, occluding the other ports and forcing me to manually move it away every time I need to plug-in my external hard drive, or ethernet cable.

Ok, now stop being fussy, and let’s talk more interesting stuff ๐Ÿ˜‰

Hardware compatibility

This is a major point for every Linux user, so I’m going to describe the issues I’ve encountered while running a KDE SC 4.5 from a live-cd distrubution, from an apt-gegt updated version of it, and finally from trunk (KDE SC 4.5.86).

  • KUbuntu 10.10 (with KDE 4.5.?) live-cd: wireless adapter, webcam, bluetooth, memory card reader, screen brightness fully working, suspend/hibernate too. Unfortunately, the audio was completely absent: I’ve tried to tweak alsa and phonon, with no results. Desktop running at the maximum resolution, but with desktop effects disabled.
  • KUbuntu 10.10 installed on hard drive: upgraded to 10.10.1, with KDE 4.5.3: again, wireless adapter, webcam, bluetooth, memory card reader, screen brightness, suspend/hibernate fully working. After tweaking alsa-base conf, I got the sound working from the audio jack, but still no sound from the speakers. I experienced a lot of X crashes with the Ati proprietary video drivers, but switching to the experimental ubuntu repo (ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu/) did the trick ๐Ÿ™‚
  • KUbuntu4 10.10.1 with KDE 4.5.86:ย  wireless adapter, webcam, memory card reader, suspend/hibernate fully working. Bluetooth keep crashing kded, so it’s disabled for now (I barely use it, however). Screen brightness is not working anymore, so here it is an other interesting thing to investigate during this holidays :P. Audio still refuses to work from the speakers, this is kinda disappointing but I’m also confident that in the next few upgrades it will be fixed. Plasma desktop works like a charm, with all effects enabled and very little footprint, compared with two months ago. Good job, guys ๐Ÿ˜‰


Ooh, I really enjoyed writing this chapter!

After installing KUbuntu for the first time, I wasn’t that curious to see how much time the SSD took to boot the operating system up. The reason is simple: as every one of you most likely did, I read a lot of reviews about SSD performaces and the opinions were (almost) always the same: the more performant are the Intel ones, next the Corsair, and then the Ocz and Kingston drives. I was absolutely amazed when i discovered that my fresh Kubuntu install took only ~9 seconds to boot, against my usual 30 seconds and more!

Now, with after a month of use, upgrades, and a full switch to KDE from trunk, the boot time is still impressive, around 11 seconds5. Check the video below, if you don’t trust me ๐Ÿ˜›

[blip.tv ?posts_id=4560072&dest=-1]

As you should have guessed from a small detail on that video, I was so curious to test the boot speed on other operating system that I grabbed a copy of Windows7 license kindly offered6 by my University, created a partition,ย  installed Win7, and performed some tests. And guess what? It took 23 seconds to show the login screen, really slow compared with Linux boot. But the interesting part of the test isn’t come yet. I’ve measured the boot time of my brother’s laptop (a cheap model, 6 months old), powered by an usual sata drive@5400 rpm,ย  surprisingly scoring only 31 seconds! Just 7 seconds of improvement between a fresh Win7 install on a SSD, and a 6 months old installation on a 5400rpm sata drive… sounds like Windows’ Failboat delivered a huge present to its customers, again.

However, boot performance aside, let’s come back to our Linux/KDE world. Benefits of an solid state disk are more than just boot speed. The whole desktop experience is more fluid, fast and resposive (of course credits must be given to the Cpu and Ram too, see below). One example for all, OpenOffice: every time I opened an office file with it, it took ages to load and open it. Now, the app is amazingly quick.

The same for Dolphin: I have the bad habit to put everything in my home folder to save time and, when launching dolphin in the past, it took over 6-7 seconds to show up: now that time is significantly decreased.

Last, but not least, is the quietness of the whole computer: when it’s not performing heavy tasks, the loudest noise you can hear is the cpu fan.

Ok, I’ve talked a lot about solid state disk performance. Now, it’s time to spend some words about the cpu. As I’ve already said, it is responsible of the snappiness and fluidity of the whole desktop. But, from a developer perspective, what really matters is “How much time does it take to compile the package X.Y?” ๐Ÿ˜›

With my old laptop (running a Core Duo T7200@2.0GHz), I measured the compile time of the QT framework (Qt 4.7.0 RC1, on early September), with the following configure switches

$./configure -qt-gif -debug -fast -system-libpng -system-libjpeg -system-zlib -dbus -webkit -no-phonon -plugin-sql-mysql -developer-build -declarative -opensource -script -scripttools -nomake examples -nomake demos -prefix /opt/qt4

and a MAKEFLAGS environment var set to -j3. With this setup, it took 94 minutes to compile everything.

With the same setup, and MAKEFLAGSย  set to -j6, the new laptop scored an incredible result of only 40 minutes! But the detail that impressed me even more, is the overall responsiveness of the desktop: I could chat, watch videos on youtube, and desktop effects were running seamlessly, with small lags between the action that triggers the effect, and its actual accomplishment! With my old laptop, all of this was a mere dream (if someone owns my same old cpu, and ever tried to do what I did, knows exactly what I’m saying).

Kudos to the Intel Engineers for this awesome product, and of course to the Linux kernel developers too, who were able to exploit cpu resources at their best!

And now, the graphics card and the ram. The best way to pushย  graphic card and ram to their limits is toย  –play the latest game?– , of course no! It’s performing real-time computation on graphical data, which means 3D modeling a high-poly object. Unfortunately, I don’t have Maya for Linux here, so I downloaded and installed ZBrush (take a look at it, it’s a very impressive piece of software) and started modeling a sort of alien face using HD geometry. For a graphic card designed to be installed on a laptop, I must admit I was surprised of the level of details I’ve been able to reach.

Wait, the review it’s not finished yet! There is still the audio performance to talk about. Even if the audio is half working on linux, and I hope to get it fixed soon, having an other OS gave me the opportunity to test how all the components works. And, hell, the speakers plus the subwoofer are really kick ass! They play sounds clear and loud, very very loud!


In consideration of all the points I’ve discussed in this post, I give to this laptop 8 out of 10 as final score. The performances are good, but the hardware compatibility with Linux is not as good as I would expect from a high-end laptop. If I was a person with no experience on tweaking linux, I’d probably switched to Windows after the second try on the audio configuration process. Design is fine, but could be better for, again, for a high-end laptop.

I hope I don’t have annoyed you with my loooong and enthusiastic review about my laptop, Merry Christmas and Happy New 2011 =)
A special thanks to my friend Alberto, who spent his time to help me with the ATI driver setup (and his trolling mood too :P), and to my beloved girlfriend Mariaelena, who bears the weight of my nerd vein!


1: Sounds kinda romantic, isn’t it? ๐Ÿ˜› โ†‘
2: In my opinion, of course. โ†‘
3: This might sound silly but, hey, try working on a computer with your right hand 10 centimeters farther than you were used to, and then we will talk about it.โ†‘
4: Well, let’s say the basics packages of K/Ubuntu 10.10.1 because, if you read some of my older blog posts, I completely build KDE and QT from sources, so I don’t need the ones supplied by Ubuntu (I apt-get remove all of them after every new system install). โ†‘
5: Now, I’m REALLY curious to see how long does the boot sequence take on an Intel Extreme SSD … โ†‘
6: Whooops, i forgot the <sarcams></sarcams> tag here.โ†‘

Ordered my new laptop, Windows free =D

[Edit:] Got the laptop, time to build KDE ๐Ÿ˜€

This is not a kde-related post, so you can skip it if you like. However, since I managed to achieve this awesome result, I thought it’s worth sharing it with the community ๐Ÿ™‚

As you should’ve noticed,ย  I’m not on irc anymore because my old laptop broke1 (after more than 4 years of honourable service), and it was my only computer at home. So, during this period, I looked for vendors that sellย  linux-based laptops.ย  The criteria were the following:

  • Linux powered, or no operating system at all (of course ;));
  • 17″ screen size: since this laptop will be my only computer, I’m going to use it for coding, university stuff, multimedia and I don’t want to stress too much my eyes with smaller screen sizeย  (I’m already myopic asd);
  • Intel i3 or i5 processor;
  • a good video card;
  • a reasonable amount of ram and hard drive space ๐Ÿ˜›

Turned out that most of the vendors that respect my first criteria are located in US, and they can ship their products only in US and Canada (some of them to Europe, but with restrictions) . The only exeption was zareason which ships worldwide but first,ย  — what if the laptop will broke? I can’t wait months for being fixed — and second, they don’t provide a 17″ model at the moment (unlike System76 does, for example). Of course I found a couple of vendors in italy, but they are quite unknown compared with the aforementioned ones, with little possibility of customization too.

So, before my surrender, I decided to give a last try with my previous laptop vendor (www.enface.it). I was really happy with it: a very good machine2, with an amazing audio and, a bright display and a good processor. Four years ago I was more naive than now, and when the retailer told me — “No, we aren’t allowed to sell you our laptops without XP” — I didn’t insisted; instead, I agreed.

But not this time.

After configuring the laptop according to my budget and wishes, here it is the most important part of our conversation:

Advisor:ย  “Now, by default this laptop comes out with windows7 Home Premium, but I think an upgrade to Professional would be a wise choice.”

Me: “Actually, I don’t want any Windows operating system at all.”

A: “What?”

M: “You heard me: I don’t want Windows in my laptop.”

A: “Well, this is not feasible because the vendor and Microsoft made an agreement, and we can’t overcome that.”

M: “I’m not pretty sure about that. I downloaded, printed and readed the full Windows7 EULA and, at page 1, it says — “By using the software, you accept these terms. If you do not accept them, do not use the software. Instead, return it to the retailer for a refund or credit” –. I’m saying I don’t want to use that software, ergo you don’t even have to waste your time with installing it; simply skip that step, subtract its cost and that’s all.

A: “I’m sorry, but we can’t. Furthermore, for a smoother and immersive desktop experience, we strongly recommend you Windows7.”

M: “I’m sorry for wasting your time then, because I have no intention on buying a laptop with Windows. I’ll try somewhere else. Sorry.”

A: “Hmm wait, let me make a call to the tech-support, ok?”

M: “Ok.”

[~30 seconds phone call]

A: “Ok, seems like it’s possbile to ship our laptops without OS. However, because of the agreement we and Microsoft made, the cost of the license is far different from the one you can find in a store. We can refund you 78โ‚ฌ3 though.”

M: “That sounds great! Where should I sign?”

So yeah, an other little battle won against Micro$oft dictature ๐Ÿ˜€

If some you guys are in the same situation I was, just remember these two things:

  1. never give up, be perseverant!
  2. you are not asking anything illegal, neither you are stealing a percentage of the retailer’s income: it’s your right to refuse Microsoft EULA and, if the retalier doesn’t allow you doing so, he is acting illegally, not you!

I will receive my laptop in about a week, so expect an other blog post with more details soon ๐Ÿ˜›

Cheers !!
1: Because of an unfortunate event beyond my control, daaaamn ='( โ†‘
2: if you are curious, check the tech details here (italian only) โ†‘
3: About 104$, not so bad at all! โ†‘

Thoughts about this Summer of Code :)

Yesterday I was thinking about my whole GSoC and what I learned and did during this period and, regardless the evaluation that Aaron will fill about my work, I must admit that this year I’m very excited about what I’ve done ๐Ÿ˜€

In fact, during these months, I :

  • learned the QCA framework, and wrote the authentication library on the top of it;
  • got in touch with their developers, and asked them for improvements;
  • recognized QCA limitations, took the decision to move to the GpgME++ library, learned it, and ported the authentication library to this new library;
  • debated with the open-collaboration-service guys both at #ghns and on their mailing list about adding gpg support;
  • took part in the drafting of the new Open Collaboration Service API;
  • learned how the Attica library works, and modified it in order to make it work with the testerver they put online;
  • improved the KNewStuff3 library to retrieve, process and show the authentication informations.

Compared with the last year, whenย  I worked on PlasMate, this year I really enjoyed my gsoc, had a lot of fun and met great people.

That’s why I want to thank Aaron for begin my mentor, Frederik Gladhorn and Frank Karlitschekย  for our talks about the open collaboration draft and their help with the testserver, Marc Mutz for his help on the GpgME++ library, Justin Karneges for his support with QCA, and Pinotree for his advices ๐Ÿ˜‰