From Gentoo Wiki
Jump to: navigation, search
Other languages:

To quote xfce.org, Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and low on system resources, while still being visually appealing and user friendly.


Avoiding unnecessary dependencies

Avoiding optional GNOME support and packages will keep the system more lean and congruous.

Ensure that the system is using the basic "desktop" profile:

root #eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/13.0 *
  [2]   default/linux/amd64/13.0/selinux
  [3]   default/linux/amd64/13.0/desktop
  [4]   default/linux/amd64/13.0/desktop/gnome
  [5]   default/linux/amd64/13.0/desktop/gnome/systemd
  [6]   default/linux/amd64/13.0/desktop/kde
  [7]   default/linux/amd64/13.0/desktop/kde/systemd
  [8]   default/linux/amd64/13.0/developer
  [9]   default/linux/amd64/13.0/no-multilib
  [10]  default/linux/amd64/13.0/systemd
  [11]  default/linux/amd64/13.0/x32
  [12]  hardened/linux/amd64
  [13]  hardened/linux/amd64/selinux
  [14]  hardened/linux/amd64/no-multilib
  [15]  hardened/linux/amd64/no-multilib/selinux
  [16]  hardened/linux/amd64/x32
  [17]  hardened/linux/musl/amd64
  [18]  default/linux/uclibc/amd64
  [19]  hardened/linux/uclibc/amd64

Use one that ends with /desktop (and not /gnome or /kde):

root #eselect profile set 3

app-text/poppler and dev-util/cmake listen to the qt4 USE flag. Disable it so that these packages do not pull in the huge Qt4 package set:

FILE /etc/portage/package.use/xfceDo not set qt4 USE flag for poppler and cmake
app-text/poppler -qt4
dev-util/cmake -qt4

Of course, -qt4 can also be set globally in /etc/portage/make.conf.

gnome-base/gvfs has an http USE flag which draws in many GNOME deps that may be unnecessary:

FILE /etc/portage/package.use/xfceDo not set the http USE flag for gvfs
gnome-base/gvfs -http


In /etc/portage/make.conf, add and customize the XFCE_PLUGINS variable:

FILE /etc/portage/make.confSetting XFCE_PLUGINS
XFCE_PLUGINS="brightness clock trash"

The above options may change; the current list is available inside ${PORTDIR}/profiles/desc/xfce_plugins.desc.

Software installation

Install the complete Xfce desktop. Without explicitly including xfce-extra/xfce4-notifyd in the emerge command, virtual/notification-daemon will draw in GNOME's x11-misc/notification-daemon instead. So install it together with xfce-base/xfce4-meta and later deselect it so it is not included in the world file anymore:

root #emerge --ask xfce-base/xfce4-meta xfce-extra/xfce4-notifyd
root #emerge --deselect=y xfce4-notifyd

Of course, it is also possible to select only needed packages:

root #emerge --ask xfwm4 xfce4-panel


To start Xfce it is possible to use a display manager, startx, or startxfce4.

Display manager

Please refer to the Display_manager article to select and configure a display manager.

Most display managers use *.desktop files to configure available sessions. An example desktop file is shown next:

FILE xfce4.desktopXfce4 desktop file for display managers
[Desktop Entry]
Comment=Use this session to run Xfce 4 as desktop environment

The desktop file can be placed in the right location for the display manager.

Using startx

When using startx, create a ~/.xinitrc file with the following contents:

FILE ~/.xinitrcStarting xfce4 when invoking startx
exec startxfce4

Using startxfce4

To launch the Xfce4 desktop, just type in startxfce4.

user $startxfce4

Advanced Configuration

Xfce is a desktop environment and as such can be tuned and tailored to the needs of (almost) every user. In this section, a number of popular (or more challenging) aspects are covered.

Volume keys


Install xfce-extra/xfce4-volumed to manage the volume keys:

root #emerge --ask xfce4-volumed

