From ArchWiki
Revision as of 11:12, 1 February 2007 by Xabbott (talk | contribs) (added related articles section, one link)
Jump to navigation Jump to search

What is Xfce?

Xfce is a Desktop Environment, like GNOME or KDE. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.

Why use Xfce?

Here is a (subjective) list of reasons to use Xfce:

  • It's fast, faster than the other major DEs.
  • It's stable. In the long time Xfce-4 has been out, only a small handful of bugs has been discovered, despite it having a rather large following.
  • It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.
  • It works great with multiple monitors. Xfce's Xinerama support is the best out of any WM/DE, IMO.
  • It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."

Why not use Xfce4?

Here is a (subjective) list of reasons not to use Xfce:

  • Many find the file manager to be sub-par. It is not nearly as complete as Nautilus or Konqueror, though it is fast.
  • Doesn't contain all the features and integration of the major DEs.
  • Slower development cycle.
  • Because it's based on the CDE design, the layout may not be as familiar.

Xfce4 vs Xfce3

The Arch repos contain both Xfce-3 and Xfce-4. Xfce-4 is a complete rewrite, and is much better. There isn't much of reason to use Xfce-3 (it's not being developed anymore), but it's still in the repos because it works, and it doesn't conflict with Xfce-4 (separate code bases). This tutorial will deal with Xfce-4.

How to Install Xfce4

The Xfce source and documentation are available at http://xfce.org. But since you're using ArchLinux, you can grab Xfce from Pacman.

Xfce is modular. That means there is no need for you to run every part, you can pick and choose. Because of this, Xfce has a bunch of Arch packages.

To install the base Xfce4 system, run:

# pacman -S xfce4

If you want extras, like Panel plugins (you probably do), run this:

# pacman -S xfce4-goodies

Note that after installing Xfce, you will want to log your user out so that paths update (as Xfce is installed to /opt).

Running Xfce4

There are two ways to run Xfce4. One is the "automatic" method. To start Xfce from the console, you can simply run:

# startxfce4

Note: startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.

To customize the Xfce startup using this method, you'll copy /opt/xfce4/etc/xdm/xfce4/xinitrc (/opt/xfce4/etc/xdg/xfce4/xinitrc instead for me using Noodle release) to $HOME/.xfce4, and edit that file To add programs to the startup up using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.

If you want more control over what starts and your initial settings, you can add these items to your $HOME/.xinitrc (leaving out and adding what you want):

xfwm4 --daemon
xfdesktop &
exec xfce4-panel


# exec xfce4-session

How To Use Xfce With DM's

As of Xfce 4.2.0, the Arch packages add the proper session files for Xfce. They are contained in the xfce-utils package, which should be installed with a base installation. Simply Enable a DM.

How to shutdown and reboot from Xfce

  • Install sudo:
# pacman -S sudo
  • Add the following line at the end of /etc/sudoers file with visudo command:
# visudo
user ALL=(root) NOPASSWD: /opt/xfce4/libexec/xfsm-shutdown-helper

where 'user' is the name of the user you want to allow to shutdown and reboot pc from Xfce.

Alternatively you can create shutdown group and allow all its members to shutdown:

%shutdown ALL=(root) NOPASSWD: /opt/xfce4/libexec/xfsm-shutdown-helper
# groupadd shutdown
# gpasswd -a user shutdown

where 'user' is name of the user.

To allow all users to be able to shutdown system add this to /etc/sudoers:

%users hostname=NOPASSWD:/opt/xfce4/libexec/xfsm-shutdown-helper

Where hostname is the name of current machine.

Related Articles

Build order for XFCE

External Resources