Fake Akrobat browser plugin

So. for some reason, the danish tax authorities (Skat) has started requiring Adobe Acrobat for being able to see pdf files to work around a bug with handling of temporary files on Windows8 and shared computers and such.

Luckily there is a couple of easy workarounds. Like modifying the Javascript to check things at runtime using some browser specific addons. Or just do it like I did and write a actual browserplugin. I cheated and used QtBrowserPlugin. Then my actual code was a couple of lines. Want to check it out? Look here: http://quickgit.kde.org/?p=scratch%2Fsune%2Ffakeacrobat.git. It just does enough to ensure the test succeeds. Work in: iceweasel and arora. For some reason, it doesn’t work in konqueror/webkit nor in konqueror/khtml.

Posted in english, kde, Pocket projects

Kontact / PIM sprinting

So, a couple of days ago, I came home tired after a intense weekend of learning Akonadi and hacking on KDEPIM.

At each meal, we attended 12 people, but it wasn’t the same people every time. And a couple of people participated remotely.

Several people, including me, got their feet wet in kdepim & akonadi code. Talks about the future with Qt 6 and Qt 7 and Akonadi 3 were also held in the corners.

Hopefully, others will tell more closely about what they did, including fixing kmail memory usage to not grow until all headers of all emails was in memory and improving the address completion job to help filling in to/cc/bcc fields.

Personally, I started off several times with the same issue. Not doing several synchronous calls from KMail to Akonadi during message writing and sending. On my way, I cleaned up some code and started over a couple of times. And the code is still a work in progress on my laptop. But the most important synchronous call is in that WIP patch now actually asynchronous \o/. There is still work to do on that area though and I hope to get around polishing it and finishing it this month somehow. I currently have function names like ‘second_half_of_generateCryptoMessages‘ and ‘this_function_should_be_renamed‘.

And next up will Andras Mantia hopefully blog about his accomplishments. And poke some other person for a blog post.

Oh. and if you like developers taking a weekend or so out of their busy schedule to meet up for hacking, please consider supporting KDE by Joining the game

Posted in english, kde

Playing with webstuff

So, the other day, I wrote a blog post asking people to make sure their private hacks become published somehow. So in the sprit of that, I should also publish my recent hacks.

I have been toying around as a web dude and created two nice pieces of oldschool webby software.

So. Time to introductions:

Dodoma is a simple online note taking application. I have created a boring homepage for it on http://sune.vuorela.dk/dodoma and I have a screenshot here:
Screenshot of webapp

Kadaka is a simple rss reader showing the five newest items from various rss feeds. Has special support for youtube channels.
I have created a boring homepage for it on http://sune.vuorela.dk/kadaka and I have a screenshot here:
Screenshot of kadaka

Have fun with those two apps. Patches always welcome.

Some of you might wonder “where does he get those crazy names from”. Well. One of them I found on a map. Thats actually a way I name quite many of my projects. Even those that don’t even leave my harddrive. And the other one actually also is on a map, but I saw it on a frequently used bus in Tallin, Estonia.

And. I am considering naming my next fancy projects after some of the cool words found on the join the game member page. If you want to be part of that, feel free to Join the game!

Posted in danish, english, kde

Boat to akademy?

I’m planning on taking the Tallink Silja boat from Stockholm to Tallin to get to (and from) Akademy. It is a all-night boat with restaurants, bars and almost whatever you would like. The boat leaves shortly before dinner and arrives shortly after breakfast and it is full of great fun.

Last time (Akademy 2010 in Tampere), Inge, Ryan, Chani, Martin and me were on such a boat and it was a nice experience.

Anyone up for such a experience this year ?

You hopefully know how to reach me

Posted in english, kde

Vote verifications

In KDE e.V. (which is to KDE what SPI is to Debian, Jenkins and others) there is some times a need to vote. For example about accepting new members. Mostly about accepting new members. With the new vote system (ballot.kde.org), voters need to do a bit more to check their votes afterwards. basically

  • Take username
  • Your own secret
  • The vote token

and sha256 it in the right order with the right separator chars and so on.

All sha256 sums are published together with where the vote was, so voters can verify that they are counted correctly.

After failing to construct a couple of times on the command line, I decided to write a small GUI app to help me instead.

There it is. Nice. Simple. Effective.

Sources available. http://quickgit.kde.org/?p=scratch%2Fsune%2Fkrapyl.git&a=summary – have fun, and remember to verify your votes.

Posted in english, kde, Pocket projects

Am I online? Network status aware apps II

