Xfce

Subdomains
 

Web developers and contributors needed for xfce.org

  • February 14, 2010
  • Jérôme Guelfucci

This post is the first (well, second if you count the one for Xfce4 Screenshooter) of a series of post offering some ways to get involved in Xfce. We need more people if we want to keep improving Xfce!

We are looking for new persons to help us to take care of the Xfce web site. We need a web developer/designer to handle the technical details and someone to improve/update the contents (can be the same person).

Our web site runs a home made PHP based CMS (with no online interface) which we would like to keep (improvements and bug fixes are welcome of course) for the time being. Though, its contents needs some love: some pages are strongly outdated, the style could be refreshed, some pages still use tables for layout, etc. We also need to find a solution for localization: the current system requires the user to translate raw PHP pages and often leads to errors when going live, up to the point that we are considering dropping translations. This will highly depend on the people who get involved in the web site.

The web developer position requires a good PHP, HTML and CSS knowledge to be able to handle the different aspects of the web site. A good command of English to update/rework the different pages and make the web site easier to use, this also requires to follow the Xfce development to update the web site accordingly. Of course, this work can be done as a team if several persons step in. This is a good opportunity to start contributing to the Xfce project and this work will be appreciated by a lot of Xfce users.

Please contact me if you are interested. Thank you in advance!

Eatmonkey 0.1.3 benchmarking

  • February 13, 2010
  • Mike Massonnet
Eatmonkey has now been released for the 4th time and I started to use it to download videos from FOSDEM2010 by drag-n-dropping the links from the web page to the manager :-)

I downloaded four files and while they were running I had a close look at top and iftop to monitor the CPU usage and the bandwidth usage between the client/server (the connection between eatmonkey and the aria2 XML-RPC server running on the localhost interface).

I had unexpected results and was surprised by the CPU usage. It is very high currently which means I have a new task for the next milestone, getting the CPU footprint low. The bandwidth comes without surprises, but since the milestone will target performance where possible I will fine down the number of requests made to the server. This problem is also noticeable in the GUI in that it tends to micro-freeze during the updates of each download. So the more active downloads will be running the more the client will be freezing.

Some results as it will speak more than words:
Number of active downloadsReceptionEmissionCPU%
4 downloads144Kbps18Kbps30%
3 downloads108Kbps14Kbps26%
2 downloads73Kbps11Kbps18%

I will start by running benchmarks on the code itself, and thanks to Ruby there is built-in support for Benchmarking and Profiling. It comes with at least three different useful modules: benchmark, profile and profiler. The first measures the time that the code necessitated to be executed on the system. It is useful to measure different kind of loops like for, while or do...while, or for example to see if a string is best to be compared through a dummy compare function or via a compiled regular expression. The second simply needs to be included at the top of a Ruby script and it will print a summary of the time passed within each method/function call. The third does the same except it is possible to run the Profiler around distinctive blocks of code. So much for the presentation, below are some samples.

File benchmark.rb:
#!/usr/bin/ruby -w

require "benchmark"
require "pp"

integers = (1..10000).to_a
pp Benchmark.measure { integers.map { |i| i * i } }

Benchmark.bm(10) do |b|
b.report("simple") { 50000.times { 1 + 2 } }
b.report("complex") { 50000.times { 1 + 2 - 6 + 5 * 4 / 2 + 4 } }
b.report("stupid") { 50000.times { "1".to_i + "3".to_i * "4".to_i - "2".to_i } }
end

words = IO.readlines("/usr/share/dict/words")
Benchmark.bm(10) do |b|
b.report("include") { words.each { |w| next if w.include?("abe") } }
b.report("regexp") { words.each { |w| next if w =~ /abe/ } }
end

File profile.rb:
#!/usr/bin/ruby -w

require "profile"

def factorial(n)
n > 1 ? n * factorial(n - 1) : 1;
end

factorial(627)

File profiler.rb:
#!/usr/bin/ruby -w

require "profiler"

def factorial(n)
(2..n).to_a.inject(1) { |product, i| product * i }
end

Profiler__.start_profile
factorial(627)
Profiler__.stop_profile
Profiler__.print_profile($stdout)
Update: The profiling showed that during a status request 65% of the time is consumed by the XML parser. The REXML class is written 100% in Ruby, and that gives a good hint that the same request done with a parser written in C may present a real boost. On another hand, the requests are now only run once periodically and cached inside the pooler. This means that the emission bitrate is always the same and that the reception bitrate grows as there are more downloads running. And as a side-effect there is less XML parsing done thus less CPU time used.

Eatmonkey 0.1.3 benchmarking

  • February 13, 2010
  • Mike Massonnet
Eatmonkey has now been released for the 4th time and I started to use it to download videos from FOSDEM2010 by drag-n-dropping the links from the web page to the manager :-)

I downloaded four files and while they were running I had a close look at top and iftop to monitor the CPU usage and the bandwidth usage between the client/server (the connection between eatmonkey and the aria2 XML-RPC server running on the localhost interface).

