KDE on multiuser/multicomputer systems?

November 13, 2009

On my schools computer lab we have lots of desktop computers all with gnome, kde and various other wm’s installed, with the home folder shared across all computers. Lately I’ve become more and more conscious of the various bugs setups like this bring in KDE. Even though most of the computers in question run the same (k)ubuntu, there’s many times more glitches than a similar single-user system. Things like “do you want to forget these audio devices” popping up on every login, plasmoids randomly failing to load when changing computers, wallpapers also randomly going blank, having to resize the panels when changing to/from a widescreen computer, plasmoid positions jumping around, etc etc, they all make me wonder how much the changing environment case has been taken into account designing the KDE desktop.

Are there tricks to get working setups for my case? Would the best bet perhaps to be to only use a least common denominator type of setup, only introducing new stuff when I know they work everywhere? Or am I crazy to even expect the desktop to work similarly on a (seen from KDE configuration POV) constantly changing environment?

Tip of the day: Quickly extract archive from command-line using Ark

August 28, 2009

Here’s a little tip you might enjoy. I’ve been using this for some time now whenever I’m too lazy to remember how to extract something.

To extract any archive, and create a subdirectory if there is none in the archive, use this:

ark -b -a [archive(s)] …

-b is short for –batch, and just signifies that this will be handled without using the GUI. Note, that the KDE notification area will still be used for progress display.
-a is short for –autosubfolder, which creates a directory as mentioned above.

Have a look at ark –help for more things that can be done with the batch interface.

The FOSS cross-platform camp and the other people

June 27, 2009

Very recently I discovered a friend at my university who was a lot more into coding than I thought. The night before while drinking we had actually had an interesting conversation on C++ vs D, so I imagined it could be fun to hang more with this guy. I knew he was a windows user, but lately just about everything I do has been cross-platform, and I assumed that we had come to a stage where most people cooperate irregardless of their OS preference.

So the next day I show him two of my current projects, both involving qt and linux. Seeing qt, his response was “Oh, qt? how can you cope with that stuff, it sucks. It’s so bloated and slow” Naturally, I had to ask why he thought this, and his response was that he had tried once before and was put off at how big the exe files ended up as, so he just left qt then and instead went for the more ambitious win32 coding instead. Immediately my expectations about this guy sunk to a whole different level.

I remember a time when I was like this too – I knew only visual basic, and was happy with being able to double click small compiled exe files that would make the screen flash in various colors. The only crowd I made stuff was of course other windows using friends, there was no concept of cross-platform stuff.

Sometimes I wonder why we even strive for cross-platform at all. I don’t really want to think of windows users as “those other people”, but often I do.

Disclaimer: I only wanted to tell this story, don’t draw any too big conclusions from this post 🙂

KDE search collection – making KDE web resources more discoverable

April 15, 2009

Like any self-respecting geek would do, I often sit down leaving more important things, in order to make some other process a little bit more efficient the next time you have to do it. This time I spent a little time putting together a html page with a collection of the search engines I very often use for various information on KDE development.

I hope this will be useful, especially for newer users that may not be aware of how many greats services there are out there for development related searches. For experienced users I also stuck a little cheat sheet in there (so far only for the BKO search), which might be convenient for all those easy-to-forget syntactic sugar provided.

Here’s the url for now:


Suggestions for changes, additional search engines etc in the comments.

glxgears benchmark…?

April 12, 2009

I think it’s funny how often you see the phrase “…I know it’s not a benchmark, but I get XX fps with glxgears…”. If you actually did understand that it’s not a benchmark then you wouldn’t use it as one.  *sigh*

Isn’t it about time someone threw out that fps printf in glxgears?

Drag’n’drop menus/Ark “extract here” popup menu

April 2, 2009

KDE Brainstorm is great, when I was a little bored of fixing bugs and started feeling tired of the same code all the time, seeing peoples ideas once again brought me back to the coding mood. What they suggested this time was a menu where you can drag an archive file, and have “Extract here” pop up in the menu at the destination where the file is dropped. Looking at dolphin/libkonq code I saw that there was a TODO for actually bringing this kind of functionality back (remember dropping an image file on the desktop and getting “set as wallpaper”?) So I dived in and started hacking on a new plugin architecture for adding this kind of popups.

At this point the code has not been polished and is not ready for commiting yet, but it will be in a few days I think. Screenshot:


For anyone that want to extend their application with an item like this, now is the time to act to get it ready in time for 4.3. The “set as wallpaper” plugin will also be trivial to implement and is up for grabbing for anyone looking for a junior/junior high job.

These kind of conveniences are, in my eyes, the small but important things that made KDE what it is.

Ark: new cli-interface opening for junior jobs?

March 20, 2009

Greetings fellow KDE coders. Here’s a quick update on what I’ve been working on lately. Apart from the bugfixing (which there have actually beenquite a bit of to get ark stable lately), I’ve been working on a new interface that makes it very easy to implement a new plugin for your favorite archive format. Uptil now, implementing a new format meant handling the whole process execution, and parsing the input etc etc. So I’ve been trying to create a class that generalizes this whole interaction with process-based archive formats: the cli-interface.

