From ParabolaWiki
Jump to: navigation, search
Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.
Xfce uses the GTK+ toolkit.
The Xorg project provides a free software implementation of the X Window System – the foundation for a graphical user interface. Desktop environments such as LXQt, Openbox/KDE, Cinnamon, MATE, Xfce, GNOME, Deepin provide a complete graphical environment. Various window managers offer alternative and novel environments, and may be used standalone to conserve system resources. Display managers provide a graphical login prompt.

From Xfce - About:

Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.


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

2 Features

This article or section needs expansion.
Please help expand this article so the intended scope is covered in sufficient detail. (Discuss)
  • Lighter on resources than the other major DEs (KDE, GNOME).
  • Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.
  • Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).
  • It works great with multiple monitors.
  • Xfce4 is stable, mature software.

3 Installation

Before starting, make sure you have the X server installed and configured correctly.

Note: Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.

The base Xfce system can be installed with the group xfce4, available in the Official Repositories. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing Enter. Additional packages, like panel plugins, are available in the xfce4-goodies group. If you wish to admire 'Tips and Tricks' on login, install the fortune-mod package.

Tip: Installing Gamin (the successor of FAM) is highly recommended.

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.

4 Running Xfce

4.1 Automatically at boot time

There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:

See Display Manager for details about installing and configuring a Display Manager (be sure to configure it properly for PolicyKit). See Start X at Boot for configuration instructions on using bash_profile or inittab.

4.2 Manually

You can execute:

$ startxfce4

from the console, or configure xinitrc and use xinit or startx.

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

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

and add the following line:

exec startxfce4 --with-ck-launch



if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  unset f

exec startxfce4 --with-ck-launch
  • --with-ck-launch 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 and thus the command doesn't need to be specified seperatly.
  • xorg-xdm is also ConsoleKit/PolicyKit capable since version 1.1.11. Unless you happen to run an old version, you must not use --with-ck-launch from your .xinitrc or .xsession for xdm.
  • SLiM is also ConsoleKit capable since version 1.3.3. Unless you happen to run an old version, you must not use --with-ck-launch from your .xinitrc or slim.conf login_cmd.
  • In case you are wondering, dbus-launch will be launched by the xinitrc.d code at the beginning of the file. dbus-launch starts a dbus-daemon instance to provide communication with PolicyKit.
  • The proper command for launching Xfce is startxfce4: do not start xfce4-session directly, since it is already run by startxfce4 itself.