I had unexpected results and was surprised by the CPU usage. It is very high currently which means I have a new task for the next milestone, getting the CPU footprint low. The bandwidth comes without surprises, but since the milestone will target performance where possible I will fine down the number of requests made to the server. This problem is also noticeable in the GUI in that it tends to micro-freeze during the updates of each download. So the more active downloads will be running the more the client will be freezing.

Some results as it will speak more than words:
Number of active downloadsReceptionEmissionCPU%
4 downloads144Kbps18Kbps30%
3 downloads108Kbps14Kbps26%
2 downloads73Kbps11Kbps18%

I will start by running benchmarks on the code itself, and thanks to Ruby there is built-in support for Benchmarking and Profiling. It comes with at least three different useful modules: benchmark, profile and profiler. The first measures the time that the code necessitated to be executed on the system. It is useful to measure different kind of loops like for, while or do...while, or for example to see if a string is best to be compared through a dummy compare function or via a compiled regular expression. The second simply needs to be included at the top of a Ruby script and it will print a summary of the time passed within each method/function call. The third does the same except it is possible to run the Profiler around distinctive blocks of code. So much for the presentation, below are some samples.

File benchmark.rb:
#!/usr/bin/ruby -w

require "benchmark"
require "pp"

integers = (1..10000).to_a
pp Benchmark.measure { integers.map { |i| i * i } }

Benchmark.bm(10) do |b|
b.report("simple") { 50000.times { 1 + 2 } }
b.report("complex") { 50000.times { 1 + 2 - 6 + 5 * 4 / 2 + 4 } }
b.report("stupid") { 50000.times { "1".to_i + "3".to_i * "4".to_i - "2".to_i } }
end

words = IO.readlines("/usr/share/dict/words")
Benchmark.bm(10) do |b|
b.report("include") { words.each { |w| next if w.include?("abe") } }
b.report("regexp") { words.each { |w| next if w =~ /abe/ } }
end

File profile.rb:
#!/usr/bin/ruby -w

require "profile"

def factorial(n)
n > 1 ? n * factorial(n - 1) : 1;
end

factorial(627)

File profiler.rb:
#!/usr/bin/ruby -w

require "profiler"

def factorial(n)
(2..n).to_a.inject(1) { |product, i| product * i }
end

Profiler__.start_profile
factorial(627)
Profiler__.stop_profile
Profiler__.print_profile($stdout)
Update: The profiling showed that during a status request 65% of the time is consumed by the XML parser. The REXML class is written 100% in Ruby, and that gives a good hint that the same request done with a parser written in C may present a real boost. On another hand, the requests are now only run once periodically and cached inside the pooler. This means that the emission bitrate is always the same and that the reception bitrate grows as there are more downloads running. And as a side-effect there is less XML parsing done thus less CPU time used.

Xfce4 Screenshooter 1.7.9 – Looking for a new maintainer

  • February 10, 2010
  • Jérôme Guelfucci

I recently released Xfce4 Screenshooter 1.7.9. This is a release candidate for the 1.8 branch. It contains a great number of new improvements and bug fixes, listed below.

