Xfce is a lightweight desktop environment built to be fast, good looking, and user friendly.
Selecting a profile
Read relevant documentation before performing any profile changes.
Using the basic desktop profile will provide a good set of defaults for Xfce. Other profiles can be used, but this gives a good balance between dependencies and usability, all else aside. To select the desktop profile:
eselect profile set default/linux/amd64/17.1/desktop
Avoiding unnecessary dependencies
qt5 USE flag by default, and so will pull in Qt dependencies that may not be needed for Xfce. One way to avoid this is to disable this USE flag for poppler:
-qt5 can also added to /etc/portage/make.conf, to unset the flag globally, if desired.
This is an optional step to installin place of . Skip this section if the choice of notification daemon is unimportant.
Emergingwill pull in the dependency. This virtual dependency is designed to insure that Xfce will be provided with a notification-daemon, whatever suitable software the user chooses to fulfill this role.
By default,will satisfy this dependency by drawing in GNOME's package. Xfce users may prefer to use , if a notification-daemon has not already been installed.
By installing xfce4-notifyd, and pull in no other packages. Use the
--oneshot option to avoid adding xfce4-notifyd to the world file:
emerge --ask --oneshot xfce-extra/xfce4-notifyd
Now proceed with the installation.
USE flags for xfce-base/xfce4-meta The Xfce Desktop Environment (meta package)
|Add support for calendars (not using mcal!)
|Add support for CD writer hardware
|Install the app-editors/mousepad text editor.
|Install the media-gfx/ristretto image viewer.
|Install the media-video/parole media player.
|Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)
|Install the media-sound/xfmpc MPD client.
|Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
|Install the x11-misc/gigolo frontend to manage remote filesystem connections.
|Install the dev-util/catfish search tool frontend.
|Add support for SVG (Scalable Vector Graphics)
|Enable power management support
Emergefor a default set of Xfce packages, to get a reasonably complete desktop environment:
emerge --ask xfce-base/xfce4-meta
The package will provide the following user-facing applications, plus some libraries and system software:
|Terminal emulator that integrates well with Xfce, "friendlier" than the standard xterm program.
|Desktop panel with application launchers, panel menus, a workspace switcher, and more.
|Configuration system for the Xfce desktop environment, providing configuration dialogs and tools.
|Thunar is Xfce's file manager.
|Manages removable media and drives.
|File previewer for Thunar.
|An application to monitor and manage power usage (especially important for laptops). Choose maximum-performance or battery-saving modes. Adjust screen brightness and setup hibernate, suspend, and shutdown actions (i.e., when the lid is shut or buttons are pressed). Can warn when the battery reaches certain levels, or even turn off the machine. Includes panel plugins to display battery/charging status, and control brightness.
|Volume control for the panel. pulseaudio.may be an option for systems without
To see everything that is installed by packages.gentoo.org., see the dependency tab for that package on
It is not strictly necessary to use, Xfce can be "custom built" by installing just the desired components, but be aware that this requires some knowledge of what is needed.
There are a number of additional applications that are part of the Xfce project and are of note:
|CD burning application.
|Lightweight text editor.
|Several window-manager themes.
|Plugin for Thunar to work with archives; uses.
|Displays battery percentage, time remaining, power source (AC or battery), fan status, warnings, and can even be configured to execute commands at certain power levels, which can be used to put the laptop into hibernate mode when the battery is almost exhausted.
|One-click mounting of devices listed in /etc/fstab.
|Monitor hardware sensors, such as CPU temperature, fan RPM, hard drive temp, motherboard voltage, and more.
|A small command line embedded into the panel; quicker than opening up another terminal to run a command.
This is just a partial selection of packages available in the Gentoo repository, see xfce-extra , or use eix (eix --category xfce-extra), to see packages from the xfce-extra category. See also https://www.xfce.org/projects/ for more information.
The following applications work well in Xfce to round out a basic desktop environment:
|GNOME's menu editor works fine in Xfce.
|Lightweight quake-style terminal emulator.
Xfce can either be run from a terminal after login, launched automatically after login, or be started by a graphical display manager that will greet the user and ask for login details.
Starting Xfce without a display manager
startx and startxfce4 are two of the readily available options for starting Xfce without using a display manager.
When using startx, create an ~/.xinitrc file with the following contents:
If experiencing authorization or permissions issues, see the troubleshooting section.
To launch the Xfce4 desktop, simply type startxfce4 at the command-line and press enter:
It is possible to use a display manager to start Xfce. Please refer to the display manager article to configure a display manager.
Most display managers use .desktop files to configure available sessions. The following is an example desktop file that could be used to launch Xfce via a display manager:
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.
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.
Installto manage the volume keys:
emerge --ask xfce-extra/xfce4-volumed-pulse
pulseaudio.may be an option for systems not using
Alternatively, custom keys can be bound to amixer by running xfce4-keyboard-settings:
- volume up button: amixer set Master 5%+
- volume down button: amixer set Master 5%-
- mute button: amixer set Master toggle
Consistent GTK 3 themes
One option is to use the Greybird theme, which has support for GTK 2, GTK 3, xfwm4, emerald, and metacity:
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.
GTK client side decorations
XFCE by default disables GTK client side decorations. If one wishes to enable them, they can set GTK_CSD=1 environment variable. Apps like Firefox use client side decorations to hide their own title bar.
Other themes available in Portage that are compatible with XFCE can be emerged with the following list:
emerge --ask x11-themes/clearlooks-phenix x11-themes/gnome-themes-standard x11-themes/light-themes x11-themes/murrine-themes x11-themes/shiki-colors x11-themes/tactile3 x11-themes/zukini
Enable vertical window snapping
Most modern desktop environments have vertical window snapping enabled by default. This is also possible in Xfce, but not by default. To enable, navigate to: Settings → Window manager → Advanced tab.
- Make sure the "Snap windows to screen border" checkbox has been checked.
- Make sure the checkboxes under "Wrap workspaces when reaching the screen edge" have been unchecked. These interfere with vertical window snapping.
Once the checkboxes are set it should be now possible to drag a window to the right or left side of the screen, which should cause the window to resize to 50% of the screen width.
Keyboard shortcuts can be set in order to do this via the typical Super+← or Super+→ behavior. Navigate to Settings → Window manager → Keyboard tab.
Set the "Tile window to the left" and "Tile window to the right" actions with the Super+← and Super+→ key combinations respectively.
Audio mixer complains about missing pavucontrol binary
Clicking the speaker (audio) icon in the panel and then selecting Audio mixer... results in a message saying "pavucontrol binary not found".
The solution is to install:
emerge --ask media-sound/pavucontrol
Xfce4-screensaver unable to unlock
Xfce-screensaver uses gnome-keyring by default to authenticate. By applying the installation method above, gnome-keyring will not be pulled and pam will be unable to service the default configuration installed in /etc/pam.d/xfce4-screensaver. Either pull gnome-keyring, otherwise the file should be modified to allow system-auth to be used on passwords:
auth include system-auth
password include system-auth
Authorization or permissions issues
When experiencing authorization or permissions issues within xfce4 in an OpenRC profile (symptoms include being unable to open power manager and unable to suspend/hibernate) make sure that properly configured, and that the
elogind USE flag is globally enabled.
If launching with startx, replace the appropriate line in ~/.xinitrc with the following:
exec dbus-launch --exit-with-session xfce4-session
Dual-monitors get mirrored after monitor suspend
There are (at least) three ways to solve this issue. First is to save the display settings as the default monitor layout profile, then enable that profile as "new monitors connect". There's also the option to show a dialog whenever new monitors are detected, which will default to the profile instead of mirroring, when one is available. Navigate to Settings -> Display -> Advanced to find these options. Remember to configure the display settings before saving the first profile.
2nd way is to kill xfsettingsd after logging to the Xfce session. However this will also make some functionality unavailable, such as global hotkeys. A custom script can be created that kills the service, and add that to the autostarting applications list.
3rd is to have a custom script that can be executed via a .desktop icon on the desktop, panel, or ran manually each time the monitors are turned on.
Review the monitor IDs using the xrandr command.
The custom script could look something like the following:
xrandr --output HDMI-A-0 --right-of DisplayPort-0 --auto
- Desktop environment — provides a list of desktop environments available in Gentoo.
- Xfce/Guide — provides an extensive introduction to Xfce, a fast, lightweight, full-featured desktop environment.