Xfce

Subdomains
 

Xfce making great strides with version 4.6

  • March 1, 2009
  • vincent

A little more than two years after version 4.4 was released into the wild (on 21 January 2007), the Xfce development team has announced the availability of the new version of the Xfce desktop environment yesterday (yes I’m late to the party…).

In an email, release manager Stephan Arts announced the new version 4.6 (only even numbers are used for stable releases), which has already been picked up in various articles all over the web’s darkest corners.

Xfce is an integral part of Xubuntu. In its role as the desktop environment it provides vital applications such as the panels, the desktop, the file manager and the window manager (i.e. the thing that paints the borders around your windows and handles how they are placed in your screen), among others. In fact, it is the primary reason for Xubuntu’s existence – when Jani Monoses founded the project he did so because he wanted to combine the features of Xfce with the advantages Ubuntu brings.

So what’s new?

Due to technical problems, I haven’t been able to run Xfce 4.6 on my personal computer as of yet (something which I hope to change in the coming week), so I’m going to base myself on the excellent Xfce tour prepared by Xfce developer and previous Xubuntu developer Jérôme Guelfucci and my experiences while running Xubuntu from my USB drive. I’ll also be using the screenshots provided by Xfce developer and Xubuntu-Xfce Liaison Jannis Pohlmann because I’m lazy.

First of all, Xfce’s panel (xfce4-panel) has received some love with lots of bugs fixed that especially the proud owners of multiple monitors won’t mind to miss. It also comes with updated panel plugins. This adds nifty new features to e.g. the system tray, which now allows you to hide certain icons. This is quite useful to hide, for example, that NetworkManager icon that always sits there yet is almost never needed after your network has been set up.



Although not part of the release, the screenshot plugin has been developed into its own application by Jérôme Guelfucci (and David Collins added some nice new features, too) and is now named Xfce4 Screenshooter. It, among other features, allows you to capture a region of the screen or a single application. Now the keyboard shortcut for PrtScn can be set by default :) .



The desktop manager, xfdesktop, now includes an oft-requested feature: rubber banding, or the ability to click and drag to select multiple icons to manipulate. Furthermore, the Xfce menu is now a submenu of the context menu when you have icons on your desktop – something that some people have expressed dissatisfaction about.

On the xfce4-mixer front, Jannis Pohlmann has rewritten it to sport a more polished interface, and to use Gstreamer. Some refer to this as bloat, but it really makes for a more maintainable application that supports multiple sound systems more easily, is better tested and will work on the systems of more people (although it will undoubtly not work on the systems of some others, namely those who can’t get Gstreamer to work).

With the new mixer also comes a panel plugin that allows you to change the volume with a mere scroll over the panel icon, which is very useful unless you don’t have a scroll wheel.

The session manager has also received some love. Based on code in Xubuntu, originally written by Jani Monoses, but almost entirely rewritten, Xfce now supports suspending and hibernation by default. Though the Suspend and Hibernate buttons might attract a bit too much attention with their size, considering how often they’ll be used, it’s a useful addition nonetheless.



A feature that will help out a lot of users and will save me a lot providing support, is its ability to automatically restart important applications if they just so happen to crash. The reason this is so useful is because the panel has a habit of occasionally crashing seemingly without reason, with people left not knowing what to do.

Of course, the Xfce Window Manager, xfwm4, was also updated, mainly thanks to the work of the Xfce project founder Olivier Fourdan, from France. It can now see when an application is busy and won’t respond, and offer you to force it to quit.



It also offers a useful new “Fill” option that allows you to resize a window to use as much space as possible that is left unused by other windows. This can come in handy when working with applications such as the Gimp. Besides these improvements there are some other tweaks and stability and performance improvements.

Xfce’s file manager that Benedikt Meurer developed for Xfce 4.4, Thunar, has received attention from Nick Schermer and Jannis Pohlmann. Being one of Xfce’s show-off applications, it just got a little better with many bug fixes and performance improvements coming in. It also ships a new plugin to set an image as your wallpaper from within Thunar, and now follows the XDG user directories specification, which basically means that it provides you with folders for Music, Videos, Pictures, etc. and translates their names if you use another language.