I recently started to contribute more to the Xfce core, particularly Xfce4 Session and Xfce4 Settings (I'll try to blog more about that later), which leaves me very little time for Xfce4 Screenshooter. I would like to find someone to take over the maintenance of this projet, if you feel motivated please contact me (jeromeg@xfce.org or jeromeg in #xfce on freenode). Obviously, some basic knowledge of English (to communicate with the rest of the Xfce team and to develop the UI) and knowing C is required. If you are not used to the gtk/glib API, I'm ready to do some mentoring during a transitional phase. Anyway, I would be happy to explain the current code organization, the main issues, the weak areas, etc. This is a good opportunity to join a nice community which needs more contributors to keep rocking!


**Edit**: Bruno Ramos kindly volunteered for this! \o/ For other people interested in contributing, I'll post in the next few days on a few Xfce goodies which need a new maintainer. Please also remember that patches for bugs opened in the bugzilla are a great way to start contributing. Do not hesitate to join #xfce on freenode if you have any questions.

Changelog

  • The XMLRPC-C dependency has been replaced by libsoup.
  • Gtk 2.14 is now required to compile.
  • Switch to a non-recursive Makefile.am. This reduces the build time and centralizes the build information.

New features

  • Scrolling the panel plugin button changes the area to be captured.
  • When compositing is on, use a nice partially transparent rubber-banding, still needs some polishing.
  • F1 opens the help page.
  • Automatically fill the title and comment fields in the ZimageZ upload information dialog.
  • Make enter validate the upload in the ZimageZ upload information dialog.
  • Use the XDG image directory as the default directory for saving screenshots. If it does not exist, fall back to $HOME.
  • Major interface rethinking. This new interface is based on a suggestion by Yves-Alexis Pérez. The former main dialog is split into two dialogs: one for selecting the region to be captured and the delay, while the second one displays a preview of the screenshot and lists the available actions. The main application shows the first dialog, then the second one. If one of the region CLI options is given, the screenshot is taken accordingly and the second dialog is displayed. The panel plugin uses the first dialog as a configuration dialog. When you click the plugin, the screenshot is taken and the second dialog is shown.
  • Allow drag and dropping of the preview to other applications in order to paste the screenshot (Mike Massonnet).

Bugs fixed

  • UTF-8 characters in user name or password caused a login failure.
  • Fix all warnings triggered by running autogen.sh.
  • Fix the ZimageZ upload when behind a proxy.
  • Fix copying of links in the ZimageZ upload finished dialog.
  • Fix 100% CPU usage when selecting a region in a non composited environment (spotted by Gauvain Pocentek).
  • When capturing a window with rounded corners, don't capture the background of the window but make the screenshot transparent instead.
  • Make sure the save folder in the panel plugin preferences is valid.
  • Don't show the copy to clipboard option in the application if no clipboard manager is running as the screenshot won't be preserved after closing the application anyway in that case.
  • Allow xfce4-screenshooter -r to be used as a command for a keybinding.
  • Allow silent build.
  • Fix most pre-build warnings.
  • Escape screenshots path when opening them with an application.
  • Plug some leaks in the application and in the panel plugin.
  • Do not accept conflicting CLI options. Warn the user when he uses CLI options which are not coherent.
  • Correctly save preferences, even if the rc file does not exist (Mike Massonnet).
  • One second is now the minimal delay when using the interactive mode. This caused the screenshooter dialog to be partially displayed on the screenshot in some cases.
  • A lot of updated translations for the application, the panel plugin and the documentation. Thanks to the Xfce translation team!

Screenshots can be found on the homepage.

Backward compatibility for Ruby 1.8

  • February 6, 2010
  • Mike Massonnet
As I'm currently writing some Ruby code and that I started with version 1.9 I felt onto cases where some methods don't exist for Ruby 1.8. This is very annoying and I started by switching the code to 1.8 method calls. I disliked this when it came to Process.spawn which is a one line call to execute a separate process. Rewriting it takes around 5 lines instead.

So I had the idea to reuse something I already saw once. I write a new file named compat18.rb and include it within the sources that need it. Ruby makes it very easy to add new methods to existing classes/modules anyway, even if they exist already, so I just did it and it works like a charm.

Here is a small snippet:
class Array
        def find_index(idx)
                index(idx)
        end
end

class Dir
        def exists?(path)
                File.directory?(path)
        end
end

Update: It can happen that a fallback method from Ruby 1.8 has been totally dropped and replaced against a new method in 1.9, and in this case the older method has to be checked if it exists, and otherwise make a call to the parent.
class Array
        def count
                if defined? nitems
                        return nitems
                else
                        return super
                end
        end
end

Fed up with Moblin

  • February 4, 2010
  • Mike Massonnet
I slowly begin to be fed up with Moblin, the base installation. The base system starts way too often with core-dumps (crash on mutter f.e. which also means X restarts), but mainly because of RPM. When package-kit starts to check for an update — or when you do any installation/upgrade with yum e.g. you use rpm directly or indirectly — the whole system goes unusable, the browser acts like it is frozen, it takes very long to switch between tasks, and all of this for at least a minute up to an hour if you accept to run an update. You can call this whatever you want, I call this a big fail.

This happens on an Acer Aspire One 9", where I guess they installed the cheapest SSD out there.

In fact things were getting really bad when I switched to an Xfce session, I received unbelievable long startup times. Uxlaunch, the new automatic login application on Moblin 2.1, is totally uncooperative. The Xfce session ends launching many tools and applications twice, two corewatcher-applets, two connman-applets, etc. Uxlaunch will run xfce4-session, but also executes the same desktop files — as it seems after a quick look in the code — from the autostart directory, which is a role taken by the Xfce session manager.

So I have been looking around to finally throw away some junk.

Now I have been looking close at the autostart applications since the "all-in-twice" fiasco to get this netbook fast again. Of course you have to know what you do, this kind of tasks isn't open to people without technical skills. First I changed the default "desktop" to Openbox, by downloading the RPM source package, compiling it and putting it inside the uxlaunch configuration file. Then I have been removing some base packages and manually hiding some desktop files to avoid them to autostart — I have been playing with the Hidden/NoDisplay key but it didn't have any effect on uxlaunch so it ended with a chmod 000 command.

I dropped four packages, kerneloops, corewatcher and obexd/openobex. I really don't want them around anymore. And I "dropped" seven autostart files, ofono which depends on a lot of applications, the bkl-orbiter, and the rest are Moblin panel related applications, bluetooth-panel which I don't even have on this netbook, carrick-panel as I use connman-applet which works at least for an automatic connection, two dalson applications dalson-power-applet and dalston-volume-applet, and at last moblin-panel-web.

I kept the gnome-settings-daemon although I have the Xfce settings daemon installed which I do prefer at some extends. And after all this I changed the GTK+ and icon themes through the gconf keys. And what's the conclusion? Moblin is nice, but I managed to munch it and enforce my desktop.

Update: After running under OpenBox I feel that my remark toward RPM is wrong, I don't know maybe it is the mixed use of OpenGL that makes the tasks taking ages to react. All in all, the default desktop environment is something where you must know about patience :-)

Xfce 4.8 Schedule Changes

  • January 26, 2010
  • Jannis Pohlmann

As the Xfce release manager, I’d prefer to be the bringer of good news. Unfortunately, we have to make some adjustments with regards to the Xfce 4.8 release schedule.

You may well remember last year’s chaos with the 4.6 release date. We’re trying our best not to repeat that and if it should happen again, we’ll at least keep you posted about the issues as good as we can.

So, what’s the deal with 4.8?

One thing that hasn’t changed much is that our development team is very small. A hobby project of this size requires a certain amount of time to be invested by each individual developer. Time not everyone has as much has he would like to dedicate to Xfce.

Today, Brian announced his absence for the coming months due to his new job, leaving 2-3 of our core components (xfdesktop, xfconf and xfce4-session) more or less unmaintained (aside from bugfixes). The good news is that Jérôme (who has recently started to improve xfce4-settings and port xfce4-session to libxfce4ui) and Daniel (the maintainer of the thunar-shares-plugin) have offered their help with xfdesktop and xfce4-session.

Brian is not the only one having little time at hand though. I’m preparing myself for my final university exams, so ideally I’d be sticking my nose into lecture notes all day long. I still have the time to write mails like this but there hasn’t been much activity around thunar and related projects lately.

Again, I’m really happy to see people volunteering to help because that’s what we need right now. There’s a lot left to do before we can release 4.8. Let me get to that now.

As some of might have heard, thunar was ported to GIO this summer. Through GVfs, GIO brings new features such as SMB, SFTP, FTP browsing which some people use one a daily basis already. Now, GVfs has turned out to be problematic for us for various reasons. At first it shipped a HAL-based volume monitor with a hard-coded dependency on gnome-mount. Today it ships a volume monitor based on gnome-disk-utility (uses DeviceKit-disks itself) which proves to be inconsistent and somewhat incompatible to the HAL mounting code in exo.

The result: thunar-volman (not part of the core but important for thunar nonetheless) and xfdesktop will have to be ported to udev (the mounting being done with GIO, ideally). I’ve started working on this but this is far from being finished.

Question to the other developers: Didn’t xfce4-session use HAL for logging out and stuff? We might have to look into replacing those portions of code with something based on ConsoleKit, I guess?

HAL/udev is not the only issue however. With Xfce 4.8 we’ll be replacing libxfcegui4 with a new library called libxfce4ui. Not all core applications (again, xfdesktop being one of them, I think) have been ported to it yet. In most cases, this is no big deal and probably could be resolved within a few days though.

Then we have garcon, the much improved menu library that is supposed to replace libxfce4menu. At the time of writing the only feature it is lacking that is crucial for 4.8 is file system monitoring. We’ll probably implement basic monitoring like we had in libxfce4menu. Work on this hasn’t started yet.

Also, xfdesktop needs to be ported not only from ThunarVFS/HAL to GIO/udev but also from libxfce4menu to garcon.

So, as you can see there is quite a lot of work ahead of us. Taking into account the little free time some of us have these days, we’ve decided to postpone the 4.8 release until June 12th instead of April 12th. The entire release phase in our schedule has been moved by two months in time, as you can see on the official schedule wiki page:

 http://wiki.xfce.org/releng/4.8/schedule

To be honest, I wouldn’t consider this new date fixed either. It all depends on how much we can do until the feature freeze on April 1st. I’m optimistic that meeting the deadlines is possible though.

For all of you who can’t wait until June, try out our development releases which are announced on http://identi.ca/xfce. I have at least something good to share: For a few weeks now I’ve been running Fedora 12 with a mixture of Xfce 4.6 packages and development package from the upcoming 4.8 series and the new components have proven to be very stable already.

I’m especially happy about the new panel which works almost flawlessly (except for a few dual head issues) and not only supports real transparency and more comfortable launcher creation based on garcon, but is also compatible to panel plugins written for Xfce 4.6. (Good work, Nick!)

So, I guess this is it. A mixture of good and bad. I hope nobody is too disappointed. As always, we’re doing the best we can.

Cheers!

The download manager is in the wild

  • January 24, 2010
  • Mike Massonnet
So it's finally done, it took very long, but it's done. The download manager I once had in mind is taking off into the wildness :-) Of course it took long because I never did something with it, writing a front-end to wget/curl isn't interesting -- who cares about downloading HTTP/FTP files when the web browser handles it for you anyway -- and reusing GVFS doesn't make sense cause really you don't want to download from your trash:// or whatever proto:// and again only HTTP/FTP is not interesting. Not at all. I have come across Uget and other very good projects but most of them are either writing the code to handle the protocol like HTTP and/or are looking forward to handle more interesting protocols like BitTorrent. I think it's a very tough job that demands too much for a one-maintainer project. Recently I saw the new release of aria2 that comes with an XML-RPC interface and this took all my interest during 4 days. I believe this utility is very promising and I had really like to write the good and user-friendly XML-RPC GUI client that it seems to be missing!