Note: dbus-launch should actually be called after launching ConsoleKit, otherwise there will be authorization problems when mounting disks as a regular user, see {https://bugs.archlinux.org/task/25031. For a temporary workaround you can edit the xinitrc.d script at the beginning of the file as follows, and keep an eye on the evolution of the bug report (and possibly vote it):
~/.xinitrc [temporary workaround]

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    # Do not launch dbus before ConsoleKit
    #[ -x "$f" ] && . "$f"
    [ "$f" -ne "/etc/X11/xinit/xinitrc.d/30-dbus" ] && [ -x "$f" ] && . "$f"
  unset f

exec startxfce4 --with-ck-launch
There is still no need to start dbus-launch explicitly since startxfce4 takes care of doing that anyway.

4.3 Shutting down, rebooting, and automounting from within Xfce

  • Make sure that dbus is enabled in the DAEMONS array in /etc/rc.conf.
  • If a display manager is used:
    • Make sure that you are using exec startxfce4 --with-ck-launch in ~/.xinitrc (along with sourcing xinitrc.d scripts, which is done for you in the skel file) or a ConsoleKit/PolicyKit capable display manager.
  • If no display manager is used:
    • Make sure you use the bash_profile method to auto-login (not inittab).
    • For automounting to work the default Policykit has to be edited. You can also install polkit-gnome for authorization.
  • If you want to automount removable disk in thunar, install thunar-volman and gamin, and make sure gvfs and gvfs-afc is installed, see details .

5 Tips

5.1 Panel

5.1.1 How to customize xfce panel background

Edit ~/.gtkrc-2.0. 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 will not 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"

5.1.2 How to remove menu entries from the System menu Method 1

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

  1. Open Terminal (Xfce menu > System > Terminal) and go to the /usr/share/applications folder:
    $ cd /usr/share/applications
  2. This folder should be full of .desktop files. To see a list type:
    $ ls
  3. Add NoDisplay=true to the .desktop file. For example, if you want to hide Iceweasel, type in the terminal:
    $ sudo sh -c 'echo "NoDisplay=true" >> iceweasel.desktop'
    This command appends the text NoDisplay=true to the end of the .desktop file. Method 2

Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under /usr/share/applications/.

  1. In a terminal, copy everything from /usr/share/applications to ~/.local/share/applications/:
    $ cp /usr/share/applications/* ~/.local/share/applications/
  2. For any entry you wish to hide from the menu, add the NoDisplay=true option:
    $ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop

You can also edit the application's category by editing the .desktop file with a text editor and modifying the Categories= line. Method 3

The third method is the cleanest and recommended in the Xfce wiki.

Create the file ~/.config/menus/xfce-applications.menu and copy the following in it:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"

    <MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile>




        <Merge type="all"/>




The <MergeFile> tag includes the default Xfce menu in our file. This is important.

The <Exclude> tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude iceweasel.desktop or any other application.

The <Layout> tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.

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

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

5.1.4 Panel autohide delay

Add this to ~/.gtkrc-2.0.

 style "xfce-panel-window-style"
   # Time in miliseconds before the panel will unhide on an enter event
   XfcePanelWindow::popup-delay = 225
   # Time in miliseconds before the panel will hide on a leave event
   XfcePanelWindow::popdown-delay = 350
 class "XfcePanelWindow" style "xfce-panel-window-style"

5.1.5 Panel at desktop level

If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the wmctrl package.

Create a script in ~/.config/xfce4/fixpanels.sh with this content and make it executable (you can use chmod 755 fixpanels.sh).

set -e

function getPanelIdImpl() {
  # get panel id
  PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"

function getPanelId() {
  # eventually await the panel to appear
  getPanelIdImpl $1
  while [ x = x$PANEL ] ;do
    sleep 0.5s
    getPanelIdImpl $1

function putPanelDown() {
  getPanelId $1
  wmctrl -i -r $PANEL -b add,below

#Uncomment here the panels you want to put at desktop level. 
#putPanelDown 1
#putPanelDown 2

Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the Session and StartUp -> Application Autostart gui.

This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)

xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true

5.2 Desktop

5.2.1 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"

5.2.2 Hide selected partitions on the desktop

If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example /etc/udev/rules.d/10-local.rules:


Would show all partitions with the exception of sda1 and sda2 on your desktop.

5.2.3 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

5.2.4 Adding the kill window shortcut

Xfce does not support the kill window shortcut directly, but you can add one with a simple script. Ensure you have the xorg-xkill package installed.

Create a script in ~/.config/xfce4/killwindow.sh with this content and make it executable (you can use chmod 755 killwindow.sh).

xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"

Now associate a shortcut using Settings -> Keyboard to that script.

5.3 XFWM4

5.3.1 How to enable the compositor in Xfce

Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your /etc/xorg.conf. To enable and adjust settings, go to:

Menu  -->  Settings  -->  Window Manager Tweaks

5.3.2 Disable window roll-up

xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false

5.4 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:

orage -p

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

$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'

5.5 Session

5.5.1 Customizing Startup Applications

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

5.5.2 Modify XML settings files directly

It may be useful, especially when upgrading, to manually edit .xml files in the ~/.config/xfce4/xfconf/ folder. For application keyboard shortcuts for example, the file is ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml. It is faster to copy and paste the XML keys that you want rather than using the GUI.

5.6 Removable Devices

If you want an icon appearing on your desktop and in thunar when you plug in external devices, make sure gvfs is installed:

# pacman -S --needed gvfs

You could also need to install gvfs-afc (read this discussion):

# pacman -S gvfs-afc

It is also a good idea to install thunar-volman (included in the xfce4-goodies group):

# pacman -S thunar-volman

Udisk and a udisk wrapper are recommended if you want to automount optical and external drives easily

5.7 How to add themes to XFCE

1. Go to www.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

5.8 Cursors

Main article: X11 Cursors

If you have alternative X cursor themes installed, Xfce can find them with:

Menu --> Settings --> Mouse --> Theme

5.9 Icons

1. First find and download your desired icon pack. Recommended places to download icons from are Customize.org, Opendesktop.org and Xfce-look.org.

2. Go to the directory where you downloaded the icon pack and extract it. Example tar -xzf /home/user/downloads/icon-pack.tar.gz.

3. Move the extracted folder containing the icons to /usr/share/icons (if you want all users on the system to make use of the icons) or ~/.icons (if only you want to use the icons).

Optional: run gtk-update-icon-cache -f -t ~/.icons/<theme_name> to update icon cache

4. Switch your icons by going to:

Menu --> Settings --> Appearance --> Icons

When you have icon theme problems, it's also recommended to install the hicolor-icon-theme package if it wasn't already installed.

5.10 Fonts

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.

5.11 Sound

5.11.1 Configuring xfce4-mixer

xfce4-mixer is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses gstreamer as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.

 GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.

(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with gstreamer0.10-base-plugins.

 pacman -S gstreamer0.10-base-plugins

If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that doesn't work, you might need more or different gstreamer plugins. Try to install gstreamer0.10-good-plugins or gstreamer0.10-bad-plugins.

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

If you had to change the soundcard in the audio mixer, then you should log out and back in to hear sound.

For further details, for example how to set the default sound card, see Advanced Linux Sound Architecture. Alternatively you can use PulseAudio together with pavucontrol.

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

If you tried the above section to get xfce4-mixer to work and it does not work at all, then you may have to compile gstreamer0.10-good-plugins yourself. 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 \
   --disable-schemas-install \
   --disable-hal \
   --with-package-name="GStreamer Good Plugins (Parabola)" \

and then run makepkg -i.

 makepkg -i

5.11.3 Change volume with keyboard volume buttons

Go to

Settings --> Keyboard

Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window: ALSA

For the raise volume button:

amixer set Master 5%+

For the lower volume button:

amixer set Master 5%-

For the mute button:

amixer set Master toggle

You can also run these commands to set the above commands to the standard XF86Audio keys:

xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+"
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%-"
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"

If amixer set Master toggle does not work, try the PCM channel (amixer set PCM toggle) instead.

The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run alsamixer in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties. OSS

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

5.12 Screenshots

5.12.1 Using print-screen key

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

# pacman -S scrot

Then go to:

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 (i.e. 2009-02-19-063052_1280x1024_scrot.png).

5.12.2 Screenshooter

There is also an a screenshot plugin for the Xfce panel, which can be used instead of scrot, that is available in extra:

# pacman -S xfce4-screenshooter

You can add a keyboard binding for it using the command

xfce4-screenshooter -f

instead of "scrot". You will get a dialog window after pressing "Print" where you can copy the image to the clipboard or save it.

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


5.14 Terminal tango color theme

Open with your favorite editor


And add(replace) this lines:


6 Troubleshooting

6.1 User directories (Desktop, Images, etc...) are still in English

If your primary language isn't English, you may need to force Xfce changing the name of the user directories buy modifying/creting the two following files (this exemple is for French):





6.2 Unable to open external windows partitions

If you have external partitions like a fat32 drive connected via eSata, and launching them from the desktop results in a dialog telling you 'Authentication is required', you need to ensure polkit-gnome is installed and PolicyKit Authentication Agent is started by xfce4.

pacman -S polkit-gnome

Restart xfce4 and go:

Applications Menu > Settings > Sessions and Startup

Check that PolicyKit Authentication Agent is enabled under the Application Autostart tab.

6.3 xfce4-power-manager is not working

Check you have added dbus to the DAEMONS array in /etc/rc.conf.

6.4 Keyboard shortcuts are not working

Under Xfce 4.6 there is a problem where the user's keyboard shortcuts will intermittently not work. This is usually the case when the settings helper is either not running or has been started improperly due to a conflict. This bug has been fixed in Xfce 4.8, which replaced 4.6 in the main repositories.

A workaround is to disable xfce4-settings-helper-autostart from autostarting in a user's session. The settings helper daemon will start upon loading an Xfce session, anyways. The following two steps seem to have resolved this issue.

Remove or rename the global autostart .desktop file:

mv /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop /etc/xdg/autostart/xfce4-settings-helper-autostart.desktop.disabled

Remove or rename the local autostart .desktop file:

mv ~/.config/autostart/xfce4-settings-helper-autostart.desktop ~/.config/autostart/xfce4-settings-helper-autostart.desktop.disabled

After logging out and logging back in, your shortcut keys should be working fine now.

6.5 Xfce4-xkb-plugin settings issue

There's a bug in version which causes xkb-plugin to lose keyboard, layout switching and compose key settings. As a workaround you may enable Use system defaults option in keyboard settings. To do so run


Go to Layout tab and set the Use system defaults flag, then reconfigure xkb-plugin.

6.6 Thunar does not display any thumbnail

Thunar relies on Tumbler to generate thumbnails. You can install Tumbler by issuing

pacman -S tumbler

More details in Thunar's page.

6.7 Locales ignored with GDM

Become superuser and add your locale to /var/lib/AccountsService/users/$USER:

su -c "nano /var/lib/AccountsService/users/$USER"

Replace hu_HU.UTF-8 with your own locale:


You may also do it with sed. Note the backslash before .UTF-8:

su -c "sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER"

Restart GDM to take effect.

6.8 Restore default settings

If for any reason you need to revert back to the default settings, try renaming ~/.config/xfce4-session/ and ~/.config/xfce4/

$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak

Logout and login for changes to take effect.

6.9 Session failure

If the window manager doesn't load correctly (The mouse is a X and you can't close windows) you maybe got an session error. To remove a corrupt session you can delete the session folder at the .cache folder.

# rm -r ~/.cache/sessions/

The easy way to reload the session is to reboot the computer. You can also restart xfce.

6.10 Clock/notification area no longer pushed to the right edge of the panel in Xfce 4.10

This is due to a change in the Window Buttons panel plugin which no longer expands to fill the available space.

To emulate the old behavior, add a transparent separator between the window buttons and the clock/notification area, setting its expand property.

7 Related Articles

8 External Resources

9 Acknowledgement

This wiki article is based on ArchWiki. We may have removed non-FSDG bits from it.