Furthermore, connected drives that have not been mounted (i.e. prepared for reading by the computer) will be distinguishable by their translucent icons. Encrypted devices are now supported as well. As for Xubuntu, word has it that we may get folder sharing in 9.04, which many people have been clamouring for.

Jannis Pohlmann and Jasper Huijsmans have been working on a rewrite of the AppFinder. It now has a cleaner interface and updates in real-time, as always allowing you to easily find installed applications and, by dragging them to the Launcher-creation interface, easily create panel shortcuts.



The Xfce menu has also been updated to really comply with the freedesktop.org standard (perhaps you noticed that the menu in previous versions was structured a bit oddly). Unfortunately, no menu editor is included and, with menu merging not being supported yet, using an alternative menu editor like Alacarte won’t work either. It’s manually editing the files or making do with the menu as-is, for now.

And last but certainly not least, one of the biggest new features: xfconf. Admitted, you won’t (shouldn’t) notice much of this, but it’s quite the improvement. Basically, it provides a new, central configuration system for Xfce similar to, but simpler than, GNOME’s gconf.

It does offer some nifty new useful applications though. For example, there’s now one central place to edit the settings of all applications that use xfconf – the Settings Editor (xfce4-settings-editor).



It also includes a command-line tool, and it is this that looks extremely valuable to me. Not because I like to type commands, but because you can bind them to keyboard shortcuts. Yep – editing preferences with a simple key combination.

For example, if you’re a programmer, it can be very useful to switch your keyboard layout on-the-fly – use dead keys when doing normal stuff like writing a blog post, and stop using them when you’re programming and want your quotes to appear directly. With xfconf, this can be done very easily. For example, the command to set your keyboard layout to the US layout without dead keys, you’d use:

xfconf-query -c keyboard-layout -p /Default/XkbLayout -s "us" && xfconf-query -c keyboard-layout -p /Default/XkbVariant -s "altgr-intl"

Similarly, if you wanted to change the layout to US with dead keys, you’d use:

xfconf-query -c keyboard-layout -p /Default/XkbLayout -s "us" && xfconf-query -c keyboard-layout -p /Default/XkbVariant -s "intl"

Now all you need to do is bind them to a keyboard shortcut and you’ll be set!

Of course, this is some pretty advanced stuff, but it’s there when you need it and hardly noticeable when you don’t. Plus, it might make for a good blog post in the future, so if you have any more useful applications of this, do tell me :) .

With the new settings backend comes a new Settings Manager which allows you to edit many of the settings in one window and is more neatly organised and better suited to small monitors in general.



Furthermore, a lot of the settings windows have been redesigned and options have been added – I’ll kindly refer you to the excellent tour for an overview.

So how do I get it?

You can download Xfce in source code form or using the oft-praised graphical installers. Packages for several distributions will without doubt already be available. However, the easiest and recommended way is to wait for your distribution to provide the packages. Xubuntu 9.04 will have Xfce 4.6.0 and already has Release Candidate 1. If we’re lucky, version 4.6.1 will even make it in time which will contain the first important bugfixes and translation updates.

If you’re running Xubuntu 8.04 “Hardy Heron” or 8.10 “Intrepid Ibex”, then you’re lucky, because Jérôme Guelfucci has prepared packages with help of the Debian Xfce group and Lionel Le Folgoc.

So what is ahead?

The Xfce development team is already looking forward to version 4.8. The plan is to do a shorter release cycle this time, with one (probably optimistic) guess targeting a new release in about a year. Some excellent features have already been developed to be included in 4.8, such as my pet peeve drag ‘n drop support for panel icons (no more messing with commands in launchers!), menu merging so you can actually use a menu editor, and several improvements to Thunar.

All in all, this has shaped up to be a very nice release with some excellent new features, some of them nowhere to be found in other desktop environments, which demonstrates once again why I like Xfce for more than performance alone. With some of the improvements for 4.8 already checked in and many more waiting in line, I’m already excited. I’ve fallen far short when it comes to attributions, failing to name Xfce’s excellent translation team, the people behind the Xfce distros, the various communites, Brian Tarricone, Mike Massonnet, -I guess I should stop naming people because I’m bound to forget many more, or even people of whom I don’t even know they’ve contributed.

To whomever contributed to Xfce in any way: thanks! :)


Licensing Suckage

  • December 11, 2008
  • Brian Tarricone