What is so exciting about aria2? In case you know the project you don't have to read, but it is worth mentionning the features of this small utility. It supports HTTP(s)/FTP but also BitTorrent and Metalinks. It is widely customizable for each specific protocol. It can download one file by splitting it into several pieces and using multiple connections and even mix HTTP URIs with BitTorrent and by the same time upload to BitTorrent peers what has been downloaded through HTTP. So this has to be the perfect candidate to write a nice download manager, hasn't it?

The client is a very first version that I intended to code name draft although the release assistant on xfce.org doesn't allow this. Instead it will take the more neutral road of 0.1.0 to 0.1.1 etc until 0.2.0 followed by stable fix releases.

Why draft? Simple. It's being written with a higher level language than C but not even Vala :-) High-level languages are a great deal when starting a new application, as you can type more and get more, instead of typing like a dog for a rocking hot, well lousy, window. Since I do like Ruby, it's being written in Ruby currently, and it depends on the ruby-gnome2 project for the bindings. To get a picture, a main file to open a window takes 3 lines. Of course the final version is meant to be written in Vala/C, but I still need to convince myself that Vala+libsoup isn't an option that is going to waste too much time. Also at first glance libsoup looks easy to use, it allows to build XML-RPC requests, to request the HTTP bodies and to send messages, but it is not an XML-RPC client and you never know how well the Vala bindings will play. This means extra attention for small things. Starting an application from scratch with such constraints are usually a big time-killer therefore using like in this case an existing XML-RPC client is very important. The GUI is done with Glade in GtkBuilder format and reusing it into a new language will be pretty easy.


