From ArchWiki
Revision as of 21:36, 15 June 2010 by Piie (Talk | contribs)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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 relatively 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 arguably the best out of any WM/DE.
  • It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."
  • It comes with a built-in compositor which allows for true transparency, among other cool things.

Why not use Xfce?

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

  • 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.

How to Install Xfce

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

Installing Xfce

To install the base Xfce system, run:

# pacman -S xfce4

If you want extras, like panel plugins, run this:

# pacman -S xfce4-goodies

When asked by pacman if you wish to install the whole group, you can select 'no' to install only the packages you wish.

Note: xfce4-xfapplet-plugin (a plugin that allows the use of GNOME applets in the Xfce4 panel) is part of the xfce4-goodies group and depends on gnome-panel, which in turn depends on gnome-desktop. You may wish to take this into consideration before installing, since it represents a significant number of extra dependencies.

In order to get the xfce4-mixer to work with alsa, you need to install gstreamer0.10-base-plugins. (See below for help with OSS.)

# pacman -S gstreamer0.10-base-plugins

Since the 4.6.0 release Xfce doesn't come with its own icon theme anymore. It now depends on tango-icon-theme. As an alternative you may want to install the gnome-icon-theme package.

Installing and configuring the Daemons

If you have xorg 1.7 with input hotplugging you must get hal working before you start Xfce or end up with no input devices. Xorg 1.8 doesn't use hal anymore but other programs still do, so use hal with xorg 1.8 aswell unless stated otherwise... "better safe then sorry" as they say.

# /etc/rc.d/hal start

Add hal to the DAEMONS array in rc.conf so you don't have to start is manually every time. Do not background it if you boot straight to X. hal relies upon, and will automatically start, dbus. If you are experiencing issues you may add dbus to the DAEMONS line in rc.conf as well. When adding dbus, ensure it directly precedes hal. Example:

DAEMONS=(syslog-ng dbus hal @network @netfs @crond @cpufreq @alsa)

Install gamin (the successor of fam). It is configured to automatically run in the background by default, do not add it to rc.conf.

# pacman -S gamin

Running Xfce

Automatically at boot time

See Display Manager to install and configure a Display Manager.


If you have not created a ~/.xinitrc yet, do so with:

$ cp /etc/skel/.xinitrc ~/.xinitrc

and add the following line:

exec ck-launch-session startxfce4


# ~/.xinitrc
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec ck-launch-session startxfce4

ck-launch-session starts a clean consolekit session needed by Xfce for power management, automounting, shutting down/rebooting etc. Consolekit/policykit capable display managers such as gdm do this for you automatically.

Shutting down and rebooting from withing Xfce
  • Make sure that dbus and hal are enabled in the DAEMONS array in /etc/rc.conf.
  • Make sure that you are using exec ck-launch-session startxfce4 in ~/.xinitrc or a consolekit/policykit capable display manager (e.g. gdm)

Then add your normal user to the shutdown group:

# gpasswd -a USER power

This group is only used by HAL, so you still need root privileges for shutting down the system via command line (halt/poweroff/shutdown).

see http://bbs.archlinux.org/viewtopic.php?id=59954 for more details.


Commands for the settings manager

There is no official documentation for the commands executed. One must look at .desktop files /usr/share/applications/ folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:

xfce-setting-show backdrop
xfce-setting-show display
xfce-setting-show keyboard
xfce-setting-show sound
xfce-setting-show mouse
xfce-setting-show session
xfce-setting-show splash
xfce-setting-show ui
xfce-setting-show xfwm4
xfce-setting-show wmtweaks
xfce-setting-show workspaces
xfce-setting-show printing_system
xfce4-panel -c

To review all the available setting manager commands run the following in a terminal:

$ grep xfce-setting-show /usr/share/applications/xfce*settings*

A drop down console like in quake

# pacman -S tilda

will install tilda, a drop down console, similar to yakuake. A more lightweight alternative would be stjerm which can be found in the AUR.

To configure tilda, type

# tilda -C

which opens a configuration window in X.


Another functional alternative is guake, which is available in the community repo:

# pacman -S guake

How to enable the compositor in Xfce 4.6

Xfce 4.6 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the advanced desktop settings menu and works on the fly. No additional settings are needed in your /etc/xorg.conf.

Why doesn't my desktop refresh?

Xfce 4.6 uses FAM (File Alteration Monitor) or gamin (FAM's successor) to get notification when a file or directory changes. If you decide to use FAM, don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf. This step is not necessary for gamin.

NOTE: After recent updates, FAM has caused issues opening some mounts, such as sshfs, that gamin does not have an issue with.

Use a transparent background for desktop icon titles

To change the default white background of desktop icon titles to something more suitable, edit the .gtkrc-2.0 file in your home directory (or create the file if needed) and add the following:

style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 10
base[NORMAL] = "#000000"
base[SELECTED] = "#71B9FF"
base[ACTIVE] = "#71FFAD"
fg[NORMAL] = "#ffffff"
fg[SELECTED] = "#71B9FF"
fg[ACTIVE] = "#71FFAD" }
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