I just got an email from a developer who works on the nifty cairo-dock application, pointing me to a thread about licensing issues.

A bunch of months ago, he’d emailed me asking about how to best use code from my Xfce Mailwatch Plugin in cairo-dock to add mail-checking capabilities. At the time, I was pretty stoked that someone else had actually found my code useful enough to incorporate into their program, and offered my encouragement.

Sadly, though, licensing ugliness has reared its… well… ugly… head.

When licensing code under the terms of the GNU GPL or LGPL, the FSF suggests (and most people follow) that you license under “or (at your option) any later version” terms, which means that, while you initially license the code under the version of the GPL or LGPL of your choice, someone can later take your code and relicense it under the terms of a later version of the same license. This also makes the code automatically compatible with future versions of the license.

You might think this sounds pretty good for convenience and licensing compatibility, and you’d probably be right.

However, this isn’t so great from a philosophical perspective, at least from my philosophical perspective. The problem I have is this:

Licensing a work under “GPL version 2 or later” terms means that I am implicitly agreeing with any new restrictions that the FSF dreams up (or any existing restrictions the FSF wants to drop), forever. I’d basically be saying that I agree with something that doesn’t exist yet, and could take any shape or form imaginable.

Don’t get me wrong: in general, I think the FSF is good people, and I agree with their message for the most part.

But I don’t know them, personally, and I don’t agree with them 100%. And I don’t know who’s going to be running the FSF next year, or in five years, or in 20 years. So how can I know, or even have reasonable belief, that their philosophies and values will align with mine such that I’ll agree with future versions of their licenses? There are already parts of version 3 of the GPL and LGPL that I don’t completely understand or agree with, so why should I expect that versions 4, 5, or 10 will be completely to my liking?

The short answer is: I can’t.

And so, for the most part, I release my software under “GPL version 2 only” terms. (Because I’m a bit lazy and don’t want to make a big stink, I’ll release code under “or any later version” terms if I’m contributing to an existing code base that uses those terms.)

it really pained me to have to answer that email saying that my code’s licensing (GPLv2-only) wasn’t compatible with theirs (GPLv3-or-later), but it’s the truth, and there’s not much I can (or want to) do about it.

The only solution I can think of (I’m not a lawyer, of course) that allows them to use my code is that they relicense their code under GPLv2-or-later terms. Of course, then they lose any restrictions that the GPLv3 has over the GPLv2, which I assume they’d prefer to have, since that’s how they’ve licensed their code.