So what's next? I'll just wait for some feedback see what the audience thinks about it, if at all, and polish here and there. Keep tuned for the next update.

Comparing gtk+ and Qt applications

  • January 17, 2010
  • Josh Saddler

I've been on the hunt for Qt/KDE applications that do the job of the gtk+ equivalents I use.

That's a tall order, as I'm used to the way my gtk+ applications look, feel, and behave in Xfce. Trying to learn something that may do things completely differently can be very frustrating. Heck, it can be annoying even when 98% of the time the app does just what you want it to. That last 2% can push you over the edge.

Part of learning the ropes with KDE4 is finding which application does what. Yes, I could just keep using all my existing gtk+ applications with little or no difference in look'n'feel, thanks to QtCurve. But that would deprive me of the chance to try out the many, many other apps available in the FOSS world. I'd miss out on all the fun if I focused on applications written for just one toolkit. This post examines the differences between certain gtk+ and Qt programs.

Obviously, these are my subjective experiences. Everyone has their own preferences. Using and writing about all these different applications has really helped me take a look at what exactly I like to see in an application. What I expect it to do out-of-the-box, and what kind of tweaks it offers so that I can tailor it to my needs. Actually, reviewing Qt apps has helped me in my search for gtk+ equivalents, too. I've been spending more time examining user interfaces on their own merits, instead of discarding apps from consideration based solely on their widget toolkit.

The applications listed here all work equally well in Xfce and KDE, so if it operates in one environment, it operates in the other. If it fails in one, it fails in the other. It's a fairly level playing field, except that I'm coming from an Xfce background, which means I'm just not used to how some things are done on the "other side of the tracks." I've tried to keep that in mind as I jump from app to app.

Multimedia

For audio playback, in Xfce I use Decibel. Its playlist support isn't all that great, and it can't do additions by genre (or suggest/smart-add tracks) but overall it's fast and easy to use. I've tried other gtk+ apps like Rhythmbox and Exaile, but while I like the ideas behind them, their user interfaces are just a bit too busy to be useful. Players like Listen or Songbird are also too complicated (and dependency-bloated).

I need some kind of happy medium between the sparse simplicity of Decibel and the clutter that is Rhythmbox, Banshee, Exaile, et al. Bluemindo, Consonance, and some of the MPD front-ends come close, but don't quite make the connection for me.

Speaking of MPD: while it has many, many front-ends, I totally dislike the whole client-server model. I don't stream anything over the network, so setting up a server on a single box, with all the weird configuration that entails, is just too much. Plus MPD still can't play audio CDs, so I don't bother with anything that uses it, whether gtk+ or Qt.

Elsewhere in the player spectrum, there's XMMS and its derivatives. I used Audacious for a long time until it quit working a few years ago, then moved to Decibel and haven't looked back. However, as much as it's a pain to add tracks in the Winamp lookalikes, I can use them fairly quickly and find where everything's located, since I used Winamp for years back in my Windows days.

