All posts by Jannis Pohlmann

Thesis: Migrating Thunar to GIO

I've semi-officially (whatever that means) started working on my thesis on migrating Thunar from ThunarVFS to GIO. I'll work on it in public. That means research material, testing results, status reports and of course the code will be publically available in a read-only wiki and our Subversion repository in a special branch respectively.

I'm always open to suggestions and opinions. Just drop me a mail if you have something to say.

If everything goes as planned (err, did I really sayplanned?) GIO will land in Thunar 1.2 which is supposed to be released along with Xfce 4.8. There's no warranty for this though.

Clipboard Managers Done Right

I just had a look at the screenshots of Parcellite, a GTK+ clipboard manager, mainly because I didn't know what it is.

And just like with Getting Things Done tools before, I immediately had a few ideas how clipboard managers like this could be improved.

If you add a file or a URI to the clipboard, what do you expect to see in a visualization of the clipboard? Do you expect to see the path or filename or do you expect to see an icon and the filename together with a button to open or launch that file? Maybe even a possiblity to drag the item into a file manager or some other program? It's very easy to do things like that with GIO or even ThunarVFS.

What if you copy an email address into the clipboard? Do you expect only to see the email address or would you rather like to see the email address with one or two buttons (add to addressbook, send email)?

What are your experiences with clipboard tools? Are you using them at all? If not, why? What features would you like to see in a clipboard manager to make it attractive to use?

Getting Things Done Right

I've started to read Getting Things Done by David Allen some time ago. You can read about the concept of GTD at 43 Folders or Lunch & Learn if all you want is a short summary.

I think it's an interesting idea and it sounds very pragmatic and feasable. I'm a very unorganized person. I usually try to keep everything I need to do in my head and I rely on friends to remind me of birthdays, exams and other events because I don't have or use a calendar. I guess I'm a tough test candidate for GTD ... and I'm planning to give it a shot.

Now the only problem I see is the question which tools I should use. I'm not that much into paperwork, so I'd like to use my laptop for organizing my tasks. Of course you can use simple text files or other generic tools to do that (just like you can use paper) but that's really far from optimal.

About a week ago, a program called Getting Things Gnome! popped up on Planet GNOME and of course there is a number of online or offline tools designed after GTD available for Linux. Most of them allow you to define tasks, add notes, group them into projects and stuff like that. However, what they are missing is proper integration with other programs, online services and file formats. Notes are limited, they usually only consist of text, though sometimes they also support markup. In a lot of scenarios this is not enough (at least it is a very complicated way) to attach useful information to a task.

Just imagine the following situation: I receive an email from someone with a link and a few pictures and asks me to do something with them, e.g. upload these pictures to the website with the given link. If I want to make that a task, I'd like to be able to attach the pictures and the link to the task. So that afterwards I can trash the mail and thereby empty my inbox again. I don't necessarily want to keep it somewhere in my email program unless it has a really good search function.

Imagine another situation: Someone sends me an email describing a problem in my software together with a link to a bugzilla entry and a backtrace file. Let's say I'm working on a new release, there's a deadline for this release and the bug is critical. I'd like to create a task for that, attach the mail content and the backtrace file. Due to the deadline I also want to set the date this task is due and have my favorite calendar application being synchronized of course.

Basically, for a GTD application to be really useful in a computer environment, it

  • has to allow arbitrary task attachments likes files, emails, links or even calendar events (possibly implemented as plugins),
  • has to support calendar synchronization (off- and online),
  • needs to provide extensions for programs that are part of the workflow so that the user can create tasks from anywhere,
  • should use a storage format that can easily be converted into other formats (to make it easier for people to switch tools without losing all their tasks).

Of course there's more involved in getting it right. But most of todays GTD applications for Linux lack the above features and thus keep me from trying GTD out on my machine.

What are your experiences with GTD software? What features do you think are essential?

A Day Like Any Other

After having finished watching Barfly, I kinda felt like I had to sum up the day. It went like this:

That's it.

There won't be many days like this in the next few weeks. I'm about to move in with a friend of mine at the beginning of next month. I'm going to start working on my thesis about Thunar next week. I still have a voluntary oral exam in software verification ahead of me in 12 days (I think ...) and of course I need to find someone to take over the appartment I'm currently living in. Lots and lots of things to keep me more than busy.

Xfce Buildbot Server – Call for Donations

We've talked about the possibility of an Xfce Buildbot server for a while now. Samuel Verstraete, a fellow Lunar Linux developer, and Thomas Dupas have offered to donate a server for that. The University of Stockholm has kindly accepted to house it. The main Lunar Linux/Foo Projects server is already located there and we've made very positive experiences with them in the past.