(Before anyone says it, another possible solution would be for me to relicense under LGPLv2.1. The problem with that is one I’ve discussed before: section 3 of the LGPLv2.1 explicitly allows a recipient of the code to relicense the code under regular GPLv#-or-later terms, regardless of the only/or-later status of the original LGPL licensing. This of course completely defeats the intent of my rationale above.)

And so, the OSS licensing mess has caused yet more pain to people who just want to share code and avoid duplicating effort. I love the GPL. I really do. But I also hate it.

Backlight Change Notification?

  • December 9, 2008
  • Brian Tarricone

Is there a decent (non-polling) way to get notified when a laptop panel’s backlight brightness changes? HAL exports methods to set and get the brightness level, as well as query the number of possible levels, but there doesn’t appear to be a way to get notified if the level changes. Calling org.freedesktop.Hal.LaptopPanel.GetBrightness() every five or ten seconds or so sounds like an awful idea, of course.

I’ve heard plans to use the XBACKLIGHT randr 1.2 property to do backlight setting, but I don’t think any drivers use this yet. Polling /sys is just as bad (why doesn’t sysfs or procfs support inotify, dammit!), and obviously isn’t portable anyway (not that HAL is particularly portable these days either).

Backlight Change Notification?

  • December 9, 2008
  • Brian Tarricone

Is there a decent (non-polling) way to get notified when a laptop panel’s backlight brightness changes? HAL exports methods to set and get the brightness level, as well as query the number of possible levels, but there doesn’t appear to be a way to get notified if the level changes. Calling org.freedesktop.Hal.LaptopPanel.GetBrightness() every five or ten seconds or so sounds like an awful idea, of course.

I’ve heard plans to use the XBACKLIGHT randr 1.2 property to do backlight setting, but I don’t think any drivers use this yet. Polling /sys is just as bad (why doesn’t sysfs or procfs support inotify, dammit!), and obviously isn’t portable anyway (not that HAL is particularly portable these days either).

Xubuntu upgrade: from Heron to Ibex

  • November 30, 2008
  • vincent

Usually I install Xubuntu afresh when a new release arrives. This time along, though, I felt like upgrading from Xubuntu 8.04 to Xubuntu 8.10.

The first thing to consider is that Xubuntu 8.04 is a “Long Term Support” release, meaning that it’ll receive security updates for a longer period of time than normal releases. Thus, people using this version won’t need to upgrade Xubuntu every six months when a new version is released. The consequence is that you will not be notified of a new normal release when it arrives.

In order to be able to start the upgrade process, you’ll need to start the Software Sources application from Applications->System. In that application, under the Updates tab, you can select which new distribution releases you want to be notified of at the bottom. By default, this is set to Long term support releases only, but to upgrade to Xubuntu 8.10 you’ll want to set this to Normal releases.



With that set, when you start the Update Manager (Applications->System), you will be notified that a new distribution release is available. To start the upgrade process, just click the Upgrade button on top.



This will then pop up a screen containing the release notes of the new release, which unfortunately are Ubuntu-specific.



After confirming that you want to upgrade, Xubuntu will download an upgrade tool. It will start preparing the upgrade and will update your software sources to make sure you will be downloading software for the newer version. No need to worry though: if you press Cancel, the original configuration will be restored and any other edits the tool might have made will be reverted.





When information has been gathered about the upgrade, a new confirmation window will appear providing an overview of what is going to be done and giving you another chance to back off if you got scared. It also advises you to close all open applications to prevent loss of data – wise words indeed.

Of course, it is always recommended to make a backup of important documents and settings before you upgrade.



Before the upgrade could continue, a window popped up informing me that the (proprietary) driver for my graphics card was no longer available in the new version, giving me another chance to abort the upgrade. I opted to continue and take the risk of losing my shiny desktop effects (due to needing to use the open source driver), but was relieved to find that they still worked after the upgrade – I did not even need to redo the steps to install Compiz in Xubuntu. That said, this does not mean I recommend you to ignore the warning – I have too little knowledge of graphics cards and their drivers to be giving sensible advise on that.



The upgrade tool will then start downloading the packages of the new version. This will take a while (essentially it’s downloading new versions of most of your applications in their entirety) – the final stage in which you will still have the option to cancel the upgrade. Isn’t that great? :)



With the packages downloaded, the tool will start installing them – from this point on there’s no going back!





During the installation of the new packages, you might get some questions about newer configuration files overwriting older ones (I got most of these at the end of this process, so you can make yourself some coffee while it’s installing the bulk of new packages ;) ). In most cases, you’ll probably want the new one unless you recognise the file and know that you need the alterations you made to that file. Going with the default options is often sensible as well.





When the new versions are installed, the upgrade tool will try to remove as much cruft as it can find.







Finally, the upgrade process is almost complete – all it needs you to do to finish it off is to restart your computer and cross your fingers that the upgrade went smoothly and your system is still usable.



As said, I had been warned that the driver for my graphics card was no longer available, but luckily the Hardware Drivers application (Applications->System) pointed out that another proprietary driver was available that allowed me to enable Compiz again.



All in all, the upgrade was a generally a pleasing experience to me, and I hope and expect you will feel the same.


Ubuntu from your flash drive – easier than ever before

  • November 7, 2008
  • vincent

As you have probably noticed, new versions have arrived of Ubuntu, Xubuntu and other derivatives. One of the most exciting new features has received far less publicity than it deserves – the ability to “install” it onto your USB flash drive with just a few clicks.

The advantages are obvious: just plug your flash drive into a computer and run your favourite operating system. What’s more, everything you do — installing applications, saving documents, editing preferences — will be saved to your flash drive and will be available to you every time you run it!

The best news is that it’s astoundingly easy: all it takes is a few clicks.

Of course, there are a few requirements. First, you can only run it on computers that support booting from a USB flash drive – this is the case for most computers nowadays. Secondly, you must have a CD or a CD image. The latter can be downloaded free of charge – I, obviously, downloaded Xubuntu. Third, you’ll need to install usb-creator, the new application that is readily available in version 8.10 but which you can also download and install on version 8.04 (with Windows and Qt versions planned). And, last but not least, you’ll obviously need to have a USB flash drive.