It's hard for me to find a player that feels usable on a day-to-day basis. Both when I just quickly want to throw some tracks in the queue and when I want to spend some time arranging a playlist. Those are the two big tests of a player's usefulness. There are lots of KDE/Qt media players available, so I've started sampling them.

JuK: Meh. I don't like the UI. None of the modes are intuitive, even after days of playing with it. That left sidebar is killing me. Totally unhelpful.

Amarok: Yup, the heavyweight. The program that's gone through polarizing changes to its UI and features in the 1.x/2.x release series. Can't say I care for it -- it was far too complicated. Felt like it took the worst UI design aspects of Listen, Songbird, Banshee, and slapped 'em together. Plus it was slow. I don't have a large collection of music on my laptop; less than ten albums. The library is tiny, but Amarok is always pig-slow to startup and search through my files. Plus Amarok required many libraries that take a long time to compile. Not worth it. Akarok just isn't right for me.

QMMP: This is familiar to an old winamp/xmms/audacious user, but very dated. I don't like the idea of skins anymore. I want applications to smoothly integrate with my desktop theme -- using native widgets, whether gtk+ or Qt. There's no "default to native Qt widgets" setting, unfortunately. But it plays media as expected. There's a wealth of built-in plugins that offer everything I need for playback and information display. Just like the good ol' days of Winamp, XMMS, and Audacious.

QMMP is the player I'll stick with for the time being, as I can't find anything with a UI that's not too simple or too complex. What I'd like is a Qt app with a couple of configurable panes and album cover support -- something like Decibel or Consonance, but capable of more than just adding music by album or artist.

Kmix: an applet for volume control. It has the quick functionality that I'm accustomed to in Xfce4's volume control, in that I can hover over the applet and scroll the mousewheel to change volume without needing to click. Very handy. However, the icon and "sound wave" meter are so tiny it's very hard to tell the volume has been changed without clicking to check the level. When opening Kmix as a standalone application, it's the most confusing frontend I've ever seen to alsamixer. Seriously, its UI is crap, even after adjusting the display options to minimize the clutter.

That screenshot in the above link represents a best-case scenario, and even that's totally unintuitive. The icons also don't always make sense -- take that first one at the top of the "Master" control. It's a mini slider switch. Looks like it should do something, right? Yeah, just keep grabbing at it, then realizing that it won't actually do something. I could go on, but I'll stop there. There are some icons I just have to ignore.

Fortunately, my needs are simple; I don't need many displayed controls. I don't even use the laptop's builtin microphone, and only rarely use headphones. "Master" and "PCM" are the only things I really care about.

