dcsimg

The Other Desktop: Running Xfce

One of Linux's greatest strengths is that it's easily customized. Although most distributions ship with a variety of standard tools for specific purposes (such as sendmail as a mail server or Vixie Cron to handle repeated jobs), alternative tools are readily available. You can rip out just about any component, either removing it entirely or replacing it with something else. Linux lets you remove or replace more components than most operating systems, allowing the savvy administrator to customize a Linux installation for specific purposes.

One of Linux’s greatest strengths is that it’s easily customized. Although most distributions ship with a variety of standard tools for specific purposes (such as sendmail as a mail server or Vixie Cron to handle repeated jobs), alternative tools are readily available. You can rip out just about any component, either removing it entirely or replacing it with something else. Linux lets you remove or replace more components than most operating systems, allowing the savvy administrator to customize a Linux installation for specific purposes.

One area that can be customized and that’s quite obvious to end-users is the desktop environment. Most Linux distributions use the K Desktop Environment (KDE) or the GNU Network Object Model Environment (GNOME) as the primary GUI. Others are available, though. At the minimal end of the scale, you can use a bare window manager, such as IceWM, Blackbox, or twm. This approach places a minimal load on system resources, but also provides a very bare-bones working environment. Another option is to use an alternative desktop environment, such as Xfce (http://www.xfce.org), XPde (http://www.xpde.com), or ROX (http://rox.sourceforge.net). Here, let’s investigate Xfce.

Why Use Xfce?

Most desktop Linux users run KDE or GNOME. Both environments offer a complete set of features and desktop utilities. So why consider anything else? Although Xfce isn’t for everybody, it does offer some unusual features and advantages over KDE and GNOME:

  • Small memory load. Xfce has a reputation as a slim desktop environment. This is still true today, but the difference is small, particularly compared to the amount of RAM in modern computers. In my own tests on a 64-bit Gentoo system, Xfce consumed about 28 MB of RAM when first started, compared to 30 MB for KDE and 41 MB for GNOME. If that 2-13 MB of RAM savings is important, using a window manager alone will save even more memory, but at the cost of reduced features. Xfce’s applets tend to consume less memory than those of its counterparts, so the memory savings of using Xfce can be greater than you might think from looking at the memory use when the environments are first launched.

  • Speed. Xfce is generally a speedy environment. Of course, using Xfce won’t improve the speed of sluggish programs such as OpenOffice.org, except insofar as its reduced memory load minimizes swapping. However, the Xfce applets and other components are often faster than their equivalents in KDE or GNOME.

  • Simplicity. Xfce is a simple desktop environment compared to GNOME or, especially, KDE. This simplicity can be a problem if Xfce lacks a feature you find important, but it can help reduce on-screen clutter, and it can make it easier to locate the features you need.

  • Configurability. Some other desktop environments can be difficult to configure in any but very simple ways (changing desktop themes, for instance). With Xfce, you can add or remove most elements, so even if the default feature doesn’t work the way you want, you may be able to substitute another program that does what you want.

  • Standards compliance. Xfce is designed to be compliant with Linux standards, including those defined at http://freedesktop.org. This feature certainly isn’t unique to Xfce (KDE and GNOME are the main focus of http://freedesktop.org, after all), but it does mean that using Xfce won’t place you too far out on the fringes in terms of interoperability with other programs.

Ultimately, the best way to decide whether Xfce is right for you is to try it. Over the past few years, the feature sets of GNOME, KDE, and Xfce have slowly converged, but they aren’t identical. You may find minor features, such as the exact window sizing and moving options in each environment’s window manager, to be more important determinants of which environment you like than the “big” features such as memory consumption.

Obtaining and Installing Xfce

Many distributions ship with Xfce, so you should check to see if it’s available in your distribution’s package set. Xfce is often installed as a set of packages, typically with names that begin with xfce or xfce4. (The current version of Xfce is 4.4.1.) Some distributions provide a simple “wrapper” package that installs most of the major Xfce packages; for instance, in Gentoo, you can install the most common Xfce packages by “emerging” the xfce4 package. GUI package tools, such as the Yum Extender (aka yumex; http://sourceforge.net/projects/yumex/) or Synaptic (http://www.nongnu.org/synaptic/) can help you locate and install Xfce using your package manager.

If your distribution lacks an official set of Xfce packages, you can download the software from its Web site, http://www.xfce.org. The site includes a Download link with pointers to binary packages for Debian, Mandriva, and OpenSUSE; a graphical binary installer for other distributions; and source code packages.

Launching Xfce

Most modern distributions automatically configure Xfce as a login option using the GDM or KDM GUI login manager when you install Xfce. Thus, launching Xfce becomes a matter of selecting it from the login manager’s menu. If you don’t see Xfce as an option, you should first try restarting your GDM or KDM session (by typing telinit 3 followed by telinit 5, or by typing /etc/init.d/xdm restart or a similar command at the comment line, depending on your distribution). This shuts down X and restarts it, so save any work and log out of your X session before doing this.

If you still don’t see Xfce as a login option, you may need to create an appropriate desktop file, such as the one shown in Listing One. (You may need to change the paths in the Exec and Icon lines to point to the correct locations.) Call this file Xfce.desktop and place it in the directory that houses your other desktop files — usually /etc/dm/Sessions, /etc/X11/Sessions, /etc/X11/gdm/Sessions, /usr/share/xsessions, /usr/X11/share/gnome/xsessions, /usr/share/apps/kdm/sessions, or /usr/local/share/kdm/sessions. If you can’t find your existing desktop files, try using your package manager or utilities such as find to locate the equivalent files for GNOME, KDE, or other environments that are accessible from your login manager.

Listing One: A sample desktop file for Xfce

[Desktop Entry]
Encoding=UTF-8
Name=Xfce
Comment=Run Xfce 4.4
Exec=/usr/local/bin/startxfce4
Icon=/usr/local/share/pixmaps/xfce4_xicon1.png
Type=Application

Alternatively, if you start X by typing startx at a text-mode login prompt, edit your X startup file (typically ~/.xinitrc). Comment out or remove any line that starts your current window manager or desktop environment and replace it with a line that reads exec startxfce4.

Configuring the Xfce Environment

Figure One shows the default Xfce desktop on a Gentoo system. (Other distributions may change some details, such as the background image.) Xfce’s basic elements should pose few surprises if you’re familiar with KDE or GNOME. The strips along the top and bottom edges of the screen are the panels, which provide access to programs and enable you to control the environment in various ways. The icons along the left edge of the screen provide quick access to the filesystem, including Xfce’s trash directory, your home directory, and the computer’s root filesystem.

Figure One: Xfce’s initial desktop display is simple but provides the basic elements most people expect

You want or need to make changes to your desktop environment, and of course this is possible with Xfce. You can adjust many features from the Settings Manager, shown in Figure Two. You can access this tool in several ways, such as right-clicking a bare section of desktop and selecting Settings& gt; Settings Manager from the resulting pop-up menu or by left-clicking the Xfce icon (the “X” with a superimposed mouse) in the bottom pane and selecting Settings& gt; Settings Manager from its menu. In either case, the individual Settings items are available from the initial Settings menu, as well. The Settings Manager is useful if you want to peruse all the available options.

Figure Two: You can adjust many Xfce and X options from the Settings Manager

Most of the items in the Settings Manager should be familiar to users of KDE, GNOME, or other GUI environments. You can set a background color or image, set keyboard repeat rates, set the number of workspaces, and so on. A few items deserve more explanation:

  • Orage. Orage is Xfce’s calendar program. You can set some key Orage options from the Orage Settings item.

  • Printing System. Xfce supports two printing systems: CUPS and BSD-LPR. Most modern Linux systems use CUPS, so you should check and, if appropriate, adjust this item. (This option only affects Xfce applications; most programs have their own means of interfacing with your printing system.)

  • Sessions and Startup. A few important options are hidden away in this item. In particular, on the Advanced tab, you’ll find options to start KDE and GNOME services when Xfce launches. Activating these features slows the login process, but speeds up the first launch of KDE or GNOME programs.

Take some time to peruse the options available among the Xfce Settings, particularly if Xfce is doing something in a way you don’t like.

You should also be aware that many Xfce tools have their own options controls, which you can adjust by right-clicking each tool’s on-screen icon. For instance, if you right-click in the on-screen clock and select Properties from the pop-up menu, you’ll be able to customize the appearance of the clock. You can move, delete, or add items to your panels by right-clicking, as well.

One particularly important type of customization relates to launching programs. The lower panel in Figure One includes launchers for a few specific applications (a terminal program, the Mousepad editor, the Thunar file manager, and a Web browser), and more are accessible from the Xfce icon on the left edge of the lower panel. You can add launchers for additional programs or turn an existing launcher into one that handles multiple programs.

To add a new launcher, right-click on the panel and select Add New Item from the pop-up menu. You can then pick Launcher from the dialog box to create a new launcher. To add items to an existing launcher, right-click on that specific launcher and select Properties. The resulting dialog box enables you to add, delete, reorder, and otherwise modify the applications accessed by a launcher. When you configure a launcher to handle multiple programs, the icon in the panel changes to include a small triangle. Click it to see a list of items. If you click on the main body of the icon, the first item is launched.

Xfce Tools and Applets

Xfce offers an array of small tools and applets that are accessible from its panels. Not all of these tools are available by default, but you can add them by customizing your panel, as just described. Some of the more major programs include:

  • Window Manager. At the core of every desktop environment is a window manager that provides the title bar and sizing controls for windows, including the decorative borders. Window managers also manage the root window– that is, the main screen. Xfce’s window manager is typical of modern window managers; it provides multiple workspaces, can roll up (“shade”) a window into its title bar, and so on.

  • Thunar. This program is Xfce’s file manager. You can use it to manipulate files, launch programs associated with particular file types, and so on. Compared to Konqueror (KDE’s combined file manager and Web browser) or even Nautilus (GNOME’s file manager), Thunar is a simple tool. If you don’t need all the features of Konqueror or Nautilus, though, Thunar may be more than adequate.

  • Mousepad. This application is Xfce’s default file editor. It’s a very simple GUI file editor, which is suitable for basic file editing but is less useful for complex tasks.

  • Xfburn. This program is a simple CD-R creation tool, similar to K3B or X-CD-Roast. (This applet is inexplicably missing from at least some distributions’ Xfce packages, including Gentoo’s.)

  • Xfmedia. This application is a media player based on Xine (http://xinehq.de). You can use it to play a wide variety of multimedia files.

Some Xfce applets don’t ship with the desktop environment by default; they come in separate add-on packages. Check http://goodies.xfce.org/projects/panel-plug-ins/start for a list of available plug-in packages. The weather tool displays an icon for the current weather conditions and brings up detailed conditions and a five-day forecast with a single mouse click. Other plug-ins may be appealing to you, such as a wireless LAN status indicator, a clipboard manager, and a battery power monitor. Check the list to learn what’s available.

Of course, these tools and applets won’t fulfill all your needs. You can configure Xfce to launch and otherwise work with other applications — even competing ones or programs that are part of other desktop environments. A default Xfce installation, in fact, is likely to provide links to such programs via the main Xfce panel item. The test system could access programs such as Abi Word (associated with GNOME), KWord (associated with KDE), and OpenOffice.org (independent) via the main Xfce panel item. You can also adjust the default applications that Xfce uses, in two ways:

  1. You can set your preferred Web browser, mail reader, and terminal program via the Preferred Applications Settings item.

  2. You can set the preferred application that Thunar uses to open a document of a particular type by right-clicking on such a document, selecting Properties, and picking the application via the Open With item. When you save your change, it applies to all items with that filename extension.

Concluding Thoughts

In use, Xfce’s main strengths are its speed and simplicity, at least compared to KDE or GNOME. If you prefer something simpler than these tools but with more features than a bare window manager, Xfce is worth investigating. Xfce’s strengths can be particularly important on older systems with less memory — but if memory is very tight, a bare window manager may be an even better choice.

Comments on "The Other Desktop: Running Xfce"

pravatpc

Hai Roderick,

It’s not about “Xfce’s 28 MB of RAM vs 30 MB for KDE Vs 41 MB for GNOME”.

We run it on Production Servers mainly because at a larger scale, when you have 50+ user using a XWindow over remote display, XFCE is too smooth and saves hell lot of memory…

It might not be EyeCandy for common desktop dudes but our Developers love it…

Reply
kz73

Xfce is light because it needs less CPU power. My Duron 800 is too slow for GNOME but Xfce runs great! Even beter then Windowmaker.

Reply
registerhater

Is it really that little? I’m running XFCE 4.4 right now and if feels a lot more memory intensive than ~30 MB.

Reply
dansomnea

Hello,
I’ve appreciated this white paper.
I send you this hyperlink:
http://www.google.com/search?q=Running+XFce+Linux%27s+greatest+strengths+is+that+it%27s+easily+customized&rls=com.microsoft:en-us:IE-SearchBox&ie=UTF-8&oe=UTF-8&sourceid=ie7&rlz=1I7IRFA

As you can see, webinars can easily enter this Linux Magazine Connection’s DB of white papers.
Mr Martin Streicher, the former Linux Magazine Connection’s editor-in-chief, gave me some login parameters to read a white paper.
Sincerely yours,
prof dr ing Dan Gheorghe Somnea,
Bucharest ROMANIA
http://dansomnea.tripod.com/whoami.html

Reply
matador

I started using xfce on an old gentoo 2005.0 mainly because compiling KDE for five days wasn’t an option. I really liked xfce and as Pravat Santra said, there are particular uses where a solution can be better than others, but today with PC’s running 2-4Gb of RAM, I couldn’t care less about memory or CPU usage.
Anyway, just today I’ve read this:
http://ktown.kde.org/~seli/memory/desktop_benchmark.html
It’s a benchmark about memory usage of the different Desktop Managers

Reply
nebbit

Is this low memory footprint the ideal solution for netbook?
Has anyone ported Xfce to the netbook screen resolution?
I think this would be the ideal fit.

Reply
masinick

I did not follow the project change list for XFCE 4.6 and 4.6.1, but I can tell you that the current XFCE 4.6.1 runs smoother and faster than any XFCE release since the changes to Gtk2+ that were made in the V4.0 time frame. XFCE 3.8 was lighter and faster, but nowhere near as nice in the appearance of the window manager widgets themselves. XFCE 4 is much better in that regard, but consumes more resources than the old XFCE, but still fewer than KDE and GNOME, but with fewer integrated actions.

XFCE is great for a moderate desktop. For those who want a REALLY light desktop at the desktop entry level, take a look at LXDE. It uses lighter components and is one of the fastest, if not THE fastest desktop environments currently available. If LXDE isn’t light enough, you may need something ultra light, such as IceWM, Fluxbox, Openbox (without LXDE), or JWM.

XFCE strikes a nice balance, and is great for all but the oldest systems, and it provides plenty of functionality. I am using it right now in fact.

Reply
argon99

I know this is about xfce but I have recently been playing with enlightenment E17. I haven’t taken the time to get any numbers for memory or cpu usage but it seems very responsive. And it looks very nice. I would very much like to see how it stacks up with the other main window manager/desktops. E17 is still listed as unstable, and I have found areas that need improvement, but it is usable enough to test. For me it had a problem when vlc went full screen. But I’m sure that is a small problem that will be fixed. For me it seems to have a small foot print and the eye candy of KDE. Well worth a look. But there are some issues that I have not resolved. Some distros running E17 seem to be different the other distros. I suspect this is the problems introduced by the package manager ( I haven’t tried to compile from source yet).

Reply

Thanks for the good writeup. It in reality was a enjoyment account it. Glance complicated to more introduced agreeable from you! By the way, how can we be in contact?

Reply

Hi there this is somewhat of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding experience so I wanted to get guidance from someone with experience. Any help would be enormously appreciated!

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>