Once installed, you can find it in your menu as Create a USB startup disk (on Xubuntu it is located under Applications->System, in Ubuntu this would be System->Administration, IIRC).



The first thing you’ll need to do is to insert the flash drive you’re planning to use. Usb-creator will then detect the drive – if multiple flash drives are inserted, you can pick from a list which one you want to use, and if the drive isn’t formatted yet usb-creator will give you the option to do so (note that this will destroy all files on it!).

The next step is inserting the appropriate CD into your CD drive, or loading the CD image you downloaded before by clicking Other….



Finally, you’ll need to configure whether you want all your documents, settings and applications to be discarded on shutdown (i.e. act as a regular LiveCD) or if you want to save them to your flash drive (this is called persistency, or persistent mode). If you pick the latter, you’ll also be able to select how much space you want to reserve for this.

Do note that usb-creator will not overwrite existing files on the drive – thus, if you want to use your entire drive, you’ll first have to delete all existing files.

Now, with everything configured, click Make Startup Disk, and sit back and relax while usb-creator prepares your flash drive.



You can do something entirely different now, like reading the rest of this blog, viewing all my screenshots of usb-creator, whatever you like. Once usb-creator is finished, it will notify you that it’s done. All that’s left now is to boot your computer from your flash drive and have fun :)



Troubleshooting

If persistency does not work, you might need to edit the file text.cfg in the syslinux folder on your flash drive. Just replace the line default livewith the following lines, adding a new Start Xubuntu option to the boot screen the next time you boot. Note that you might want to replace occurences of “Xubuntu” with the name of the distro you’re using. This has been tested with Xubuntu 8.10;

default persistent
label persistent
menu label ^Start Xubuntu
kernel /casper/vmlinuz
append file=/cdrom/preseed/xubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash persistent
--


Xfce Commit Messages on IRC

  • October 30, 2008
  • Brian Tarricone

This is a little dumb, but kinda fun. A week or 2 ago I set up a CIA bot in #xfce-commits on Freenode. If you have nothing better to do with your life than watch Xfce commit messages scroll by, feel free to join and idle with the rest of us losers.

Xfce 4.6beta1 Released

  • October 15, 2008
  • Brian Tarricone

Hey all… we just released the 1st beta leading up to 4.6. Go check it out. Full list of changes here.

Xfconf – A New Configuration Storage System

  • October 6, 2008
  • Brian Tarricone

I suppose others have written in broad terms about Xfconf, Xfce 4.6’s new configuration storage/retrieval system, but I guess an in-depth explanation is overdue and is probably up to me.

First, some background.

Xfce has used a configuration system called MCS (Multi-Channel Settings) for some time now, since 4.0 was released near the end of 2003. It’s inflexible and very monolithic. Only a single application (xfce-mcs-manager) is allowed to actually modify settings; all other applications can only query values. That means that the GUI settings dialogs have to run in the xfce-mcs-manager process. The GUI dialogs are implemented in shared libraries that are linked into the xfce-mcs-manager process at runtime. To add more confusion as to its purpose, xfce-mcs-manager also acts as an XSETTINGS manager, automatically proxying the settings stored in a “special” channel.

I had a few loosely-defined goals when designing Xfconf.

  • Keep the familiar “channels” concept from MCS, but make the namespaces for settings storage inside channels hierarchical.

  • The configuration storage daemon should be able to run without a GUI environment, and the client library shouldn’t have GUI dependencies.

  • Get the XSETTINGS manager out of the configuration daemon.

  • Integrate “kiosk mode” functionality directly into the configuration storage mechanism.

  • Native support for arrays/structs in the configuration store.

  • Provide a client library that’s easy to use and exposes commonly-used functionality.

  • No client application is special: any app can read or write any setting.

There were probably others, but those seem to be the ones that stick out in my mind after the fact.

MCS used a protocol involving a special X window, X selections, and X window properties to pass settings around at runtime. Obviously this kind of thing isn’t suitable for a configuration system that can run without a GUI, or even on a non-X11 system. So, that was right out. Given momentum over the past couple years, D-Bus seemed to make the most sense as an IPC method. So, the D-Bus API for Xfconf was born. (Please note that I don’t consider this frozen until we release 4.6.0 final. I’ll do my best not to remove or change existing interfaces, though.)

