Xfce

Subdomains
 

Xfce 4.6 is out!

  • February 27, 2009
  • Jannis Pohlmann

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.

News from the Goodies

  • February 25, 2009
  • Jérôme

Recently, there were a few releases in the Xfce Goodies project. I will try to summarize the main changes.

Xfce4 Power Manager 0.6.1 and 0.6.2

Those two bug fix releases fix various annoying problems: a tab was not working in the settings dialogs, there were some D-Bus related errors and the -r option is not needed anymore to start the application.

The author also added a brightness control plugin for the Xfce Panel to the Xfce SVN and discussions have started about merging the different battery panel plugins and the power manager. He also considers using DeviceKit. A lot of exciting stuff for the next release!

Midori 0.1.3

This new release of Midori, the fast Webkit based browser, brings a lot of interesting new features:

  • improved zoom preferences.
  • the interface can now be easily configured.
  • a new Mouse Gestures extension allows you to bind actions to particular mouse gestures.
  • Maemo integration for mobiles.
  • Find as you type feature for the search bar: results are proposed while you type a word in the search bar.

Gigolo 0.2.1

This bug fix release fixes a few bugs: Obex URIs are saved correctly now, some interface related problems have been fixed and one can now use the @ symbol in adresses.

Xfburn 0.4.1

And one more bug fix release ! It fixes drag and drop related issues, a crash when creating folders in a composition and burners detection has been improved. It is also advised to use libburn 0.5.6 or higher, which fixes a few annoying crashes.

Xfce4 Screenshooter 1.5.1

Yet another bug fix release... The mouse cursor is now displayed on the screenshots, a crash when the application did not detect any application to open images and one memory leak fixed...

Those little goodies should appetize you for Xfce 4.6 !

Looking for a Job

  • February 24, 2009
  • Jannis Pohlmann

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

  • February 24, 2009
  • Jannis Pohlmann

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.

Xfce 4.6 is on the way!

  • February 24, 2009
  • Jérôme

Stephan Arts, our beloved release manager, started to prepare the tarballs for Xfce 4.6! There are still some things to do before the release like testing the tarballs and getting the mirrors ready, but it should be out soon!

Update: most tarballs are ready now, the release should be for Thursday or Friday.

Thoughts on libxfce4menu for Xfce 4.8

  • February 22, 2009
  • Jannis Pohlmann

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?

Colored Notes

  • February 19, 2009
  • Mike Massonnet
I passed the last night to hack on a gtkrc snippet for the Notes plugin, because I couldn't find my sleep well. So being borred I killed a little bit the time to have a colored notes window :-) I know it was possible since always, I just never carred to do it. Using colors showed one annoying problem which are the icons. They don't fit always once you go away from the default gtk theme colors. In consequence I switched them to bold text labels with minus, plus and times. One other thing I didn't succeed with was to theme the menu that is available on the top right corner or Ctrl+M.

Finally the result is nice.

The snippet is the following:
gtk_color_scheme = "notes_fg_color:#E8E58C\nnotes_bg_color:#77741D\nnotes_base_color:#EBE88C\nnotes_text_color:#6B6A4A\nnotes_selected_bg_color:#ACA94E\nnotes_selected_fg_color:#E8E58C"

style "notes-default"
{
xthickness = 2
ythickness = 2

fg[NORMAL] = @notes_fg_color
fg[ACTIVE] = @notes_fg_color
fg[PRELIGHT] = @notes_fg_color
fg[SELECTED] = @notes_selected_fg_color
fg[INSENSITIVE] = shade (3.0,@notes_fg_color)

bg[NORMAL] = @notes_bg_color
bg[ACTIVE] = shade (1.0233,@notes_bg_color)
bg[PRELIGHT] = mix(0.90, shade (1.1,@notes_bg_color), @notes_selected_bg_color)
bg[SELECTED] = @notes_selected_bg_color
bg[INSENSITIVE] = shade (1.03,@notes_bg_color)

base[NORMAL] = @notes_base_color
base[ACTIVE] = shade (0.65,@notes_base_color)
base[PRELIGHT] = @notes_base_color
base[SELECTED] = @notes_selected_bg_color
base[INSENSITIVE] = shade (1.025,@notes_bg_color)

text[NORMAL] = @notes_text_color
text[ACTIVE] = shade (0.95,@notes_base_color)
text[PRELIGHT] = @notes_text_color
text[SELECTED] = @notes_selected_fg_color
text[INSENSITIVE] = mix (0.675,shade (0.95,@notes_bg_color),@notes_fg_color)
}

widget "xfce4-notes-plugin*" style:highest "notes-default"
widget "xfce4-notes-plugin*.*GtkMenu*" style:highest "notes-default"
widget "xfce4-notes-plugin*.*GtkMenuItem*" style:highest "notes-default"
# TODO Set the colors for the menu
The shade() and mix() functions are specific to either Clearlooks or Aurora. But this can be fixed. Actually I didn't include a default rc style inside the notes plugin, in fact this snippet can be saved for instance as notesrc inside your current theme and you add include "notesrc" in the gtkrc file.

All for the sharing, please enjoy.

Update: The shade() and mix() functions are a feature from GTK+ 2.10 just like gtk_color_scheme.

Update: I released a new version 1.6.4 that has a configurable background color setting.

What can we expect in Xfce 4.8 ? For the menu…

  • February 17, 2009
  • Jérôme

I'll start to write some posts in English, in case some English speakers are interested by Xfce news, I made a category for each language, so that people can read the posts of their preferred language easily. Xfce 4.6 is not out yet, but some developers have already started to implement nice things for the future versions, particularly Xfce 4.8.

Libxfce4menu : easily editable menus ?

People have been complaining for a long time that menu editing is a pain in Xfce : Xfce 4.4 menu editor was quite limited. 4.6 is a bit better as you can put Desktop files in ~/.local/share/applications/ to modify the menu, but it lacks a GUI to do those actions quickly and easily.

Jannis Pohlmann, the developer of libxfce4menu, has recently announced that he has started to improve libxfce4menu so that it implements the whole Freedesktop menu specification. This work is only at its early stages, but it seems to be quite promising : he published a video where one can see him editing the Xfce menu using Alacarte, the Gnome menu editor.

His code is available on git.xfce.org and works pretty well. After installing this new version, you just need to restart xfdesktop and xfce4-panel, to edit the menu using Alacarte and to configure the menu panel plugin to use the ~/.config/menus/applications.menu menu file.

Unfortunately, it is not yet possible to set a custom menu file for the right click menu of the desktop, so no right click custom menu for now... This new version will also allow some neat things, which might interest sysadmins, such as having a menu file on a network and use it on the local machine.

Ruby for Web Development

  • February 15, 2009
  • Brian Tarricone
I recently started a new web dev project, and decided to use it to better learn Ruby. However, I don’t want to use Rails. I’d like to keep it simple. I also prefer to know a lot about the inner workings of a particular technology before I go and use a large framework that hides [...]

Xfce at FOSDEM 2009

  • February 12, 2009
  • Jannis Pohlmann

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.

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.

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 (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 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!