But right now the server is still in Belgium. Samuel has calculated that 87 EUR are needed for UPS shipment. The server currently has 2 GB of RAM which is not much considering that we're planning to run several virtual machines on it. So if we could gather 40 EUR for an another 4 GB of RAM that would be great! In addition its worth thinking about adding another CPU. The machine has two sockets of which only one is being used right now. That would add another 40 EUR.

So, all in all we're in need of 130-170 EUR here. This is why we'd be very happy if you people could help us out here.

Every donator will be personally mentioned on this weblog (and thus on blog.xfce.org) and on our mailing lists. Due to the lack an official PayPal account for Xfce, donations can be send to my account: info@sten-net.de.

A start has already been made by these people:

  • Michael Marending (who donated to Thunar a while a go)
  • Enrico Tröger
  • Colin Leroy
  • Michele Renda
  • Madcap
  • Harold Aling
  • Christoph Borsbach
  • Nick Schermer
  • Jim Campbell
  • Jean Philippe Neumann
  • Brian J. Tarricone
  • Maximilan Schleiss
  • Fedora
  • Alexander Zolotko

Current Status: 485/170 EUR

We'll post a final update in a few days, when the missing hardware has arrived at Samuel's place.

Thanks to everyone for making this happen so fast!

Xfce 4.6 is out!

Hey everyone. As of today, Xfce 4.6 is available to everyone. Let me quote Stephan Arts, our release manager of the 4.6 cycle:

After more than two years of development, Xfce 4.6.0 has just been released.

Xfce 4.6 features a new configuration backend, a new settings manager, a brand new session manager and sound mixer as well as several huge improvements of its core components. A list of all the changes since the last release candidate can be found on this page.

A visual overview of Xfce 4.6 is available here:
http://www.xfce.org/about/tour

Download Xfce 4.6 from the Downloads section of the Xfce website:
http://www.xfce.org/download

Regards,
The Xfce development team.

Thanks to everyone who contributed to this release. Especially Stephan who did an amazing job. Thanks as well to Jerôme without whom the website update would not have been possible. It might not be the most clean and polished release ever and the release process was quite painful, but we can now look back at this and hopefully each learn our lessons.

I'm already looking forward on working on 4.8 with you guys, and thinking of some of the features to come gets me really excited.

Looking for a Job

My part-time contract with the university ends the next couple days and now I'm looking for a new job. I've worked at the university for the last few years but I'd like to work on something that is more relevant to my personal future from now on.

My involvement in the Open Source community has grown immensely within the last six months and I have realized that this where I see myself in the future. I love the vibrant communities around Open Source projects and the social and organizational aspects involved, like conferences, community coordination and, in general, meetings and discussions with people. This environment is exciting to work in and provides enough variety to keep me motivated. I'm always looking for exciting things to work on and I need change all the time. Oh, yeah, and I also love code. In fact, I'm a real code addict with a special affinity to clean C code, GTK+ and manually written ChangeLogs.

If you know or run a company which has a strong background in Open Source and preferably GTK+ which could be interested in hiring me, please let me know. My CV is available here. One important thing to note is that I'm currently not available for a full-time position because I'm still a student and am not going to graduate before next year. So something like 16-20 hours per week would be ideal.

Cheers, Jannis

GTK-Doc Suckage

Here are several things that are not wise to do when working with GTK-Doc:

  • Have an enum called XfceMenuLayoutMergeType and a function ending with get_layout_merge_type(). This will only make GTK-Doc think that XfceMenuLayoutMergeType is a GObject class and then it will try to inspec the results of that function you have. In the end GTK-Doc will crash with a segmentation fault when running the scanner.
  • Have an XfceMenuNodeType enum, this time wrapped by a GType, and a GObject class called XfceMenuNode. If the GType function for XfceMenuNodeType is called xfce_menu_node_type_get_type() GTK-Doc will confuse it with the GType function for XfceMenuNode and thus, generate wrong API docs.
  • Have a class called XfceMenu and a library intialization function called xfce_menu_init(). GTK-Doc will always throw these two into one section because it thinks they are related.

Bad.

Thoughts on libxfce4menu for Xfce 4.8

I've been hacking on libxfce4menu in a local branch for the last couple of days and I think I'm finally happy with the API changes I have done. The version that will be shipped with Xfce 4.6 has a clean API for reading from menus but unfortunately it lacks support for menu merging and is not really usable for writing a menu editor.
 So there is a lot to improve for Xfce 4.8.