So. Recently I blogged about Network status aware apps, and some time later, I got asked by a developer “How do I see if I’m online if I’m not using network manager?” and I replied with some dbus commands and he shook his head in despair. So, I ended up writing a small plasma widget targetting developers and very powerusers that can tell you the current state of the network and offers to add yet another ‘manual’ datapoint to the network status.

So. In line with another blog post of mine about getting the small utilities we all write and just let stay in a drawer (or somewhere in ~ on a local computer), I’m announcing it’s existance. That application became famous and even mentioned in Linux Weekly News, but I don’t expect that here. But anyways, here it is: http://quickgit.kde.org/?p=scratch/sune/networkstatus.git.

And a picture of it, it is not pretty but well, it’s a tool mostly for developers, not for end users.

Have fun, and I hope to see more of these small projects from various people.

Posted in english, kde, Pocket projects

Those small nice tools we all write

Many of us out there writes small tools to just solve a simple task that you need. Here, I will present a tool I needed last night.

I have a small job doing a wordpress site for some people, and I needed a image with the site title in a font matching some specific criteria (like a double story lowercase A and a small serif on lowercase L, while in general being a Sans Serif type).

So what I needed was a application that let me write a word or a phrase, and see it written with all available fonts on the system.

So, it took a little more than a effective hour and 120 lines of code to come up with this:

Click to see image

And if anyone cares, I have pushed the sources to git.kde.org.

I’m sure many of you also have various such small apps. Let’s see them. That’s also you Eike and your svgtoy app :)

Another thing I learned from this app is that the ukij fonts targetted the Uyghyr language actually is very interesting also for western europeans.

Posted in english, kde, Pocket projects

Missing tools for people looking for jobs

I have mentioned it before in some blog posts that I’m out looking for a job. In my job searching process, there is a couple of nice tools that I am missing. Maybe if I describe one of them, someone will say that it already exists over there -> or something.

Tool 1. Tracking of data related to a job application.
For each such application I send I have a set of data, some pieces only for some applications:

  • Contact data for company
  • The open position I’m applying for on the web
  • The web form I submitted a application thru
  • The email I used to submit my application
  • Further emailing with the company
  • Further chat logs (jabber or irc) with the company
  • My jotting down during or after a (phone) interview
  • Other data I’ve gathered about the company

I would like one simple way of browsing all this information for a given position.

Does this exist? preferably something that can interact with Konqueror, KMail, KAddressbook, KJots, Kopete and irssi on a remote machine.

Tool 2: Tracking of tasks with states

There is – at least – the following steps in a job searching process:

  • Interesting company found
  • Initial contact
  • More information sent
  • Phone interview
  • First interview
  • Second interview
  • First draft contract
  • Signed contract

A job application might go thru some or all of these steps or even more steps, and from each step it can end prematurely with a ‘rejection’.

Here, I’m missing a tool to track my applications and in which state they are currently in. My first thought here is a bug tracking system, but I’m wondering if there is something nicer. Currently I’m tracking it manually in a KJots notebook.

Comments are open. And no, I haven’t yet found a job.

Posted in english, kde

Network status aware apps

Am I online or not?

There is a summary at the end for the quick readers.

It is in many modern applications important to be able to more or less gracefully handle if the application user is online or not. For example, there is no need to try to fetch emails if the device (computer, phone, tablet, laptop, …) doesn’t have network (wifi, cable, umts, ip over avian carriers, ..).

KDE has of course made nice functionality for this, and here I will try to describe how to make your app network status aware and what to be aware of in the process.

Solid background

All this is going on in Solid, using two parts of Solid and a bit of KDE’s infrastructure:

  • libsolid
  • networkstatus KDED module

The networkstatus KDED module is trying it best to gather information from the computer to see if one is connected or not. It has the possibility to gather information from various sources, and handle changes and such.

The as of writing available sources that the networkstatus module gathers information from is

  • Network Manager
  • wicd
  • asking the linux kernel thru the abstraction layers ntrack and libnl
  • …connman might be work in progress

Collecting from different sources is important, because some people might have configurations like “Manage wireless thru wicd”, “manage umts dongle with Network Manager” and “manage wired network with /etc/network/interfaces” and all of it needs to be combined.

Solid reports, if wicd thinks “online”, and network manager thinks “offline” that the user is Connected..

Solid States

There is a enum with 5 values in Solid to describe the current state of the network:

enum Status {
Unknown,
Unconnected,
Disconnecting,
Connecting,
Connected
};

Connected is the easy state. Here, Solid knows that you are having some kind of connection according to at least one of the sources. But it might just be a local network connection, and not actually a internet connection. So one here should handle connection failures gracefully.

Unconnected is a similar easy state. Here, Solid knows that you don’t have any internet connection according to the sources it knows about. One should here not try to do any networking.