On the positive side, sometime after installing Kmix (so it's possibly related) I now have an on-screen volume indicator when I use my laptop volume buttons! The last time I saw this was in an ancient version of Ubuntu, so it's quite a treat to have the buttons actually work and get integrated into my desktop. Love it!

Now I just need a working on-screen display for my LCD brightness level. I do get a popup, but it doesn't always move the level meter when I adjust brightness, in KDE and Xfce. At least I'm halfway there: things appear on the screen when I push buttons. Good start.

Utilities

Ark. In Xfce, I use Xarchiver to work with tarballs, zipfiles, etc. I've also played with Squeeze in the past, but found it rather unstable. Back in my Gnome days I used the ubiquitous file roller. There are a few different gtk+ archive managers I've used, and generally liked their UIs.

Ark seems to be the standard (possibly only) Qt archive manager in Portage. Sadly, it would not work: it said it did not have the necessary permissions to create archives in my own home folder! This was a show-stopper, so after a few half-hearted debugging attemps I unmerged it and went back to Xarchiver. Under KDE, Xarchiver sorts the archive in reverse, with files at the top and folders at the end, but this is a minor change to expected functionality. It still does everything else it's supposed to.

Plasma-emergelog: a plasmoid I found on the official KDE overlay. Prints emerge.log output from the last few merges; can be pretty useful. It's even written by a fellow Gentoo developer.

Dolphin: as filemanagers go, this one is okay. Once I disabled some of the hover mojo, enabled double-click activation, and added an "Up" arrow, it works like any other FM I've used. That is, with one key exception: the unending annoyance that is the location bar! I like having an editable location; it's much faster for me to type the location than it is to keep clicking backwards and forwards though the filesystem. However, the location bar doesn't seem to be persistent. Every time I open a new Dolphin window, I always have to click View -> Navigation Bar -> Editable location. My setting is never permanently saved. Is this a bug or a feature? It's driving me crazy!

The search bar is interesting, but useless. I intend to remove resource and space-sucking hogs like Nepomuk, Strigi, and anything else that uses the "semantic desktop." Maybe one of these days the semantic desktop will matter, and our tools for using it will improve, but for me, that day is a long way off.

I can't find one good desktop search framework for any environment, KDE, Xfce, or Gnome. Beagle, tracker, Strigi, you name it. In my experience they're just too slow and bloated.

Konsole: an acceptable terminal, though I may be going back to Xfce Terminal soon. Konsole does everything I need it to except make use of middle-click functionality. I can't middle click a URL to have it open up in a new Firefox tab, for example. This is something I do constantly -- whenever I run an eix query, I usually open up the application's homepage, which just needs a middle click in Xfce Terminal. It's a two step process in Konsole; I first have to right-click the URL, then choose "Open Link." I miss the middle-click so much I'll probably go back to Terminal. Now that my gtk+ widgets all look like native Qt apps, it's not like I'd notice a difference. The color schemes are the same, the fonts, are the same, they can both do tabs . . .

Networking

Kbluetooth: Bluetooth manager for KDE. In Xfce, I use Blueman, which gets the job done. It mostly has a unified user interface. But I can't actually browse my phone in a filemanager, since Thunar lacks support for that. Even using Gigolo isn't enough -- I'd have to install various FUSE packages to get support for opening the obex:/// location from Blueman, or use Nautilus. Neither are acceptable.

I can't browse my phone using Kbluetooth, either. I can send and receive pictures, but sending (from the phone) requires a laborious, slow process of selecting each file and stepping through several menus. Sending items to the phone from the laptop is much faster, as I can use the normal file picker.

Also, I couldn't get a unified preference/usage window to popup for Kbluetooth. I had to do lots of right clicking on the panel applet, and every setting requires a new window. Rather annoying.

One other annoyance was the fact that every time I wanted to receive a file from my phone, Kbluetooth opened KWallet. Can't it just read my PIN from secure location in the filesystem? I think that's what Blueman does, maybe someplace in /etc/, just like wicd and wpa_supplicant do for WLAN passwords.

I still need a good Bluetooth client that lets me browse my phone directly in a file manager of some kind.

WiFi: turns out that by reemerging solid with +wicd, it enables support for wicd, which I already have installed. I haven't seen how this works, though. Wicd was already listed in the program autostart menu; I just had to change the command so that it launches the tray applet and doesn't just run the background daemon.

Regardless of any special Solid integration, however that works, since wicd operates normally, it may remove
the need to install some other network connection manager. I'm quite comfortable with wicd, and it'd be nice if I didn't have to setup a new configuration for a new app every time I switch desktop environments.

Writing

Kblogger: client that supports multiple blogging APIs, including LiveJournal support. I found this client in the kde overlay. However, it doesn't actually work with LJ. It can't add post tags, nor can it retrieve existing tags. Trying to do so kills the application. Very buggy. I gave up and unmerged it.

Blokkal: another multi-blogging client with LiveJournal support. Does everything I want it to for LiveJournal. Minor annoyance: I can't just type my LiveJournal password into Blokkal, but instead have to first enter the password for KWallet. But that's probably a more secure method of storing it locally, right? Still, it's an extra step that I don't have to take when using gtk+ clients like Drivel or LogJam.

Office

The next big writing application to find is a word processor: something that's fast, easy-to-use, and doesn't require hours of downloading and compiling. KWord seems to be the most well-known office application, but the reviews I've read so far indicate that it tends to run a bit slow, though not as bad as OpenOffice. That's a positive sign, so I'll give KWord a shot.

On the lighter side, FocusWriter seems to be a Qt clone of PyRoom, which is a free gtk+ version of WriteRoom for the Mac. I wrote an ebuild for PyRoom a year ago; it's been one of my very favorite and most useful applications. I do need a distraction-free writing environment, so I'm glad to see that there's an equivalent application for KDE/Qt.

Other office software I need to investigate: spreadsheets, finance trackers, and email clients.

And another thing . . .

I notice that it can take a long time for newly installed applications to show up in the Kicker menu, or to disappear after I've uninstalled them. Why is that? Is something not scanning /usr/share/applications when it needs to? I usually have to logout if I want to see the menu updated.

Thunar-volman and the deprecation of HAL in Xfce

  • January 16, 2010
  • Jannis Pohlmann

Last week I started looking at thunar-volman (a program that performs certain actions when new devices are plugged in) with the goal to make it compatible with the latest release of thunar which uses GIO instead of ThunarVFS for almost everything that takes place under the hood.

Until now, volume management (monitoring and mounting) in Xfce was done through HAL, the hardware abstraction layer that is currently being deprecated and dropped by major distributions. The functionality previously provided by HAL has been moved into udev, udisks (formerly known as DeviceKit-disks) and upower (formerly known as DeviceKit-power).

Volume management is transparently supported by GIO, meaning that applications don’t have to worry about the backend implementation. It should, in theory, not matter whether HAL is used or udev/udisks. Unsurprisingly, in reality, things are not that trivial, mainly for two reasons:

  1. Due to its focus on file management, GIO only supports monitoring and detecting storage devices (DVD drives, USB sticks etc.). There is no way to be notified when e.g. a digital camera or a portable media player is plugged in. This is critical for the functionality of thunar-volman which until now supported everything from cameras, media players, blank CDs/DVDs, audio CDs, PDAs and printers to input devices like keyboards, mice and tablets.
  2. Mounting volumes with udisks seems to be somewhat incompatible with HAL. I tried to mount volumes with thunar-volman and exo-mount (both implemented on top of HAL) and was for the root password upon unmounting in Thunar (using GIO and gnome-disk-utility/DeviceKit-disks). It seems like volumes mounted with HAL are assumed to be mounted by a different than the current user and thus, require root privileges to be unmounted.

HAL being deprecated and somewhat incompatible with udisks, what are the consequences for Xfce, and for thunar and thunar-volman in particular?

Let us, for a moment, assume Xfce 4.8 and thunar 1.0 were released as they are today, with thunar using GIO (and udisks instead of HAL in all major Linux distributions) and the rest (like thunar-volman and exo-mount) depending on HAL. As mentioned before, exo-mount and thunar wouldn’t work together in multi-user setups. Thunar would no longer detect cameras, PDAs, audio CDs, blank disks, mice, keyboards, tablets, media players and thunar-volman would end up being completely useless, as it is not detecting devices by itself. I think it is safe to say that this is not what we want.

In the following, I will focus on how to deal with thunar-volman. The rest of Xfce faces a similar roadmap, however. With regards to thunar-volman, there are (at least) three sane options:

  1. Drop thunar-volman and only support auto-mounting storage devices from now on, directly implemented in thunar. What is very obvious about this solution is that a lot of possibly useful functionality is lost.
  2. Port thunar-volman to (g)udev/udisks/GIO and make it a standalone daemon so that thunar no longer has to spawn it when new devices are plugged in. The advantage of this approach is that thunar only needs to depend on GIO and doesn’t have to implement the device detection part.
  3. Port thunar-volman to (g)udev/udisks/GIO as described above and make thunar depend on (g)udev for device detection. Spawn thunar-volman when devices are added/removed. The advantage over the previous approach is that thunar-volman doesn’t have to run permanently as a daemon. The additional thunar dependency on (g)udev could be seen as a disadvantage but on the other hand, it basically replaces another (HAL).

Now, everyone knows that programmers are lazy people. So, in the hope of being able to save some work, I started a survey on the usage of thunar-volman. The idea was to find out which of its features are used most and whether there are some that nobody really cares about. Here are the results:

=======================================================================================
                                                        Feature   #Users   Percentage 
---------------------------------------------------------------------------------------
                        Mount removable drives when hot-plugged       86        92.5%
                            Mount removable media when inserted       83        89.2%
                           Browse removable media when inserted       69        74.2%
             Cameras: Import digital photographs when connected       31        33.3%
                          Play video CDs and DVDs when inserted       31        33.3%
                                   Play audio CDs when inserted       30        32.3%
                 Burn a CD or DVD when a blank disc is inserted       21        22.6%
        Portable Media Players: Play music files when connected       11        11.8%
                      Auto-run programs on new drives and media        7         7.5%
        Automatically run a program when a printer is connected        7         7.5%
                        Auto-open files on new drives and media        6         6.5%
                               Sync Palm devices when connected        5         5.4%
  Automatically run a program when an USB keyboard is connected        3         3.2%
     Automatically run a program when an USB mouse is connected        3         3.2%
         Automatically run a program when a tabled is connected        2         2.2%
                          Sync Pocket PC devices when connected        2         2.2%
=======================================================================================
                Thunar Volume Manager Usage Survey with 93 participants

According to the results of this survey, auto-mounting and browsing of removable drives and media have highest priority among the 93 participating thunar-volman users. This more or less covers the functionality we could cover with GIO alone (plus automatically running a program when new drives and media are inserted). However, a third of the users also use thunar-volman for importing photographs from digital cameras and for playing video and audio CDs as well as DVDs automatically. Almost a 25 percent of all users use thunar-volman to start their favorite burning software when a blank CD or DVD is inserted. Slightly more than 10 percent want thunar-volman to start playing music on portable media players when they are plugged in. Printers and Palms are also somewhat relevant.

This survey confirms my expectations that handling storage devices alone is not enough even though they clearly are the most important use case for thunar-volman. Our users seem to like the flexibility of thunar-volman and make use of it. This disqualifies option 1 and leaves us with options 2 and 3. I’m inclined to avoid another daemon and go for number 3.

In preparation for porting thunar and thunar-volman to udev/udisks/GIO, I’ve created a wiki page to collect information about how we can reliably distinguish the different device types based on udev properties: http://wiki.xfce.org/dev/thunar-volman-udev. If you have blue-ray disks, video CDs, a digital camera, a Pocket PC, a Palm, a USB printer or a graphics tablet, you could make me very happy if you inserted them or plugged them in and sent me the output of udevadm info --export-db to my Xfce email address together with a short hint what devices you’ve plugged in. Alternatively, you can paste/upload the output somewhere on the internet and comment on this blog post, and thereby help making future versions of Xfce better.

Cheers!