libxfce4menu uses a GObject class called XfceMenu as a representation of the entire menu tree. The downside of this approach is that some tree operations are hard to implement if possible at all. In a DOM structure child elements are ordered. In XfceMenu, they are not. In fact, the concept of a child element in XfceMenu is problematic. In a DOM all child elements are treated equal. XfceMenu on the opposite treats Menu elements different than e.g. AppDir elements. It throws them into different lists. And that's why merging is hard to implement with the current API. There is no DOM representation of the tree and thus, XfceMenu does not know whether an AppDir element came before a certain DirectoryDir element for instance. But when doing merges this matters. Actually, in most cases this won't be a problem, but theoretically it is. If you don't care about the order, you break the specification.

So, libxfce4menu in Xfce 4.8 is going to build a DOM representation for the menu tree to make merging and other things easier to implement.

But there still is the goal to improve the API with regards to menu editing support. To work properly, menu editors need to know information about the menu tree after parsing the root .menu file - before any modifications. This is something the current implementation of libxfce4menu hides completely.

So, here is what I came up with for 4.8. First of all, you have several classes:

  1. GNode is used for the DOM representation.
  2. Every node has a data object which is an instance of XfceMenuNode, except for <Menu> nodes.
  3. To parse a menu there is XfceMenuParser which creates a GNode DOM representation for a .menu file. It doesn't do merging, so you'll only get the DOM for the XML of the .menu file itself, not of other .menu files specified using <MergeFile> elements.
  4. To load and merge the rest, there is XfceMenuMerger. It takes the DOM representation generated by the parser and basically does everything that explained in this part of the specification.
  5. XfceMenu, XfceMenuLayout and XfceMenuItem will still be around. They take the merged DOM representation from XfceMenuMerger, load all the desktop entries and wrap the entire information about the resulting menu tree with a nice and easy-to-use API. There will also still be a class for monitoring and stuff like that.
  6. And then there is a nother class: XfceMenuEditor which takes the DOM representation from XfceMenuParser and provides functions for operations required by graphical menu editors. It will be able to add <Move> elements if the user moves menus around, it can add <Deleted> elements if the user decides to hide a menu and so forth. It will also support writing the tree to a .menu file, maybe using another class called XfceMenuWriter.
  7. There will be an interface called XfceMenuTreeProvider which is implemented by XfceMenuParser, XfceMenuMerger and XfceMenuEditor.

The only thing that is not covered is how desktop entries are edited. But they are not really part of the menu tree anyway. Here are two uses cases for the usage of the API presented above.

Reading Menus (For Hardliners)

Someone wants to read and build the menu from a file called applications.menu.
XfceMenuParser *parser;
XfceMenuMerger *merger;
XfceMenu *menu;
GError *error = NULL;
GFile *file;

file = g_file_new_for_path ("applications.menu");
parser = xfce_menu_parser_new (file, &error);
g_object_unref (file);

/* The optional second argument is a GCancellable */
if (!xfce_menu_parser_run (parser, NULL, &error))
{
g_error (error->message);

g_error_free (error);
g_object_unref (parser);
return;
}

merger = xfce_menu_merger_new (XFCE_MENU_TREE_PROVIDER (parser));
g_object_unref (parser);

if (!xfce_menu_merger_run (merger, NULL, &error))
{
g_error (error->message);

g_error_free (error);
g_object_unref (merger);
return;
}

menu = xfce_menu_new_from_tree_provider (XFCE_MENU_TREE_PROVIDER (merger));
g_object_unref (merger);

/* Now do something with the menu */

g_object_unref (menu);

Reading Menus (The Easy Way)

Of course there will be a much easier-to-use function for creating an XfceMenu, like this one:

XfceMenu *xfce_menu_create_for_file (GFile   *file, 
GError **error);

Writing a Menu Editor

XfceMenuParser *parser;
XfceMenuEditor *editor;
XfceMenuWriter *writer;

/* I'll leave out the error handling this time */
parser = xfce_menu_parser_new (file);
xfce_menu_parser_run (parser, NULL, &error);

editor = xfce_menu_editor_new (XFCE_MENU_TREE_PROVIDER (parser));
g_object_unref (parser);

/* Use XfceMenuMerger and XfceMenu here to get an XfceMenu object for use in the GUI */

/* Assuming that the user moves the menu "A/B" to "C/D" using the GUI */
xfce_menu_editor_move (editor, "A/B", "C/D");

/* Assuming that the user decided to hide the menu "Accessories" */
xfce_menu_editor_set_deleted (editor, "Accessories", TRUE);