How to customize xfce panel background

The same, edit ~/.gtkrc-2.0. ( foo.bar is path to your image ) Note that you must place the image in the same directory as the configuration, which is ~/. You can not specify the path to the image, or it won't work.

 style "panel-background" {
   bg_pixmap[NORMAL]        = "foo.bar"
   bg_pixmap[PRELIGHT]      = "foo.bar"
   bg_pixmap[ACTIVE]        = "foo.bar"
   bg_pixmap[SELECTED]      = "foo.bar"
   bg_pixmap[INSENSITIVE]   = "foo.bar"
 widget_class "*Panel*" style "panel-background"

How to customize starting xfce

This includes getting necessary environment variables into the GUI runtime.

  • Copy the file /etc/xdg/xfce4/xinitrc to ~/.config/xfce4/
  • Edit this file. For example, you can add something like this somehwere in the middle:
  • source $HOME/.bashrc
  • # start rxvt-unicode server
  • urxvtd -q -o -f

How to add themes to XFCE

1. Go to xfce-look.org and click "Themes" in the left navbar. Look around for a theme you want and click "Download".

2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.

3. Move the extracted folder to /usr/share/themes (for all users) or ~/.themes (for just you). Inside /usr/share/themes/abc, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.

4. GTK theme is available here:

Menu --> Settings --> Appearance

You select your xfwm theme in:

Menu --> Settings --> Window Manager


If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full

You could also try using a custom DPI setting

Replacements for the default 'menu' panel applet

The "Ubuntu System Panel" (Gnome) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows Gnome applets to be used in Xfce.

It is available in the AUR

Switch to old desktop right click menu without Thunar things

xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0

How to remove menu entries from the System menu

With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:

  1. Go to the /usr/share/applications folder. Type in the terminal (Xfce menu > System > Terminal):
    $ cd /usr/share/applications
  2. This folder should be full of .desktop files. To see how many there are, type:
    $ ls
    Say the one you want to edit is Firefox. Type in the terminal:
    $ sudo mousepad firefox.desktop
  3. In the bottom of the file, paste the following:
  4. Save and exit. Now Firefox won’t show up in the System menu. You can do this with any program.

But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via wine)?

I've found some shortcuts that show in the category “Other” in this directory: ~/.local/share/applications/wine/.

How do I get xfce4-mixer and OSS4 to work together?

Xfce 4.6 uses gstreamer as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer.

 pacman -S xfce4-mixer gstreamer0.10-base-plugins

(Optional) Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins

 pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins

login and logout, or just remove the mixer plugin and add it again. If it doesn't work at all, then you have to compile gstreamer0.10-good-plugins yourself. and can

Download the PKGBUILD and other files needed from ABS or here, edit the PKGBUILD, add --enable-oss.

 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-oss\
   --disable-static --enable-experimental \
   --enable-ladspa \
   --with-package-name="GStreamer Good Plugins (Arch Linux)" \
   --with-package-origin="http://www.archlinux.org/" || return 1

and then run makepkg -i.

 makepkg -i

Still not working? Try tis package in AUR gstreamer0.10-good-plugins-ossv4, modify the pkgver to the newest in the PKGBUILD, and it should work.

Other LINKS: OSS forum

How to take screenshots (print-screen key)

A simple way is to use a command-line screenshot utility:

# pacman -S scrot


Xfce-menu --> Settings --> Keyboard >>> Application Shortcuts.

Add the "scrot" command to use the "PrintScreen" key.

All screenshots will be placed in your home folder with unique names like



There is also an a screenshot plugin for the Xfce panel that is available in extra:

# pacman -S xfce4-screenshooter

Change volume with keyboard volume buttons

Go to Settings > Keyboard. Click the "Application Shortcuts" tab and add click the "Add" button. Add the following:


amixer set Master 5+

for the volume up button

amixer set Master 5-

for the volume down button

amixer set Master toggle

for the mute/unmute button.


Use one of these scripts: [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS ]

If using ossvol (recommended), add:

ossvol -i 1

for the volume up button

ossvol -d 1

for the volume down button

ossvol -t

for the mute/unmute button

Change mount options

A common problem when automounting usb sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved changing the default iocharset to utf8, which is easily done adding a line to /etc/xdg/xfce4/mount.rc:

# FreeBSD specific option

Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.

It is also recommendable to mount vfat devices with the flush option, so that when copying to usb sticks data flushes more often, thus making thunar's progress bar to stays up until things are on the disk.



Keyboard shortcuts aren't working

This is usually the case when the settings helper is not working. To start it execute:


Now it should be working fine.

Related Articles

External Resources