Difference between revisions of "Xfce"

From ArchWiki
Jump to: navigation, search
m (misc formatting)
(How to remove menu entries from the System menu - method 3)
Line 151: Line 151:
You can also edit the application's category by editing the {{Filename|.desktop}} file with a text editor and modifying the {{Codeline|1=Categories=}} line.
You can also edit the application's category by editing the {{Filename|.desktop}} file with a text editor and modifying the {{Codeline|1=Categories=}} line.
===== Method 3 =====
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].
Create the file {{Filename|~/.config/menus/xfce-applications.menu}} and copy the folowing 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 {{Codeline|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.
The {{Codeline|<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 {{Filename|firefox.desktop}} or any other application.
The {{Codeline|<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.
==== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via Wine)? ====  
==== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via Wine)? ====  

Revision as of 16:25, 18 September 2011

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 – فارسی

Template:Article summary start

Template:Article summary text Template:Article summary text Template:Article summary heading Template:Article summary text Template:Article summary end

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.


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.


Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Xfce#)
  • 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.


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

Pacman will ask you to select the packages to install, you probably want to get them all by simply pressing enter.

Note: Or you can install only a few needed core packages:
# pacman -S xfwm4 xfce4-panel xfdesktop thunar xfce4-session xfce4-settings xfce4-appfinder xfce-utils xfconf

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

# pacman -S xfce4-goodies

Like before, pacman will ask you which packages you want to install.

If you wish to admire 'Tips and Tricks' on login, install the fortune-mod package:

# pacman -S fortune-mod

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

Installing and configuring the Daemons

Install D-Bus:

# pacman -S dbus

Start the dbus daemon and add dbus to your DAEMONS array so it starts automatically on boot.

Install Gamin (the successor of FAM). It will run automatically in the background when needed.

# pacman -S gamin

Running Xfce

Automatically at boot time

See Display Manager to install and configure a Display Manager. Be sure to configure it properly for PolicyKit.


You can execute:

$ startxfce4

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

If you have not created a Template:Filename yet, do so with:

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

and add the following line:

exec ck-launch-session startxfce4

Example: Template:File

  • Template:Codeline 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.
  • In case you are wondering, Template:Codeline will be launched by the Template:Codeline code at the beginning of the file. Template:Codeline starts a dbus-daemon instance to provide communication with PolicyKit.
Note: Template:Codeline should actually be called after ck-launch-session, otherwise there will be authorization problems when mounting disks as a regular user, see FS#25031. For a temporary workaround you can comment out the Template:Codeline script at the beginning of the file and keep an eye on the evolution of the bug report (and possibly voting it).


There is still no need to start Template:Codeline explicitly since Template:Codeline takes care of doing that anyway.

Shutting down, rebooting, and automounting from within Xfce

  • Make sure that dbus is enabled in the Template:Codeline array in Template:Filename.
  • Make sure you are a member of the power group for shutting down and rebooting.
  • Make sure you are a member of the storage group for automounting.
  • Make sure that you are using Template:Codeline in Template:Filename (along with sourcing xinitrc.d scripts, which is done for you in the skel file) or a ConsoleKit/PolicyKit capable display manager.



How to customize xfce panel background

Edit Template:Filename. Note that you must place the image in the same directory as the configuration, which is Template:Filename. 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"

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

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 Template:Filename folder:
    $ cd /usr/share/applications
  2. This folder should be full of Template:Filename files. To see a list type:
    $ ls
  3. Add Template:Codeline to the Template:Filename file. For example, if you want to hide Firefox, type in the terminal:
    $ sudo echo "NoDisplay=true" >> firefox.desktop
    This command appends the text Template:Codeline to the end of the Template:Filename 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 Template:Filename.

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

You can also edit the application's category by editing the Template:Filename file with a text editor and modifying the Template:Codeline line.

Method 3

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

Create the file Template:Filename and copy the folowing 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 Template:Codeline tag includes the default Xfce menu in our file. This is important.

The Template:Codeline tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude Template:Filename or any other application.

The Template:Codeline 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.

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: Template:Filename.

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"


Why does my desktop not 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, do not forget to add 'fam' to the list of Template:Codeline in Template:Filename. This step is not necessary for gamin.

NOTE: After recent updates, FAM may have issues opening some mounts, such as sshfs. Use gamin if this is the case.

Use a transparent background for desktop icon titles

To change the default white background of desktop icon titles to something more suitable, edit the Template:Filename 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"

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 Template:Filename:


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

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 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 Window Manager Tweaks and works on the fly. No additional settings are needed in your Template:Filename. To enable and adjust settings, go to:

Menu  -->  Settings  -->  Window Manager Tweaks

Disable window roll-up

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

Commands for the settings manager

There is no official documentation for the commands executed. One must look at Template:Filename files Template:Filename 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*


Customizing Startup Applications

This includes getting necessary environment variables into the GUI runtime.

   source $HOME/.bashrc
   # start rxvt-unicode server
   urxvtd -q -o -f

Switch between users

It is possible to switch between X sessions thanks to xfswitch-plugin . It adds an icon to the Xfce panel, and requires gdm to work at the moment.

xfswitch-plugin is available through AUR

Modify XML settings files directly

It may be useful, especially when upgrading, to manually edit .xml files in the Template:Filename folder. For application keyboard shortcuts for example, the file is Template:Filename. It is faster to copy and paste the XML keys that you want rather than using the GUI.

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 Template:Codeline group):

# pacman -S thunar-volman

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

  • devmon - devmon (AUR) is a configuration-less bash wrapper script for udisks which automounts optical discs and removable drives. It can also selectively autostart apps or execute commands after mounting, ignore specified devices and volume labels, and unmount removable drives.

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 Template:Filename (for all users) or Template:Filename (for just you). Inside Template:Filename, 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


Main article: X11 Cursors

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

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


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.



Sync-update the complete gstreamer group since xfce4 uses gstreamer as sound backend. The xfce mixer applet will be able to control volume (after setting device and master control).

 pacman -Syu gstreamer0.10-plugins

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 does not 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 \
   --disable-schemas-install \
   --disable-hal \
   --with-package-name="GStreamer Good Plugins (Archlinux)" \

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

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:


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 Template:Codeline does not work, try the PCM channel (Template:Codeline) 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 Template:Codeline 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.


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


Xfce4-volumed daemon from the AUR automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.


Using 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, 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.

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 Template:Filename:

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


Terminal tango color theme

Open with your favorite editor


And add(replace) this lines:



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.

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.

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.

Restore default settings

If for any reason you need to revert back to the default settings, try renaming Template:Filename and Template:Filename

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

Logout and login for changes to take effect.

Related Articles

External Resources