Connecting and Disconnecting is that a state change is happening, so that you can prepare to react on it.

Solid also has the state of Unknown, used for cases where Solid doesn’t have the required data to actually know it. A example could be a system without any of the data providers. You should here probably try to connect, and be able to handle failures gracefully. Also described as ‘Proceed with caution’.

The bright reader might here notice that one both in the Unknown and Connected case actually should do the same.

Querying for network status

At any given time:

Solid::Networking::Status currentStatus = Solid::Networking::status();
if(currentStatus==Connected || currentStatus==Unknown) {
//try to do networking things
} else {
//mark application as offline.
}

Here, we first query Solid for current status, and then if the state is Connected OR Unknown, then we proceed.

Getting notified

Maybe you don’t want the roundtrip of asking (resulting in a dbus rountrip each time) when you need to know the state changes. Then you of course can get notified.

class MyNetworkAwareClass : public QObject {
Q_OBJECT
public:
MyNetworkAwareClass();
void doNetworkActivity();
private Q_SLOTS:
void networkStatusChanged(Solid::Networking::Status newstatus);
private:
Solid::Networking::Status m_current_state
};

MyNetworkAwareClass::MyNetworkAwareClass : m_current_state(Solid::Networking::Status()) {
connect(Solid::Networking::notifier(), SIGNAL(statusChanged(Solid::Networking::Status),this,SLOT(networkStatusChanged(Solid::Networking::Status)));
}
void MyNetworkAwareClass::networkStatusChanged(Solid::Networking::Status newstate) {
m_current_state = newstate;
}

void MyNetworkAwareClass::doNetworkActivity() {
if(m_current_state == Unknown || m_current_state == Connected) {
//try to do network activity
}
}

I guess this should be pretty self explaining.

Summary

  • Ask Solid::Networking::status() for network status
  • Connect to statusChanged(Solid::Networking::Status) from Solid::Networking::Notifier to be aware of changes
  • Treat the states Unknown and Connected the same way.

Oh. And I’m out looking for a job.

Posted in english, kde

First Plasma Active experience

John Layt recently blogged about his adventure with having children use Plasma Active with quite some success.

The task

I was this evening out at a board meeting in my local scout group, and for such a event you of course need the following

  • Agenda
  • Treasures report
  • Minutes from last meeting
  • Various other papers

I’ve heard from various people that an iPad is great for such meetings, and produces much less paper waste, so of course, I wanted to try with my brand new Plasma Active tablet.

Before meeting

So before meeting: Charge tablet & fetch needed documents.
Possible issues: Everything was on a my imap server. Minutes was a plain text file, Agenda was a docx file, treasures report was a xls spreadsheet, and the various other papers were pdf files.

For fetching, I’ve heard a lot about Kontact Touch and everything using Akonadi. Besides me not being fully able to properly enter my password in the first 10 tries, and a sometimes flaky internet connection, everything here was a breeze.

To the three first documents, the answer was ‘Calligra Mobile’. Rendered even the docx file better than libreoffice did. And Calligra Mobile was nice and touch friendly and worked pretty well for this. There is also something called ‘Calligra Active’, which is supposed to be way cooler, but still misses at least one essential feature to be used for a touchscreen only. It can only open documents passed to it on command line. And I’m not yet very comfortable with a onscreen keyboard.

For the last, there was Okular. The desktop edition of Okular. I was impressed by *how* usable Okular were for a touch screen device. A quick and dirty edition of a mobile Okular could probably be done with ‘remove all toolbars and menubars and such’ and ‘if no file is passed on command line, then open a file selector window and open selected file’, which shouldn’t take a person knowing the Okular code much time. But that’s still just the ‘Quick and dirty edition’

During…

And during the meeting, everything worked flawlessly, except the internet on site, so I was happy I had prepared in advance. As a extra bonus, Plasma Active offered the nice KDE Games, as John Layt also mentioned, for the parts of the meeting where it was a bit boring.

So. At least for me and in this case, Plasma Active did its job, at least to a A. And it is still described as Alpha software.

Issues

There is, though, a few important usability issues:

For QWidget based applications, oxygen’s nice desktop feature of being able to move the application by dragging it from almost everywhere is just completely useless on a touch screen device when you are only using full screen applications. Luckily, oxygen-settings can disable this.

Update: People tells me that this has already been fixed.

The Network Manager Plasma Widget, in case of ‘no network’, is very hard to ‘activate’ in order to select a network. A bit larger touch area here would be very nice. Currently, it feels like it is only slightly larger than a dot:ยท.

Future

Oh boy, I’m looking forward for Plasma Active getting to Beta or RC status. Or Final!

And btw, I’m looking for a job.

Posted in english, kde