When using pulseaudio with xfce4, use xfce-extra/xfce4-volumed-pulse:

root #emerge --ask xfce4-volumed-pulse

Keyboard shortcuts

Run xfce4-keyboard-settings to bind the following keys:

  • volume up button: amixer set Master 5%+
  • volume down button: amixer set Master 5%-
  • mute button: amixer set Master toggle

Consistent GTK+ 3 themes

Native Xfce theme engine

Xfce's own theme engine, x11-themes/gtk-engines-xfce, was recently updated to version 3.0, which implements native support for GTK+ 3 with no further configuration.

Assuming that the gtk3 USE flag is set, the GTK+ 3 version (revision 300 or higher) should be pulled in by default if xfce-base/xfce4-meta or x11-themes/gtk-engines-xfce were installed with a --deep world upgrade.

If not, simply do:

root #emerge --ask gtk-engines-xfce

This should pull in the right version of x11-themes/gtk-engines-xfce through the use of a specific SLOT.

After emerging the GTK+ 3 version of x11-themes/gtk-engines-xfce, applications using GTK+ 3 should now blend nicely with applications using GTK+ 2 when one of the native Xfce themes is used.

Greybird theme

Another option is to use the Greybird theme, which has support for GTK+ 2, GTK+ 3, xfwm4, emerald, & metacity:

root #emerge --ask x11-themes/greybird

Go to Xfce menu -> Settings -> Appearance. Or run xfce4-appearance-settings. Select "Greybird" from the "Style" list.

Now GTK+ 2 and GTK+ 3 applications should have a consistent look.

Other themes

Other themes available in Portage that are compatible with XFCE can be emerged with the following list:

root #emerge --ask x11-themes/clearlooks-phenix x11-themes/gnome-themes-standard x11-themes/gtk-engines-aurora x11-themes/light-themes x11-themes/murrine-themes x11-themes/nimbus x11-themes/oxygen-molecule x11-themes/redhat-artwork x11-themes/shiki-colors x11-themes/tactile3 x11-themes/zukini

Additional applications

There are a number of additional applications which are either part of Xfce or support this desktop environment nicely.

Description Package
A popular terminal emulator for Xfce x11-terms/xfce4-terminal
Application finder xfce-base/xfce4-appfinder
Volume control xfce-extra/xfce4-mixer
Text editor app-editors/mousepad
Removable media and drives manager xfce-extra/thunar-volman
Previewer for files from Thunar xfce-extra/tumbler
CD burning application app-cdr/xfburn
Plugin for Thunar for work with archives, uses app-arch/file-roller xfce-extra/thunar-archive-plugin
Display battery percentage, time remaining, power source (AC or battery), fan status, warnings, and can even be configured to execute commands at certain power levels. This feature can be used to put the laptop into hibernate mode when the battery is almost exhausted. xfce-extra/xfce4-battery-plugin
A small command line embedded into the panel. It's quicker than opening up another terminal to run a command. xfce-extra/xfce4-verve-plugin
A handy method of mounting devices listed in /etc/fstab just by clicking with the mouse. xfce-extra/xfce4-mount-plugin
Monitor hardware sensors, such as CPU temperature, fan RPM, hard drive temp, motherboard voltage, and more. xfce-extra/xfce4-sensors-plugin
Several window manager themes x11-themes/xfwm4-themes
Enables Xfce4 menu editing x11-misc/alacarte
Lightweight quake style terminal emulator. x11-terms/tilda
A simple, handy calendar app-office/orage
An application to monitor and manage power usage. This is especially important for laptops! The power manager allows to adjust screen brightness, choose maximum performance or battery-saving modes, and setup hibernate, suspend, and shutdown actions when the lid is shut or buttons are pressed. Set xfce4-power-manager to warn when the battery reaches certain levels, or even turn off the machine. The application comes with a couple of helpful panel plugins to display battery/charging status, and a brightness control. xfce-extra/xfce4-power-manager

See also