/* Save the menu to a file, assuming we have a GFile object to write to */
writer = xfce_menu_writer_new (XFCE_MENU_TREE_PROVIDER (editor));
xfce_menu_writer_write (writer, file, NULL, &error);
g_object_unref (writer);

Of course nothing of this is final. This is just what I came up with today. But I can imagine that this would work quit well.

So, what do you think?

Xfce at FOSDEM 2009

FOSDEM is over and it was a blast! Finally, after about four years, the team met again. It was the first time for me and it was great to meet them all in person. Olivier, Yves-Alexis, Nick and I stayed at the same hotel. Stephan stayed in Gent and the others spread over several other hotels in Brussels.

Friday

I arrived early on Friday and relaxed in the hotel room for a while, going through my slides and listening to a couple having sex next door for hours. If you're able to count the orgasms then it's definitely too loud. So I left the hotel and walked around in the inner city of Brussels for a while until Yves-Alexis, and shortly after that, Nick and Stephan arrived. We had a few beers at a bar around the corner and later went to for Pasta and Pizza in an Italian restaurant close to the hotel where Jens joined us. After that we went to the FOSDEM beer event and stayed there until half past midnight, only interrupted by the arrival of Olivier whom we had to take to the hotel. The beer was nice and since the place was so crowded we had a hard time understanding each other ... but we somehow managed it.

Saturday

We got up at around 7am the next morning and of course the beer from the evening before didn't really make things better. The nice thing about the hotel (Hotel Du Congres by the way) was that there was free breakfast included though. It was rather basic but it did it's job. Shortly after that we left for FOSDEM. We arrived in time for the keynotes and met Jean-François and Maximilian on our way to Janson (the large auditorium). Later we went for some french fries and mainly spent our time in the X.org devroom. Some of us went to the LXDE lightning talk and were quite amused by their claim that LXDE is better than Xfce (which is denied by the guys at LXDE, so they might not actually have said that ... what does better mean anyway?) and the huge number of slides showing photos of their team at different conferences. Later that day we went to a restaurant called Big Mama in the very heart of Brussels were we had a beer and nice food. Everyone went to bed afterwards, except Nick, who kept hacking on the panel.

Sunday

Sunday was a big day for me - I had a talk about Xfce 4.6 and the future of Xfce scheduled at 11am. I didn't really sleep well and was nervous the entire morning. It didn't get any better when I had finally booted up my laptop and the microphone was turned on. I don't know how long I talked but I have the feeling that I literally speed-talked through the slides. I forgot a few things I would've loved to mention but all in all I think it was ok. There were quite a few sceptical faces in the audience but also a few who looked very pleased by the features and plans I presented them. I definitely think it was ok for my first talk in English at a big conference but I know I can do better. So I'd be absolutely happy to do that again next year!

I felt very relieved afterwards. We then went out to take a few group pictures (the following one was shot by Jens). In the meantime, Samuel and Jelle de Jong had joined us (I have no idea where Jelle went afterwards, but Samuel stayed with us for the rest of the day).

Xfce group picture at FOSDEM 2009

After that we want back to one of the devrooms until Maximilian came back from his car with a number of sandwiches he had bought on the way. We had a beer at the FOSDEM bar, ate our sandwiches and then went back to the cross desktop room for Stephan's talk about Xfce as a platform. I think he did a good job overall, especially considering that he had just finished his slides the night before. I would've loved to see more about how to use the different libraries and maybe more details about our plugin APIs but he covered a few very important things about Xfconf.

After that we had another beer at the bar and went to the last talks in Janson. Samuel dropped his full beer, I accidently kicked my empty one and Olivier and I left early for the FOSDEM bus back to Brussels-South. I managed to catch an earlier train to the airport, had a short flight, then had to wait for the bus from Hamburg to Lübeck for 90 minutes and finally arrived at around half past midnight.

I think it was a lot of fun and I'll definitely go to FOSDEM again. It was nice to put a face to all the names of people I've been working with over the last few years. Thanks to everyone I met there, it was a real pleasure! Hope to see you all again! Thanks to all the people who went to our talks (oh, and to that guy who wanted that picture of him and me - could you send it to me please?) and asked questions ("Has the Xfce team ever thought about participating in Google SoC?", "How good is the relationship of Xfce with Xubuntu?", "Are you still aiming to be lightweight?" amongst others). It was also great to see several packagers, like Mark from Foresight, Landry from OpenBSD and Christoph from Fedora.

As I've mentioned before, I would really like to talk at conferences again. It's a challenge but definitely a nice one. If you know any that could be interesting for Xfce, please let me know!

Oh, and by the way, if you've taken any pictures of us at FOSDEM, please let us know!