The rest of the story might sound rather gconf-like, and I guess it probably is. There’s a settings daemon (xfconfd) and a client library (libxfconf). Apps use the client library to fetch settings from and store settings to xfconfd. The daemon stores the settings on disk in a format of its choosing and manages the D-Bus interface. D-Bus gives us a few nice things for free; for example, xfconfd starts via D-Bus activation, so there’s no need to include it in any startup scripts or have client applications specifically start it. D-Bus also ensures that two instances of xfconfd aren’t running, fighting over the config store (well, unless you start a separate session bus daemon).

As for settings themselves, you have a channel that holds an arbitrary number of hierarchical properties. Channel names are simple ASCII text strings, like “xfwm4” or “xfce4-desktop”. Property names look a bit like path names and are, as I said, hierarchical. You can use this to logically organise properties inside your application. Xfdesktop is a good example of this, prefixing menu-related preferences with “/desktop-menu/” and backdrop-related prefs with “/backdrop/”. Xfwm4 is a terrible example of this, with all preferences prefixed with “/general/” for no apparent reason.

Anyhow, we support a variety of different data types: basically all of those supported and marshalable by dbus-glib, plus special 16-bit signed and unsigned types (though those two are pretty hacky at the moment and I’d like to be able to do those in a better way). The client library, libxfconf, lets you set commonly-used data types directly, and also has a generic interface for setting the others.

One thing I really like about libxfconf is its incredibly flexible support for array properties. Any property can be set to an array of values rather than a single value. The values in the array need not even be of the same type. Libxfconf has native support for setting array types, and also can directly map C structs to and from array types, automatically.

A final bit of usefulness is in libxfconf’s bindings mechanism. Libxfconf can “bind” an Xfconf property to a GObject property in your application. If the GObject property changes, then libxfconf will automatically update the value in the Xfconf store. If the value in the Xfconf store changes, libxfconf will automatically update the GObject property. This can greatly simplify the Xfconf code in your application. In your settings dialog, you simply have a single line of code to – for example – connect a GtkCheckButton’s “toggled” property to a boolean Xfconf property. If the user toggles the checkbox, Xfconf gets updated automatically. If the setting gets changed outside the application somehow while the settings dialog is open, the dialog gets updated automatically too. You can also use this functionality on the other “end” of the equation, too: if you use GObjects in your application, and your settings map to GObject properties on those objects, you can bind the properties there, too, and not have to manually take action when the user sets a setting in the settings dialog. Unfortunately, libxfconf only supports setting scalar properties now (not arrays), except for the special case of the GdkColor struct. Hopefully this will change in a future release.

We also include an “xfconf-query” application in the xfconf package, written mostly by Stephan Arts, which is a simple command-line Xfconf client. As you might guess, you can use it to query the values of Xfconf properties from the command-line, or from scripts. However, despite the “query” part of its name, it can modify Xfconf properties as well.

In Xfce 4.4 and below, we had the “XfceKiosk” system, which would allow you to lock down a desktop install so certain settings can and can’t be changed by particular users. It worked decently well, but was sometimes confusing to configure, and the application had to do special things to support it. Xfconf integrates a “locking” system whereby the system administrator can install a normally-formatted Xfconf configuration file with directives that instruct xfconfd to consider some properties unmodifiable by the user (and allows the sysadmin to set defaults too). This takes the burden away from applications to support a particular locking framework, as it’s natively built into the configuration system. (Unfortunately, as of this writing, the locking system isn’t working properly. It’ll definitely be finished by 4.6.0 final.)

So, I guess that’s it. If you’d like to get started with Xfconf, a good place to look would be the API documentation (please note that the API will not be frozen until 4.6.0 final). Otherwise, feel free to ask questions on the xfce4-dev mailing list.

Xfce Mailwach Plugin 1.1.0 Released

  • September 15, 2008
  • Brian Tarricone

After a good two and a half years of being lazy, I’ve finally found some time to work on the Mailwatch plugin, and I have a new release ready too!

There’s lots of chewy goodness in this release. Here are some useful links:

As always, please report bugs over at the Xfce bug tracker.

Enjoy!