With this new class, all that is needed to add support for a new file format is a class with two functions: one that is called for every line of the file listing, parsing the output and emitting file entries that are passed onto Ark, and another one that supplies a QHash containing all kinds of properties describing how to interact with this process (for example, a regex looking for a “file already exists” message, how to respond when this happens, how to tell the process to delete a certain file, etc etc.) An api listing of the properties defined so far can be found here.

The whole point of this class is to make implementing a new class less of a hassle than it was before. Once support for adding and deleting files has also been added, I hope people can either take up any of the file format requests on bugs.kde.org as junior jobs and implement the format, or even just mail me a list of the various properties for your favorite archive format. Eventually I hope to be able to reach the same number of file formats that Ark for KDE3 supported.

EDIT: just in case someone was curious, here’s an example of the parameter list for the rar-format (so far).

virtual ParameterList parameterList() const
static ParameterList p;
if (p.isEmpty()) {

p[CaptureProgress] = true;
p[ListProgram] = p[ExtractProgram] = p[DeleteProgram] = p[AddProgram] = “rar”;

p[ListArgs] = QStringList() << “v” << “-c-” << “$Archive”;
p[ExtractArgs] = QStringList() << “$PreservePathSwitch” << “$RootNodeSwitch” << “$Archive” << “$Files”;
p[PreservePathSwitch] = QStringList() << “x” << “e”;
p[RootNodeSwitch] = QStringList() << “-ap$Path”;

p[FileExistsExpression] = “^(.+) already exists. Overwrite it”;
p[FileExistsInput] = QStringList()
<< “Y” //overwrite
<< “N” //skip
<< “A” //overwrite all
<< “E” //autoskip
<< “Q” //cancel

return p;

How to disable the guidance-power-manager from autostarting in kubuntu

March 12, 2009

If you’re one of those using kde 4.2 on kubuntu, and getting annoyed at guidance-power-manager starting up all the time while you instead want to use the more integrated powerdevil, here’s the clean solution.

The Autostart spec says that adding Hidden=true to a desktop file says that it should be completely ignored. This is, by the way, also what happens when you enable/disable the checkbox in the system settings autostart manager. The autostart manager, however, does not include the autostart items added from the root /usr/share/autostart folder, so here is how you do it:

In  $XDG_CONFIG_HOME/autostart/  (defaults to ~/.config/autostart ), create the file guidance-power-manager.desktop and add the following two lines:

[Desktop Entry]

In the long run,  I think the better solution would be to have these also pop up in the autostart manager, so that overriding of properties in these files would be more intuitive.

A binary package-based system with own patches?

February 5, 2009

I’m increasingly getting an urge to expanding my hackings into other parts of kde, as to actually fix the small things that annoy me myself. There is only one problem though; I am very happy with the updated packages the kubuntu team supplies, and especially with my small laptop being my only available system, keeping a constantly complete self-compiled environment is something I don’t want to do.

So I’m wondering, maybe there is a middleway? Maybe there is a way I can for example get the source for the plasma package, hackety-hack up a small feature patch, send the patch off to review, commiting and whatnot, and while all this is happening, be able to keep these few patches in my own system easily, even with all the other parts of the system being based on packages.

For the apps that I regularly hack on (ark and kiten) I actually have placed empty placeholder packages in the system and compile them myself, but for larger system packages I also want the various improvements and settings that the packagers supply. So what say you, planeteers? Are any of you keeping custom patches on your package-based system? (source-based distros do not count)

A rule for everybody who’s thinking about styling a button

January 21, 2009

I wish there was a rule from the start when designing KDE4. Whenever you really really need to not use one of the already very nice default Oxygen style buttons, and can find no way around actually creating your very own custom look button, please, PLEASE do it all the way and make sure it has unique, clear looks for the normal, hover and pressed down state.

Looking at the 4.2 desktop now I see so many widget elements breaking this rule. The most obvious (and possibly also the most important) is the start button – which has only one hover picture. When you press it you get no feedback at all, and the mental image I get every time I click that button is hitting my fist against a brick wall (why? it’s hard to explain, it just feels so hard and unmovable without the proper visual feedback).

Actually, when I think about it, this is actually the same for _all_ the buttons I have on my bottom panel. Including the systray expander button, which actually doesn’t even have a hover state. The task list is an exception, that one is actually doing it right. (Not that that one gives me a lot of feedback either with the all too subtle color change it has, but that’s really a problem with the current style, and not kde by itself).

A quick end note, to be honest, this was actually the kind of things I set out to fix when I slowly started KDE development some time back with ui improvements to Ark. I eventually got stuck maintaining ark instead, and these small annoyances that I have been thinking about for way too long, had to wait in the back of the queue while Ark was getting fixed from the bruised and bad condition that I found it in.