Difference between revisions of "Xfce"

From ArchWiki
Jump to navigation Jump to search
(How to remove menu entries from the System menu - method 3)
(update status of external links (interactive))
Tag: wiki-scripts
 
(898 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
[[Category:Desktop environments (English)]]
+
[[Category:Xfce]]
{{i18n|Xfce}}
+
[[cs:Xfce]]
[[pl:XFCE]]
 
 
[[de:Xfce]]
 
[[de:Xfce]]
 +
[[es:Xfce]]
 +
[[fa:Xfce]]
 +
[[fr:Xfce]]
 +
[[it:Xfce]]
 +
[[ja:Xfce]]
 +
[[ko:Xfce]]
 +
[[pl:Xfce]]
 +
[[pt:Xfce]]
 +
[[ru:Xfce]]
 +
[[zh-hans:Xfce]]
 +
{{Related articles start}}
 +
{{Related|Desktop environment}}
 +
{{Related|Window manager}}
 +
{{Related|Xfwm}}
 +
{{Related|Thunar}}
 +
{{Related|LXDE}}
 +
{{Related|GNOME}}
 +
{{Related articles end}}
  
{{Article summary start}}
+
[http://www.xfce.org Xfce] is a lightweight and modular [[desktop environment]] currently based on both GTK 2 and GTK 3. To provide a complete user experience, it includes a window manager, a file manager, desktop and panel.
{{Article summary text|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.}}
 
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}
 
{{Article summary heading|Overview}}
 
{{Article summary text|{{Graphical user interface overview}}}}
 
{{Article summary end}}
 
  
From [http://www.xfce.org/about/ Xfce - About]:
+
== Installation ==
  
:''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.''
+
[[Install]] the {{Grp|xfce4}} group. You may also wish to install the {{Grp|xfce4-goodies}} group which includes extra plugins and a number of useful utilities such as the {{Pkg|mousepad}} editor. Xfce uses the [[Xfwm]] window manager by default.
  
== What is Xfce? ==
+
== Starting ==
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.
 
  
==Features==
+
Choose ''Xfce Session'' from the menu in a [[display manager]] of choice, or add {{ic|exec startxfce4}} to [[Xinitrc]].
{{expansion}}
 
*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.
 
  
==Installation==
+
{{Note|Do not call the {{ic|xfce4-session}} executable directly; {{ic|startxfce4}} is the correct command which, in turn, calls the former when appropriate.}}
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===
+
== Configuration ==
To install the base Xfce system, run:
 
  
# pacman -S xfce4
+
Xfce stores configuration options in [http://docs.xfce.org/xfce/xfconf/start Xfconf]. There are several ways to modify these options:
  
Pacman will ask you to select the packages to install, you probably want to get them all by simply pressing enter.
+
* In the main menu, select [http://docs.xfce.org/xfce/xfce4-settings/start Settings] and the category you want to customize. Categories are programs usually located in {{ic|/usr/bin/xfce4-*}} and {{ic|/usr/bin/xfdesktop-settings}}.
 +
* {{ic|xfce4-settings-editor}} can see and modify all settings. Options modified here will take effect immediately. Use {{ic|xfconf-query}} to change settings from the commandline; see [http://docs.xfce.org/xfce/xfconf/xfconf-query the documentation] for details.
 +
* Settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will ''not'' take effect immediately.
  
{{Note |Or you can install only a few needed '''core packages''':
+
=== Menu ===
  
# pacman -S xfwm4 xfce4-panel xfdesktop thunar xfce4-session xfce4-settings xfce4-appfinder xfce-utils xfconf
+
See [[Xdg-menu]] for more info on using the Free Desktop menu system.
  
}}
+
==== Whisker menu ====
  
If you want extras, like panel plugins, run this:
+
{{Pkg|xfce4-whiskermenu-plugin}} (also part of {{Grp|xfce4-goodies}}) is an alternative application launcher. It shows a list of favorites, browses through all installed applications through category buttons, and supports fuzzy searching. After package being installed, it can replace ''Applications Menu'' as first item in Panel 1 (in ''Settings > Panel > Items'' add ''Whisker Menu'').
  
# pacman -S xfce4-goodies
+
==== Edit entries ====
  
Like before, pacman will ask you which packages you want to install.
+
A number of graphical tools are available for this task:
  
If you wish to admire 'Tips and Tricks' on login, install the fortune-mod package:
+
* {{App|MenuLibre|An advanced menu editor that provides modern features in a clean, easy-to-use interface.|https://launchpad.net/menulibre|{{AUR|menulibre}}}}.
 +
* {{App|Alacarte|Menu editor for GNOME|http://www.gnome.org/|{{Pkg|alacarte}}}}
 +
* {{App|XAME (XFCE Applications Menu Editor)|GUI tool written in Gambas designed specifically for editing menu entries in Xfce, it will not work in other environments. (Discontinued)|http://redsquirrel87.altervista.org/doku.php/xfce-applications-menu-editor|{{AUR|xame}}}}
  
# pacman -S fortune-mod
+
Alternatively, create the file {{ic|~/.config/menus/xfce-applications.menu}} manually. See the example configuration below:
  
In order to get the xfce4-mixer to work with [[ALSA]], you need to install gstreamer0.10-base-plugins. (See [[#OSS|below]] for help with [[OSS]].)
+
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 +
  "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd{{Dead link|2020|04|03|status=404}}">
 +
 +
<Menu>
 +
    <Name>Xfce</Name>
 +
    <MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile>
 +
 +
    <Exclude>
 +
        <Filename>xfce4-run.desktop</Filename>
 +
        <Filename>exo-terminal-emulator.desktop</Filename>
 +
        <Filename>exo-file-manager.desktop</Filename>
 +
        <Filename>exo-mail-reader.desktop</Filename>
 +
        <Filename>exo-web-browser.desktop</Filename>
 +
        <Filename>xfce4-about.desktop</Filename>
 +
        <Filename>xfhelp4.desktop</Filename>
 +
    </Exclude>
 +
 +
    <Layout>
 +
        <Merge type="all"/>
 +
        <Separator/>
 +
        <Menuname>Settings</Menuname>
 +
        <Separator/>
 +
        <Filename>xfce4-session-logout.desktop</Filename>
 +
    </Layout>
 +
</Menu>
  
# pacman -S gstreamer0.10-base-plugins
+
The {{ic|<MergeFile>}} tag includes the default Xfce menu.
  
===Installing and configuring the Daemons===
+
The {{ic|<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 {{ic|firefox.desktop}} or any other application.
Install [[D-Bus]]:
 
# pacman -S dbus
 
  
[[Daemon#Performing daemon actions manually|Start the dbus daemon]] and add dbus to your [[Daemons#Starting on Boot|DAEMONS array]] so it starts automatically on boot.
+
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the [http://wiki.xfce.org/howto/customize-menu  Xfce wiki].
  
Install [[Gamin]] (the successor of [[FAM]]). It will run automatically in the background when needed.
+
You can also make changes to the Xfce menu by editing the {{ic|.desktop}} files themselves. To hide entries, see [[Desktop entries#Hide desktop entries]]. You can edit the application's category by modifying the {{ic|1=Categories=}} line of the desktop entry, see [[Desktop entries#File example]].
  
  # pacman -S gamin
+
=== Desktop ===
 +
 
 +
==== Transparent background for icon titles ====
 +
 
 +
To change the default white background of desktop icon titles to something more suitable, create or edit {{ic|~/.gtkrc-2.0}}:
 +
 
 +
{{bc|<nowiki>
 +
style "xfdesktop-icon-view" {
 +
    XfdesktopIconView::label-alpha = 10
 +
    base[NORMAL] = "#000000"
 +
    base[SELECTED] = "#71B9FF"
 +
    base[ACTIVE] = "#71B9FF"
 +
    fg[NORMAL] = "#fcfcfc"
 +
    fg[SELECTED] = "#ffffff"
 +
    fg[ACTIVE] = "#ffffff"
 +
}
 +
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
 +
</nowiki>}}
 +
 
 +
==== Remove desktop icons ====
 +
 
 +
Issue the following command:
 +
 
 +
  $ xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0
  
== Running Xfce ==
+
To reinstate icons on the desktop, issue the same command with a value of 2.
  
===Automatically at boot time===
+
==== One wallpaper across multihead ====
See [[Display Manager]] to install and configure a Display Manager. Be sure to configure it properly for [[PolicyKit]].
 
  
===Manually===
+
Open {{ic|xfce4-settings-editor}} and create a new property with the  following settings:
  
You can execute:
+
Property: /backdrop/screen0/xinerama-stretch
  $ startxfce4
+
  Type: Boolean
from the console, or configure [[xinitrc]] and use xinit or startx.
+
Value: TRUE|1|Enabled
  
If you have not created a {{Filename|~/.xinitrc}} yet, do so with:
+
==== Kill window shortcut ====
  
$ cp /etc/skel/.xinitrc ~/.xinitrc
+
Xfce does not have a shortcut to kill a window, for example when a program freezes.
  
and add the following line:
+
With {{Pkg|xorg-xkill}}, use {{ic|xkill}} to interactively kill a window. For the currently active window, use {{Pkg|xdotool}}:
  
  exec ck-launch-session startxfce4
+
  $ xdotool getwindowfocus windowkill
  
Example:
+
Alternatively:
{{File|~/.xinitrc|content=<nowiki>#!/bin/sh
 
  
if [ -d /etc/X11/xinit/xinitrc.d ]; then
+
$ sh -c "xkill -id $(xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p')"
  for f in /etc/X11/xinit/xinitrc.d/*; do
 
    [ -x "$f" ] && . "$f"
 
  done
 
  unset f
 
fi
 
  
exec ck-launch-session startxfce4</nowiki>}}
+
To add the shortcut, use ''Settings > Keyboard'' or an application like {{pkg|xbindkeys}}.
  
{{Note|
+
=== Session ===
*{{Codeline|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.
 
*In case you are wondering, {{Codeline|dbus-launch}} will be launched by the {{Codeline|xinitrc.d}} code at the beginning of the file. {{Codeline|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.}}
 
{{Note|{{Codeline|dbus-launch}} should actually be called '''after''' ck-launch-session, otherwise there will be authorization problems when mounting disks as a regular user, see {{Bug|25031}}. For a '''temporary''' workaround you can comment out the {{Codeline|xinitrc.d}} script at the beginning of the file and '''keep an eye on the evolution of the bug report''' (and possibly voting it).
 
{{File|~/.xinitrc [temporary workaround]|content=<nowiki>#!/bin/sh
 
  
#if [ -d /etc/X11/xinit/xinitrc.d ]; then
+
==== Autostart ====
#  for f in /etc/X11/xinit/xinitrc.d/*; do
 
#    [ -x "$f" ] && . "$f"
 
#  done
 
#  unset f
 
#fi
 
  
exec ck-launch-session startxfce4</nowiki>}}
+
To launch custom applications when Xfce starts up, click the ''Applications Menu > Settings > Settings Manager'' and then choose the ''Session and Startup'' option and click the tab ''Application Autostart''.
There is still no need to start {{Codeline|dbus-launch}} explicitly since {{Codeline|startxfce4}} takes care of doing that anyway.}}
+
You will see a list of programs that get launched on startup. To add an entry, click the ''Add'' button and fill out the form, specifying the path to an executable you want to run.
  
===Shutting down, rebooting, and automounting from within Xfce===
+
Autostart applications are stored as {{ic|''name''.desktop}} in {{ic|~/.config/autostart/}}.
* Make sure that '''dbus''' is enabled in the {{Codeline|DAEMONS}} array in {{filename|/etc/rc.conf}}.
 
* 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 {{Codeline|exec ck-launch-session xfce4-session}} in {{Filename|~/.xinitrc}} (along with sourcing xinitrc.d scripts, which is done for you in the skel file) '''or''' a ConsoleKit/PolicyKit capable [[display manager]].
 
  
==Tips==
+
Alternatively, add the commands you wish to run (including setting environment variables) to [[xinitrc]] (or [[xprofile]] when a [[display manager]] is being used).
===Panel===
 
====How to customize xfce panel background====
 
Edit {{Filename|~/.gtkrc-2.0}}.
 
Note that you must place the image in the same directory as the configuration, which is {{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 ====
+
{{Tip|Sometimes it might be useful to '''delay the startup of an application'''. Note that specifying under ''Application > Autostart'' a command such as {{ic|sleep 3 && ''command''}}  does not work; a workaround is to use the syntax {{ic|sh -c "sleep 3 && ''command''"}}
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 [http://aur.archlinux.org/packages.php?ID=10259 the AUR]
+
==== Lock the screen ====
 +
''xflock4'' is the reference Bash script which is used to lock an Xfce session.
  
====How to remove menu entries from the System menu====
+
It tries to lock the screen with either {{Pkg|xfce4-screensaver}} (also part of {{Grp|xfce4-goodies}}), {{Pkg|xscreensaver}}, {{Pkg|gnome-screensaver}}, {{Pkg|slock}} or {{Pkg|xlockmore}}. It consecutively looks for the corresponding binary or exits with return code 1 if it fails to find any of these.  
===== Method 1 =====
 
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:
 
# Open Terminal (Xfce menu > System > Terminal) and go to the {{Filename|/usr/share/applications}} folder: <pre>$ cd /usr/share/applications</pre>
 
# This folder should be full of {{Filename|.desktop}} files. To see a list type: <pre>$ ls</pre>
 
# Add {{Codeline|1=NoDisplay=true}} to the {{Filename|.desktop}} file. For example, if you want to hide Firefox, type in the terminal:<pre>$ sudo echo "NoDisplay=true" >> firefox.desktop</pre> This command appends the text {{Codeline|1=NoDisplay=true}} to the end of the {{Filename|.desktop}} file.
 
  
===== Method 2 =====
+
The [[List of applications/Security#Screen lockers]] contains a short description of these screen lockers together with other popular applications. There is in this list an alternative locker, {{Pkg|light-locker}}, which integrates particularly well with {{Pkg|xfce4-power-manager}}. Once it is installed, Xfce Power Manager's setting gains an additional ''Security'' tab to configure ''light-locker'' and the existing ''Lock screen when system is going for sleep'' setting is relocated under this tab. In this new GUI it is possible to set whether the session should be locked upon screensaver activity or whenever the system goes to sleep.
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 {{Filename|/usr/share/applications/}}.
 
# In a terminal, copy everything from {{Filename|/usr/share/applications}} to {{Filename|~/.local/share/applications/}}: <pre>$ cp /usr/share/applications/* ~/.local/share/applications/</pre>
 
# For any entry you wish to hide from the menu, add the {{Codeline|1=NoDisplay=true}} option: <pre>$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop</pre>
 
  
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.
+
To have ''xflock4'' run ''light-locker'' or any custom session locker, not among the five cited above, one must set {{ic|LockCommand}} in the session's xfconf channel to the command line to be used (the command inside the quotes in the following example can be adapted accordingly for other screen lockers):
  
===== Method 3 =====
+
{{bc|$ xfconf-query -c xfce4-session -p /general/LockCommand -s "''light-locker-command --lock''" --create -t string}}
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:
+
The panel lock button in the ''Action Buttons'' panel simply executes {{ic|/usr/bin/xflock4}}. It should work as expected as long as ''xflock4'' is functioning i.e. one of the native lockers is installed or a custom locker is configured to integrate with it as proposed above.
<pre>
 
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 
  "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
 
  
<Menu>
+
==== Suspend ====
    <Name>Xfce</Name>
+
Whenever asked to suspend, Xfce executes the {{man|1|xfce4-session-logout}} command with the {{ic|suspend}} option:
    <MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile>
 
  
 +
$ xfce4-session-logout --suspend
  
    <Exclude>
+
Whether or not the session is systematically locked on ''suspend'' can be configured through the xfconf properties or from the GUI.
        <Filename>xfrun4.desktop</Filename>
 
  
        <Filename>exo-terminal-emulator.desktop</Filename>
+
To control this state using the CLI: there are two settings that are used, {{ic|LockScreen}} and {{ic|lock-screen-suspend-hibernate}}, in respectively the session and the power manager xfconf channels.
        <Filename>exo-file-manager.desktop</Filename>
+
To prevent locking on suspend, turn them to {{ic|false}}:
        <Filename>exo-mail-reader.desktop</Filename>
+
$ xfconf-query -c xfce4-session -p /shutdown/LockScreen -s '''false'''
        <Filename>exo-web-browser.desktop</Filename>
+
$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/lock-screen-suspend-hibernate -s '''false'''
 +
Similarly, turn them to {{ic|true}} to lock the session on suspend.
  
        <Filename>xfce4-about.desktop</Filename>
+
The setting can also be controlled from the GUI: open the ''Session and Startup'' application and turn the flag ''Advanced > Lock screen before sleep'' on or off.
        <Filename>xfhelp4.desktop</Filename>
 
    </Exclude>
 
  
    <Layout>
+
Whenever the suspend keyboard button is pressed, it can be handled by either Xfce's power manager or by ''systemd-logind''. To give precedence to logind, the following xfconf setting must be set to {{ic|true}}:
        <Merge type="all"/>
 
        <Separator/>
 
  
        <Menuname>Settings</Menuname>
+
$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-suspend-key -n -t bool -s '''true'''
        <Separator/>
 
  
        <Filename>xfce4-session-logout.desktop</Filename>
+
{{Note|To check how ''systemd-logind'' handles events whenever it has precedence over Xfce, check {{man|5|logind.conf}}}}
    </Layout>
 
  
</Menu>
+
==== Disable saved sessions ====
</pre>
 
  
The {{Codeline|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.
+
Per user, saved sessions can be disabled by executing the following:
 +
$ xfconf-query -c xfce4-session -p /general/SaveOnExit -s false
 +
Then navigate to ''Applications > Settings > Session and Startup > Sessions'' and press the ''Clear saved sessions'' button to remove all previously saved sessions.
  
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.
+
{{Tip|If the command above does not change the setting persistently, use the following command instead: {{ic|xfconf-query -c xfce4-session -p /general/SaveOnExit -n -t bool -s false}}}}
  
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.
+
Alternatively, Xfce [https://wiki.xfce.org/howto/kiosk_mode kiosk mode] can be used to disable the saving of sessions systemwide. To disable sessions, create or edit the file {{ic|/etc/xdg/xfce4/kiosk/kioskrc}} and add the following:
  
==== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via Wine)? ====
+
[xfce4-session]
I have found some shortcuts that show in the category “Other” in this directory:
+
SaveSession=NONE
{{Filename|~/.local/share/applications/wine/}}.
 
  
====Panel autohide delay====
+
If kiosk mode is not working, the user can set read only permissions for the sessions directory:
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"
 
  
=== Desktop ===
+
$ rm ~/.cache/sessions/* && chmod 500 ~/.cache/sessions
==== 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.
+
This will prevent Xfce from saving any sessions despite any configuration that specifies otherwise.
If you decide to use FAM, do not forget to add 'fam' to the list of {{Codeline|DAEMONS}} in {{Filename|/etc/rc.conf}}.
 
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 different window manager ====
  
==== Use a transparent background for desktop icon titles ====
+
{{Note|For the changes to take effect, you will need to clear the saved sessions and ensure that session saving is disabled when logging out for the first time. Once the window manager of choice is running, session saving can be enabled again.}}
To change the default white background of desktop icon titles to something more suitable, edit the {{Filename|.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"
 
  
==== Hide selected partitions on the desktop ====
+
The files specifying the default window manager are found in the following locations:
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{filename|/etc/udev/rules.d/10-local.rules}}:
+
*{{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml}} - per user
 +
*{{ic|/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml}} - systemwide
  
  KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"
+
The default window manager for the user can be set easily using ''xfconf-query'':
  KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"
+
  $ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa xfsettingsd
 +
  $ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -sa ''wm_name''
  
Would show all partitions with the exception of sda1 and sda2 on your desktop.
+
If you want to start the window manager with command line options, see the commands below:
 +
$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa xfsettingsd
 +
$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -s ''wm_name'' -t string -s ''--wm-option''
 +
If you need more command line options, simply add more {{ic|-t string}} and {{ic|-s ''--wm-option''}} arguments to the command.
  
==== Switch to old desktop right click menu without Thunar things ====
+
If you want to change the default window manager systemwide, edit the file specified above manually, changing ''xfwm4'' to the preferred window manager and adding more {{ic|1=<value type="string" value="''--wm-option''"/>}} lines for extra command line options if needed.
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0
 
  
=== XFWM4 ===
+
You can also change the window manager by autostarting {{ic|''wm_name'' --replace}} using the autostart facility or by running {{ic|''wm_name'' --replace &}} in a terminal and making sure the session is saved on logout. Be aware though that this method does not truly change the default manager, it merely replaces it at login. Note that if you are using the autostart facility, you should disable saved sessions as this could lead to the new window manager being started twice after the default window manager.
==== 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 {{Filename|/etc/xorg.conf}}. To enable and adjust settings, go to:
 
  
Menu  -->  Settings  -->  Window Manager Tweaks
+
=== Theming ===
  
==== Disable window roll-up ====
+
XFCE themes are available at [http://www.xfce-look.org xfce-look.org]. ''Xfwm'' themes are stored in {{ic|/usr/share/themes/xfce4}}, and set in ''Settings > Window Manager''. [[GTK]] themes are set in ''Settings > Appearance''.
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false
 
  
=== Commands for the settings manager ===
+
To achieve a uniform look for all applications, see [[Uniform look for Qt and GTK applications]].
  
There is no official documentation for the commands executed. One must look at {{Filename|.desktop}} files {{Filename|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:
+
See also [[Cursor themes]], [[Icons]], and [[Font configuration]].
  
xfce-setting-show backdrop
+
=== Sound ===
xfce-setting-show display
 
xfce-setting-show keyboard
 
xfce4-menueditor
 
xfce-setting-show sound
 
xfce-setting-show mouse
 
xfce-setting-show session
 
xfce-setting-show
 
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-appfinder
 
xfce4-autostart-editor
 
xfce4-panel -c
 
  
To review all the available setting manager commands run the following in a terminal:
+
==== Sound themes ====
  
$ grep xfce-setting-show /usr/share/applications/xfce*settings*
+
XFCE4 supports [https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/ freedesktop system sounds], but it is not configured out of the box.
  
===Session===
+
To enable a sound theme:
====Customizing Startup Applications====
 
This includes getting necessary environment variables into the GUI runtime.
 
  
* Copy the file {{Filename|/etc/xdg/xfce4/xinitrc}} to {{Filename|~/.config/xfce4/}}
+
# Install {{Pkg|libcanberra}} and {{Pkg|libcanberra-pulse}} for [[PulseAudio]] support;
* Edit this file. For example, you can add something like this somehwere in the middle:
+
# "canberra-gtk-module" should be in the GTK_MODULES environment variable (re-login may be required);
    source $HOME/.bashrc
+
# Check "Enable event sounds" in Settings Manager → Appearance → Settings tab;
    # start rxvt-unicode server
+
# In the Settings Editor set "xsettings/Net/SoundThemeName" to a sound theme located in {{Ic|/usr/share/sounds/}};
    urxvtd -q -o -f
+
# Turn on "System Sounds" in audio mixer (e.g. pavucontrol).
  
====Switch between users====
+
{{Pkg|sound-theme-freedesktop}} provides a compatible sound theme, but it lacks many required events. A better choice is {{AUR|sound-theme-smooth}} (SoundThemeName should be "Smooth").
It is possible to switch between X sessions thanks to [http://goodies.xfce.org/projects/panel-plugins/xfswitch-plugin  xfswitch-plugin ]. It adds an icon to the Xfce panel, and requires gdm to work at the moment.
 
  
xfswitch-plugin is available through [http://aur.archlinux.org/packages.php?ID=40677 AUR ]
+
==== Keyboard volume buttons ====
  
==== Modify XML settings files directly ====
+
{{Pkg|xfce4-pulseaudio-plugin}} provides a panel applet which has support for keyboard volume control and volume notifications. As an alternative, you can install {{AUR|xfce4-volumed-pulse}}, which also provides keybinding and notification control, but without an icon sitting in the panel. This is handy, for example, when using {{Pkg|pasystray}} at the same time for a finer control.
It may be useful, especially when upgrading, to manually edit .xml files in the {{Filename|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{Filename|~/.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.
 
  
===Removable Devices===
+
Alternatively, {{AUR|xfce4-mixer}} also provides a panel applet and keyboard shortcuts which supports Alsa as well. Note however, that it is based on a feature of GStreamer 0.10 which has been abandoned in 1.0.
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
+
After installing the panels, you have to add it to the taskbar or the keyboard shortcuts will not work.
  
You could also need to install gvfs-afc (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]):
+
For non desktop environment specific alternatives, see [[List of applications/Multimedia#Volume control]].
  
# pacman -S gvfs-afc
+
===== Shortcuts =====
  
It is also a good idea to install thunar-volman (included in the {{Codeline|xfce4-goodies}} group):
+
If you are not using an applet or daemon that controls the volume keys, you can map volume control commands to your volume keys manually using Xfce's keyboard settings. For the sound system you are using, see the sections linked to below for the appropriate commands.
 +
*ALSA: see [[Advanced Linux Sound Architecture#Keyboard volume control]].
 +
*PulseAudio: see [[PulseAudio#Keyboard volume control]]
 +
*OSS: see [[OSS#Using multimedia keys with OSS]].
  
# pacman -S thunar-volman
+
=== Keyboard Shortcuts ===
  
Udisk and a udisk wrapper are recommended if you want to automount optical and external drives easily
+
Keyboard shortcuts are defined in two places: ''Settings > Window Manager > Keyboard'', and ''Settings > Keyboard > Shortcuts''.
  
* [http://igurublog.wordpress.com/downloads/script-devmon/ devmon] - devmon ([http://aur.archlinux.org/packages.php?ID=45842 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.
+
=== Polkit Authentication Agent ===
  
===How to add themes to XFCE===
+
The {{Pkg|polkit-gnome}} agent will be installed along with {{Pkg|xfce4-session}} and autostarted automatically; no user intervention is required. For more information, see [[Polkit#Authentication agents]].
1. Go to [http://xfce-look.org 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.
+
A third party polkit authentication agent for Xfce is also available, see {{AUR|xfce-polkit}} or {{AUR|xfce-polkit-git}}.
  
3. Move the extracted folder to {{Filename|/usr/share/themes}} (for all users) or {{Filename|~/.themes}} (for just you). Inside {{Filename|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.
+
=== Display blanking ===
 +
Some programs that are commonly used with Xfce will control monitor blanking and [[DPMS]] (monitor powersaving) settings. They are discussed below.
  
4. GTK theme is available here:
+
;Xfce Power Manager
Menu --> Settings --> Appearance
+
''Xfce Power Manager'' controls blanking and DPMS settings. These settings can be configured in the ''Power Manager'' GUI within the ''Display'' tab.
You select your xfwm theme in:
 
Menu --> Settings --> Window Manager
 
  
=== Cursors ===
+
Note that when ''Display power management'' is turned off, DPMS is fully disabled, it does not mean that ''Power Manager'' will simply stop controlling DPMS. It does not disable screen blanking either. To disable both blanking and DPMS, right click on the power manager system tray icon or left click on the panel applet and make sure that the option labelled ''Presentation mode'' is ticked.
Main article: [[X11 Cursors]]
 
  
If you have alternative X cursor themes installed, Xfce can find them with:
+
;XScreenSaver
Menu --> Settings --> Mouse --> Theme
+
If {{pkg|xscreensaver}} is installed and runs alongside Xfce Power Manager, it may not be clear which application is in control of blanking and DPMS as both are competing for control of the same settings. Therefore, in a situation where it is important that the monitor not be blanked (when watching a video for instance), it is advisable to disable blanking and DPMS through both applications. To know more about ''XScreenSaver'' options, see [[XScreenSaver#DPMS and blanking settings]].
  
=== Fonts ===
+
;xset
 +
If neither of the above applications are running, then blanking and DPMS settings can be controlled using the ''xset'' command, see [[DPMS#Modify DPMS and screensaver settings with a command]].
  
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
+
{{Note|1=There are some issues associated with blanking and resuming from blanking in some configurations. See [https://bbs.archlinux.org/viewtopic.php?id=194313&p=2][https://bugzilla.xfce.org/show_bug.cgi?id=11107].}}
  
You could also try using a custom DPI setting.
+
== Tips and tricks ==
  
=== Sound ===
+
=== Mounting support for Thunar and xfdesktop ===
  
==== Pulseaudio ====
+
If plugged external drives does not appear and installation partitions are shown as mounted devices, on the desktop and in Thunar, install {{Pkg|gvfs}}. See [[Udisks#Hide selected partitions]] and [[Thunar#Automounting of large external drives]] for more advanced configuration options.
  
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).
+
=== Screenshots ===
  
  pacman -Syu gstreamer0.10-plugins
+
Xfce has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.
  
==== How do I get xfce4-mixer and OSS4 to work together? ====
+
Go to ''Applications > Settings > Keyboard'', ''Application Shortcuts''. Add the {{ic|xfce4-screenshooter -f}} (or {{ic|-w}} for the active window) command to use the {{ic|Print}} key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.
  
Xfce 4.6 uses gstreamer as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer.
+
Alternatively, an independent screenshot program like [[Taking a screenshot#scrot|scrot]] can be used.
  
  pacman -S xfce4-mixer gstreamer0.10-base-plugins
+
=== Disable Terminal F1 and F11 shortcuts ===
  
(Optional) Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins
+
The xfce terminal binds F1 and F11 to help and fullscreen, respectively, which can make using programs like htop difficult. To disable those shortcuts, create or edit its configuration file, then log out and log back in. F10 can disabled in the Preferences menu.
  
  pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins
+
{{hc|~/.config/xfce4/terminal/accels.scm|
 +
(gtk_accel_path "<Actions>/terminal-window/fullscreen" "")
 +
(gtk_accel_path "<Actions>/terminal-window/contents" "")
 +
}}
  
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
+
=== Terminal color themes or palettes ===
  
Download the PKGBUILD and other files needed from ABS or [http://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss.  
+
Terminal color themes or palettes can be changed in GUI under Appearance tab in Preferences. These are the colors that are available to most console applications like [[Emacs]], [[Vi]] and so on. Their settings are stored individually for each system user in {{ic|~/.config/xfce4/terminal/terminalrc}} file. There are also so many other themes to choose from. Check forum thread [https://bbs.archlinux.org/viewtopic.php?id=51818 Terminal Colour Scheme Screenshots] for hundreds of available choices and themes.
  
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+
==== Changing default color theme ====
    '''--enable-oss \'''
 
    --disable-static --enable-experimental \
 
    --disable-schemas-install \
 
    --disable-hal \
 
    --with-package-name="GStreamer Good Plugins (Archlinux)" \
 
    --with-package-origin="http://www.archlinux.org/"
 
  
and then run makepkg -i.  
+
Xfce's {{ic|extra/terminal}} package comes with a darker colour palette. To change this, append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.
  
  makepkg -i
+
{{hc|~/.config/xfce4/terminal/terminalrc|2=
 +
ColorPalette5=#38d0fcaaf3a9
 +
ColorPalette4=#e013a0a1612f
 +
ColorPalette2=#d456a81b7b42
 +
ColorPalette6=#ffff7062ffff
 +
ColorPalette3=#7ffff7bd7fff
 +
ColorPalette13=#82108210ffff}}
  
Still not working? Try tis package in AUR [http://aur.archlinux.org/packages.php?ID=17024 gstreamer0.10-good-plugins-ossv4], modify the pkgver to the newest in the PKGBUILD, and it should work.
+
==== Terminal tango color theme ====
  
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]
+
To switch to tango color theme, open with your favorite editor
  
==== Change volume with keyboard volume buttons ====
+
  ~/.config/xfce4/terminal/terminalrc
  
Go to
+
And add(replace) these lines:
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 ====
+
ColorForeground=White
For the raise volume button:
+
ColorBackground=#323232323232
  amixer set Master 5%+
+
ColorPalette1=#2e2e34343636
For the lower volume button:
+
ColorPalette2=#cccc00000000
  amixer set Master 5%-
+
ColorPalette3=#4e4e9a9a0606
For the mute button:
+
ColorPalette4=#c4c4a0a00000
  amixer set Master toggle
+
ColorPalette5=#34346565a4a4
 +
ColorPalette6=#757550507b7b
 +
ColorPalette7=#060698989a9a
 +
ColorPalette8=#d3d3d7d7cfcf
 +
ColorPalette9=#555557575353
 +
ColorPalette10=#efef29292929
 +
ColorPalette11=#8a8ae2e23434
 +
  ColorPalette12=#fcfce9e94f4f
 +
ColorPalette13=#72729f9fcfcf
 +
  ColorPalette14=#adad7f7fa8a8
 +
ColorPalette15=#3434e2e2e2e2
 +
  ColorPalette16=#eeeeeeeeecec
  
You can also run these commands to set the above commands to the standard XF86Audio keys:
+
=== Open URLs by middle mouse in terminal ===
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+"
+
On update to version 0.8 open URL with middle mouse turned off by default and just paste clip to cursor.
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%-"
+
To enable old behavior fix next option in {{ic|${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc}} ({{ic|<nowiki>XDG_CONFIG_HOME=${HOME}/.config</nowiki>}} by default)
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"
+
{{hc|${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc|<nowiki>[Configuration]
 +
MiscMiddleClickOpensUri=TRUE</nowiki>}}
  
If {{codeline|amixer set Master toggle}} does not work, try the PCM channel ({{codeline|amixer set PCM toggle}}) instead.
+
=== env-modules autocompletion in Terminal ===
 +
{{AUR|env-modules}} and {{AUR|env-modules-tcl}} packages provide shell autocompletion for login shell. However, by default sessions in {{ic|xfce4-terminal}} are not considered as ''login''. To enable autocompletion for Environment Modules tick corresponding checkbox in ''Preferences'' or just change {{ic|CommandLoginShell}} to {{ic|TRUE}} in {{ic|~/.config/xfce4/terminal/terminalrc}}.
  
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 {{codeline|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.
+
=== Colour management ===
  
==== OSS ====
+
Xfce has no native support for colour management. [https://bugzilla.xfce.org/show_bug.cgi?id=8559] See [[ICC profiles]] for alternatives.
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:
+
=== Multiple monitors ===
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 ====
+
Xfce has support for multiple monitors. Settings can be configured in the ''Applications > Settings > Display'' dialog. For more information, see the [http://docs.xfce.org/xfce/xfce4-settings/display display] article from the Xfce documentation.
  
[https://aur.archlinux.org/packages.php?ID=31693 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.
+
XFCE's display configuration is not persistent so you may find yourself needing to use the display tool a lot, especially if you use multiple displays. One workaround for this is to use {{pkg|arandr}} to easily configure your display configurations in the form of xrandr commands which you can assign to be executed as XFCE keyboard shortcuts.
  
=== Screenshots ===
+
=== SSH agents ===
  
==== Using print-screen key ====
+
By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:
  
A simple way is to use a command-line screenshot utility:
+
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
  
# pacman -S scrot
+
To force using ssh-agent even if gpg-agent is installed, run the following instead:
  
Then
+
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent
  
XFCE Menu  -->  Settings  -->  Keyboard  >>>  Application Shortcuts.
+
To use [[GNOME Keyring]], simply tick the checkbox ''Launch GNOME services on startup'' in the ''Advanced'' tab of ''Session and Startup'' in Xfce's settings. This will also disable gpg-agent and ssh-agent.
  
Add the "scrot" command to use the "PrintScreen" key.
+
Source: http://docs.xfce.org/xfce/xfce4-session/advanced
  
All screenshots will be placed in your home folder with unique names like
+
=== Scroll a background window without shifting focus on it ===
  
"2009-02-19-063052_1280x1024_scrot.png".
+
Go to ''Main Menu > Settings > Window Manager Tweaks > Accessibility'' tab.
 +
Uncheck ''Raise windows when any mouse button is pressed''.
  
====Screenshooter====
+
=== Mouse button modifier ===
  
There is also an a screenshot plugin for the Xfce panel, which can be used instead of scrot, that is available in extra:
+
By default, the mouse button modifier in Xfce is set to {{ic|Alt}}. This can be changed with ''xfconf-query''. For instance, the following command will set the {{ic|Super}} key as the mouse button modifier:
  
  # pacman -S xfce4-screenshooter
+
  $ xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Super"
  
You can add a keyboard binding for it using the command
+
Strictly speaking, using multiple modifiers is not supported. However, as a workaround, multiple modifiers can be specified if the key names are separated with {{ic|><}}. For instance, to set {{ic|Ctrl+Alt}} as the mouse button modifier, you can use the following command:
  
  xfce4-screenshooter -f
+
  $ xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Ctrl><Alt"
  
instead of "scrot". You will get a dialog window after pressing "Print" where you can copy the image to the clipboard or save it.
+
=== Set the two fingers click to middle click for a touchpad ===
  
=== Change mount options ===
+
{{Style|Convoluted way of simply configuring [[Touchpad Synaptics]]}}
  
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 {{Filename|/etc/xdg/xfce4/mount.rc}}:
+
If you want the 2 finger click on the touchpad to do a middle click, create or edit the following file:
  
[vfat]
+
{{hc|~/.config/xfce4/xfconf/xfce-perchannel-xml/pointers.xml|<nowiki>
uid=<auto>
+
<channel name="pointers" version="1.0">
shortname=winnt
+
  <property name="SynPS2_Synaptics_TouchPad" type="empty">
'''utf8=true'''
+
    <property name="Properties" type="empty">
# FreeBSD specific option
+
      <property name="Synaptics_Tap_Action" type="array">
longnames=true
+
        <value type="int" value="0"/>
 +
        <value type="int" value="0"/>
 +
        <value type="int" value="0"/>
 +
        <value type="int" value="0"/>
 +
        <value type="int" value="1"/>
 +
        <value type="int" value="2"/>
 +
        <value type="int" value="3"/>
 +
      </property>
 +
    </property>
 +
  </property>
 +
</channel>
 +
</nowiki>}}
  
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.
+
The 2 in the array is the middle click.
  
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.
+
=== Limit the minimum brightness of the brightness-slider ===
 +
Limiting the minimum brightness can be useful for displays which turn off backlight on a brightness level of 0. In {{ic|xfce4-power-manager 1.3.2}} a new hidden option had been introduced to set a minimum brightness value with a xfconf4-property. Add {{ic|brightness-slider-min-level}} as an int property in xfconf4. Adjust the int value to get a suitable minimum brightness level.
  
[vfat]
+
=== Adding profile pictures ===
flush=true
+
To add profile pictures for each user to be displayed in the whisker-menu, simply place a 96x96 PNG file in the respective user's home directory with the name {{ic|.face}}. For example the PNG file {{ic|/home/''bob''/.face}} for user ''bob''.
  
===Terminal tango color theme===
+
Image editing programs like [[GIMP]] can be used to convert and scale your favourite images down to 96x96.
Open with your favorite editor
 
  
  ~/.config/Terminal/terminalrc
+
=== Power manager plugin label ===
  
And add(replace) this lines:
+
The xfconf option {{ic|show-panel-label}} of type {{ic|int}} controls the label of the power manager, it can be configured for different label formats: it can be set to 0 (no label), 1 (percentage), 2 (remaining time) or 3 (both).
  
ColorForeground=White
+
It is also accessible through the power manager plugin GUI in ''Properties > Show label''
ColorBackground=#323232323232
 
ColorPalette1=#2e2e34343636
 
ColorPalette2=#cccc00000000
 
ColorPalette3=#4e4e9a9a0606
 
ColorPalette4=#c4c4a0a00000
 
ColorPalette5=#34346565a4a4
 
ColorPalette6=#757550507b7b
 
ColorPalette7=#060698989a9a
 
ColorPalette8=#d3d3d7d7cfcf
 
ColorPalette9=#555557575353
 
ColorPalette10=#efef29292929
 
ColorPalette11=#8a8ae2e23434
 
ColorPalette12=#fcfce9e94f4f
 
ColorPalette13=#72729f9fcfcf
 
ColorPalette14=#adad7f7fa8a8
 
ColorPalette15=#3434e2e2e2e2
 
ColorPalette16=#eeeeeeeeecec
 
  
 
== Troubleshooting ==
 
== Troubleshooting ==
=== Keyboard shortcuts are not working ===
 
Under Xfce 4.6 there is a problem where the user's [http://bugzilla.xfce.org/show_bug.cgi?id=5639 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.
+
=== Desktop icons rearrange themselves ===
 +
 
 +
At certain events (such as opening the panel settings dialog) icons on the desktop rearrange themselves. This is because icon positions are determined by files in the {{ic|~/.config/xfce4/desktop/}} directory. Each time a change is made to the desktop (icons are added or removed or change position) a new file is generated in this directory and these files can conflict.
 +
 
 +
To solve the problem, navigate to the directory and delete all the files other than the one which correctly defines the icon positions. You can determine which file defines the correct icon positions by opening it and examining the locations of the icons. The topmost row is defined as {{ic|row 0}} and the leftmost column is defined by {{ic|col 0}}. Therefore an entry of:
 +
 
 +
[Firefox]
 +
row=3
 +
col=0
 +
 
 +
means that the Firefox icon will be located on the 4th row of the leftmost column.
 +
 
 +
=== GTK themes not working with multiple monitors ===
 +
 
 +
{{Expansion|Which configuration tools? What does ''ceasing to work'' mean? Is it that new themes cannot be selected or that themes display incorrectly? Is there a bug report?}}
 +
 
 +
Some configuration tools may corrupt displays.xml, which results in GTK themes under ''Applications Menu > Settings > Appearance'' ceasing to work. To fix the issue, delete {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml}} and reconfigure your screens.
 +
 
 +
=== Icons do not appear in right-click menus ===
 +
 
 +
{{Note|Despite the deprecation of GConf, this method does still work.}}
 +
 
 +
Users may find that icons do not appear when right-clicking options within some applications, including those made with [[Qt]]. This problem only appears to happen within Xfce. Run these two commands:
 +
 
 +
$ gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true
 +
$ gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true
 +
 
 +
=== Modifying setting does not take effect ===
 +
 
 +
If you are running a separate [[Xsettingsd|Xsettings daemon]], it may make some configuration not taking effect. Disable it by removing or commenting the corresponding line and restart [[Xorg]].
 +
 
 +
=== NVIDIA and xfce4-sensors-plugin ===
 +
 
 +
To detect and use sensors of nvidia gpu you need to install {{Pkg|libxnvctrl}} and then rebuild {{Pkg|xfce4-sensors-plugin}} with [[ABS]]. You also have the option of using {{AUR|xfce4-sensors-plugin-nvidia}} which replaces {{Pkg|xfce4-sensors-plugin}}.
 +
 
 +
=== Black screens at boot with NVIDIA and multiple monitors ===
 +
 
 +
Using [[NVIDIA]], multiple monitors and [[NVIDIA/Troubleshooting#Avoid screen tearing]] may result as a black screen when booting Xfce. The screens' position conflict into the files {{ic|/etc/X11/xorg.conf}} and {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml}}. Deleting the {{ic|displays.xml}} file fixes the behavior.
 +
$ rm ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml
 +
 
 +
=== Panel applets keep being aligned on the left ===
 +
 
 +
Add a separator someplace before the right end and set its "expand" property. [https://forums.linuxmint.com/viewtopic.php?f=110&t=155602}]
 +
 
 +
=== Preferred Applications preferences have no effect ===
 +
 
 +
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.
  
Remove or rename the global autostart .desktop file:
+
In order for xdg-open and xdg-settings to detect and integrate with the Xfce desktop environment correctly, you need to [[install]] the {{Pkg|xorg-xprop}} package.
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:
+
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.
mv ~/.config/autostart/xfce4-settings-helper-autostart.desktop ~/.config/autostart/xfce4-settings-helper-autostart.desktop.disabled
+
Installing the package and allowing ''xdg-open'' to detect that you are running Xfce makes it forward all calls to ''exo-open'' instead, which correctly uses all your preferred applications preferences.
  
After logging out and logging back in, your shortcut keys should be working fine now.
+
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:
=== Thunar does not display any thumbnail ===
 
  
Thunar relies on '''Tumbler''' to generate thumbnails. You can install Tumbler by issuing
+
# xdg-settings get default-web-browser
  
pacman -S tumbler
+
If it replies with:
  
More details in [[Thunar#Thunar_Thumbnailers|Thunar's page]].
+
xdg-settings: unknown desktop environment
  
=== Locales ignored with GDM ===
+
it means that it has failed to detect Xfce as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.
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:
 
[User]
 
Language=hu_HU.UTF-8
 
XSession=xfce
 
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 ===
 
=== Restore default settings ===
If for any reason you need to revert back to the default settings, try renaming {{Filename|~/.config/xfce4-session/}} and {{Filename|~/.config/xfce4/}}
+
 
 +
If for any reason you need to revert back: to the default settings, rename {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}
  
 
  $ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak
 
  $ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak
 
  $ mv ~/.config/xfce4/ ~/.config/xfce4-bak
 
  $ mv ~/.config/xfce4/ ~/.config/xfce4-bak
  
Logout and login for changes to take effect.
+
Relogin for changes to take effect. If you get {{ic|Unable to load a failsafe session}} upon login, see the [[#Session failure]] section.
 +
 
 +
=== Session failure ===
 +
 
 +
Symptoms include:
 +
 
 +
* The mouse is an X and/or does not appear at all;
 +
* Window decorations have disappeared and windows cannot be closed;
 +
* ({{ic|xfwm4-settings}}) will not start, reporting {{ic|These settings cannot work with your current window manager (unknown)}};
 +
* Errors reported by a [[display manager]] such as {{ic|No window manager registered on screen 0}}.
 +
* Unable to load a failsafe session:
 +
 
 +
Unable to load a failsafe session.
 +
Unable to determine failsafe session name.  Possible causes: xfconfd isn't running (D-Bus setup problem); environment variable $XDG_CONFIG_DIRS is set incorrectly (must include "/etc"), or xfce4-session is installed incorrectly.
 +
 
 +
Restarting Xfce or rebooting your system may solve the problem, but a corrupt session could also be the cause. Delete the session folder:
 +
 
 +
$ rm -r ~/.cache/sessions/
 +
 
 +
Also make sure that the relevant folders in {{ic|$HOME}} are owned by the user starting {{ic|xfce4}}. See [[Chown]].
 +
 
 +
=== Fonts in window title crashing xfce4-title ===
 +
 
 +
Install {{Pkg|ttf-droid}} and {{Pkg|ttf-dejavu}}. See also {{Bug|44382}}.
 +
 
 +
=== Laptop lid settings ignored ===
 +
 
 +
You may find that the lid close settings in Xfce4 Power Manager are ignored, meaning that the laptop will always suspend on lid close, no matter what settings are chosen in the power manager. This is because the power manager is not set to handle lid close events by default. Instead, ''systemd-logind'' handles the lid close event. To change this behavior so that the power manager handles lid close events, execute the following command:
 +
$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false
 +
 
 +
{{Note|Under some circumstances, the {{ic|logind-handle-lid-switch}} setting will get set to true when changes are made to the laptop lid actions or the lock on suspend setting. See [https://bugzilla.xfce.org/show_bug.cgi?id&#61;12756#c2]. In this case, you will need to toggle {{ic|logind-handle-lid-switch}} to false again.}}
 +
 
 +
=== User switching action button is greyed out ===
 +
 
 +
The ''Switch User'' action button assumes that the ''gdmflexiserver'' executable (provided by [[GDM]]) exists. Thus, if GDM is not being used then the button will be greyed out. See the [https://bugzilla.xfce.org/show_bug.cgi?id=9307 upstream bug report].
 +
 
 +
A possible workaround is to create an executable script called ''gdmflexiserver'' in {{ic|/usr/bin}} or {{ic|/usr/local/bin}} which calls the greeter switch command provided by the [[display manager]] which is being used.
 +
 
 +
* For LXDM - [[LXDM#Simultaneous users and switching users]].
 +
* For LightDM - [[LightDM#User switching]].
 +
 
 +
=== Macros in .Xresources not working ===
 +
 
 +
Xfce loads {{ic|$HOME/.Xresources}} file using {{ic|xrdb}}, but with {{ic|-nocpp}} option to skip preprocessing. For macros to work properly, copy {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|$HOME/.config/xfce4}} directory and remove {{ic|-nocpp}} option to {{ic|xrdb}} from the resulting file. See [https://bbs.archlinux.org/profile.php?id=104121 this thread]{{Dead link|2020|04|03|status=403}}.
 +
 
 +
=== Cursor theme doesn't change on login ===
 +
 
 +
Ensure the systemwide XDG cursor is set to your desired cursor theme - see [[Cursor themes#XDG specification]].
 +
 
 +
=== Mousepad editor menu bar is not visible ===
 +
Run {{ic|gsettings set org.xfce.mousepad.preferences.window menubar-visible true}} to make it visible.
 +
 
 +
=== Trash icon not visible and trash applet does not work ===
 +
 
 +
Trash requires the optional dependency gvfs to work.  Install {{Pkg|gvfs}} and reboot the system.
 +
 
  
== Related Articles ==
+
== See also ==
* [[Thunar]]
 
* [[Build order for XFCE]]
 
* [[Improve GTK Application Looks]]
 
* [[Autostart applications#Graphical]]
 
  
== External Resources ==
+
* [http://docs.xfce.org/ Xfce - Documentation]
* http://docs.xfce.org/ - The complete documentation.
+
* [http://wiki.xfce.org Xfce - Wiki]
 +
* [http://www.xfce.org/about/ Xfce - About]
 +
* [https://xfce.org/about/tour Xfce - Tour]
 +
* [[Wikipedia:Xfce]]
 
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.
 
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] -  How to edit the auto generated menu with the menu editor
+
* [http://xfce.wikia.com/wiki/Main_Page Xfce Wikia]
* [http://wiki.xfce.org Xfce Wiki]
 

Latest revision as of 17:20, 3 April 2020

Xfce is a lightweight and modular desktop environment currently based on both GTK 2 and GTK 3. To provide a complete user experience, it includes a window manager, a file manager, desktop and panel.

Contents

Installation

Install the xfce4 group. You may also wish to install the xfce4-goodies group which includes extra plugins and a number of useful utilities such as the mousepad editor. Xfce uses the Xfwm window manager by default.

Starting

Choose Xfce Session from the menu in a display manager of choice, or add exec startxfce4 to Xinitrc.

Note: Do not call the xfce4-session executable directly; startxfce4 is the correct command which, in turn, calls the former when appropriate.

Configuration

Xfce stores configuration options in Xfconf. There are several ways to modify these options:

  • In the main menu, select Settings and the category you want to customize. Categories are programs usually located in /usr/bin/xfce4-* and /usr/bin/xfdesktop-settings.
  • xfce4-settings-editor can see and modify all settings. Options modified here will take effect immediately. Use xfconf-query to change settings from the commandline; see the documentation for details.
  • Settings are stored in XML files in ~/.config/xfce4/xfconf/xfce-perchannel-xml/ which can be edited by hand. However, changes made here will not take effect immediately.

Menu

See Xdg-menu for more info on using the Free Desktop menu system.

Whisker menu

xfce4-whiskermenu-plugin (also part of xfce4-goodies) is an alternative application launcher. It shows a list of favorites, browses through all installed applications through category buttons, and supports fuzzy searching. After package being installed, it can replace Applications Menu as first item in Panel 1 (in Settings > Panel > Items add Whisker Menu).

Edit entries

A number of graphical tools are available for this task:

  • MenuLibre — An advanced menu editor that provides modern features in a clean, easy-to-use interface.
https://launchpad.net/menulibre || menulibreAUR.
  • Alacarte — Menu editor for GNOME
http://www.gnome.org/ || alacarte
  • XAME (XFCE Applications Menu Editor) — GUI tool written in Gambas designed specifically for editing menu entries in Xfce, it will not work in other environments. (Discontinued)
http://redsquirrel87.altervista.org/doku.php/xfce-applications-menu-editor || xameAUR

Alternatively, create the file ~/.config/menus/xfce-applications.menu manually. See the example configuration below:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
  "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd[dead link 2020-04-03 ⓘ]">

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

    <Exclude>
        <Filename>xfce4-run.desktop</Filename>
        <Filename>exo-terminal-emulator.desktop</Filename>
        <Filename>exo-file-manager.desktop</Filename>
        <Filename>exo-mail-reader.desktop</Filename>
        <Filename>exo-web-browser.desktop</Filename>
        <Filename>xfce4-about.desktop</Filename>
        <Filename>xfhelp4.desktop</Filename>
    </Exclude>

    <Layout>
        <Merge type="all"/>
        <Separator/>
        <Menuname>Settings</Menuname>
        <Separator/>
        <Filename>xfce4-session-logout.desktop</Filename>
    </Layout>
</Menu>

The <MergeFile> tag includes the default Xfce menu.

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 firefox.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 Xfce wiki.

You can also make changes to the Xfce menu by editing the .desktop files themselves. To hide entries, see Desktop entries#Hide desktop entries. You can edit the application's category by modifying the Categories= line of the desktop entry, see Desktop entries#File example.

Desktop

Transparent background for icon titles

To change the default white background of desktop icon titles to something more suitable, create or edit ~/.gtkrc-2.0:

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

Remove desktop icons

Issue the following command:

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

To reinstate icons on the desktop, issue the same command with a value of 2.

One wallpaper across multihead

Open xfce4-settings-editor and create a new property with the following settings:

Property: /backdrop/screen0/xinerama-stretch
Type: Boolean
Value: TRUE|1|Enabled

Kill window shortcut

Xfce does not have a shortcut to kill a window, for example when a program freezes.

With xorg-xkill, use xkill to interactively kill a window. For the currently active window, use xdotool:

$ xdotool getwindowfocus windowkill

Alternatively:

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

To add the shortcut, use Settings > Keyboard or an application like xbindkeys.

Session

Autostart

To launch custom applications when Xfce starts up, click the Applications Menu > Settings > Settings Manager and then choose the Session and Startup option and click the tab Application Autostart. You will see a list of programs that get launched on startup. To add an entry, click the Add button and fill out the form, specifying the path to an executable you want to run.

Autostart applications are stored as name.desktop in ~/.config/autostart/.

Alternatively, add the commands you wish to run (including setting environment variables) to xinitrc (or xprofile when a display manager is being used).

Tip: Sometimes it might be useful to delay the startup of an application. Note that specifying under Application > Autostart a command such as sleep 3 && command does not work; a workaround is to use the syntax sh -c "sleep 3 && command"

Lock the screen

xflock4 is the reference Bash script which is used to lock an Xfce session.

It tries to lock the screen with either xfce4-screensaver (also part of xfce4-goodies), xscreensaver, gnome-screensaver, slock or xlockmore. It consecutively looks for the corresponding binary or exits with return code 1 if it fails to find any of these.

The List of applications/Security#Screen lockers contains a short description of these screen lockers together with other popular applications. There is in this list an alternative locker, light-locker, which integrates particularly well with xfce4-power-manager. Once it is installed, Xfce Power Manager's setting gains an additional Security tab to configure light-locker and the existing Lock screen when system is going for sleep setting is relocated under this tab. In this new GUI it is possible to set whether the session should be locked upon screensaver activity or whenever the system goes to sleep.

To have xflock4 run light-locker or any custom session locker, not among the five cited above, one must set LockCommand in the session's xfconf channel to the command line to be used (the command inside the quotes in the following example can be adapted accordingly for other screen lockers):

$ xfconf-query -c xfce4-session -p /general/LockCommand -s "light-locker-command --lock" --create -t string

The panel lock button in the Action Buttons panel simply executes /usr/bin/xflock4. It should work as expected as long as xflock4 is functioning i.e. one of the native lockers is installed or a custom locker is configured to integrate with it as proposed above.

Suspend

Whenever asked to suspend, Xfce executes the xfce4-session-logout(1) command with the suspend option:

$ xfce4-session-logout --suspend

Whether or not the session is systematically locked on suspend can be configured through the xfconf properties or from the GUI.

To control this state using the CLI: there are two settings that are used, LockScreen and lock-screen-suspend-hibernate, in respectively the session and the power manager xfconf channels. To prevent locking on suspend, turn them to false:

$ xfconf-query -c xfce4-session -p /shutdown/LockScreen -s false
$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/lock-screen-suspend-hibernate -s false

Similarly, turn them to true to lock the session on suspend.

The setting can also be controlled from the GUI: open the Session and Startup application and turn the flag Advanced > Lock screen before sleep on or off.

Whenever the suspend keyboard button is pressed, it can be handled by either Xfce's power manager or by systemd-logind. To give precedence to logind, the following xfconf setting must be set to true:

$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-suspend-key -n -t bool -s true
Note: To check how systemd-logind handles events whenever it has precedence over Xfce, check logind.conf(5)

Disable saved sessions

Per user, saved sessions can be disabled by executing the following:

$ xfconf-query -c xfce4-session -p /general/SaveOnExit -s false

Then navigate to Applications > Settings > Session and Startup > Sessions and press the Clear saved sessions button to remove all previously saved sessions.

Tip: If the command above does not change the setting persistently, use the following command instead: xfconf-query -c xfce4-session -p /general/SaveOnExit -n -t bool -s false

Alternatively, Xfce kiosk mode can be used to disable the saving of sessions systemwide. To disable sessions, create or edit the file /etc/xdg/xfce4/kiosk/kioskrc and add the following:

[xfce4-session]
SaveSession=NONE

If kiosk mode is not working, the user can set read only permissions for the sessions directory:

$ rm ~/.cache/sessions/* && chmod 500 ~/.cache/sessions

This will prevent Xfce from saving any sessions despite any configuration that specifies otherwise.

Use a different window manager

Note: For the changes to take effect, you will need to clear the saved sessions and ensure that session saving is disabled when logging out for the first time. Once the window manager of choice is running, session saving can be enabled again.

The files specifying the default window manager are found in the following locations:

  • ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml - per user
  • /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml - systemwide

The default window manager for the user can be set easily using xfconf-query:

$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa xfsettingsd
$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -sa wm_name

If you want to start the window manager with command line options, see the commands below:

$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -t string -sa xfsettingsd
$ xfconf-query -c xfce4-session -p /sessions/Failsafe/Client1_Command -t string -s wm_name -t string -s --wm-option

If you need more command line options, simply add more -t string and -s --wm-option arguments to the command.

If you want to change the default window manager systemwide, edit the file specified above manually, changing xfwm4 to the preferred window manager and adding more <value type="string" value="--wm-option"/> lines for extra command line options if needed.

You can also change the window manager by autostarting wm_name --replace using the autostart facility or by running wm_name --replace & in a terminal and making sure the session is saved on logout. Be aware though that this method does not truly change the default manager, it merely replaces it at login. Note that if you are using the autostart facility, you should disable saved sessions as this could lead to the new window manager being started twice after the default window manager.

Theming

XFCE themes are available at xfce-look.org. Xfwm themes are stored in /usr/share/themes/xfce4, and set in Settings > Window Manager. GTK themes are set in Settings > Appearance.

To achieve a uniform look for all applications, see Uniform look for Qt and GTK applications.

See also Cursor themes, Icons, and Font configuration.

Sound

Sound themes

XFCE4 supports freedesktop system sounds, but it is not configured out of the box.

To enable a sound theme:

  1. Install libcanberra and libcanberra-pulse for PulseAudio support;
  2. "canberra-gtk-module" should be in the GTK_MODULES environment variable (re-login may be required);
  3. Check "Enable event sounds" in Settings Manager → Appearance → Settings tab;
  4. In the Settings Editor set "xsettings/Net/SoundThemeName" to a sound theme located in /usr/share/sounds/;
  5. Turn on "System Sounds" in audio mixer (e.g. pavucontrol).

sound-theme-freedesktop provides a compatible sound theme, but it lacks many required events. A better choice is sound-theme-smoothAUR (SoundThemeName should be "Smooth").

Keyboard volume buttons

xfce4-pulseaudio-plugin provides a panel applet which has support for keyboard volume control and volume notifications. As an alternative, you can install xfce4-volumed-pulseAUR, which also provides keybinding and notification control, but without an icon sitting in the panel. This is handy, for example, when using pasystray at the same time for a finer control.

Alternatively, xfce4-mixerAUR also provides a panel applet and keyboard shortcuts which supports Alsa as well. Note however, that it is based on a feature of GStreamer 0.10 which has been abandoned in 1.0.

After installing the panels, you have to add it to the taskbar or the keyboard shortcuts will not work.

For non desktop environment specific alternatives, see List of applications/Multimedia#Volume control.

Shortcuts

If you are not using an applet or daemon that controls the volume keys, you can map volume control commands to your volume keys manually using Xfce's keyboard settings. For the sound system you are using, see the sections linked to below for the appropriate commands.

Keyboard Shortcuts

Keyboard shortcuts are defined in two places: Settings > Window Manager > Keyboard, and Settings > Keyboard > Shortcuts.

Polkit Authentication Agent

The polkit-gnome agent will be installed along with xfce4-session and autostarted automatically; no user intervention is required. For more information, see Polkit#Authentication agents.

A third party polkit authentication agent for Xfce is also available, see xfce-polkitAUR or xfce-polkit-gitAUR.

Display blanking

Some programs that are commonly used with Xfce will control monitor blanking and DPMS (monitor powersaving) settings. They are discussed below.

Xfce Power Manager

Xfce Power Manager controls blanking and DPMS settings. These settings can be configured in the Power Manager GUI within the Display tab.

Note that when Display power management is turned off, DPMS is fully disabled, it does not mean that Power Manager will simply stop controlling DPMS. It does not disable screen blanking either. To disable both blanking and DPMS, right click on the power manager system tray icon or left click on the panel applet and make sure that the option labelled Presentation mode is ticked.

XScreenSaver

If xscreensaver is installed and runs alongside Xfce Power Manager, it may not be clear which application is in control of blanking and DPMS as both are competing for control of the same settings. Therefore, in a situation where it is important that the monitor not be blanked (when watching a video for instance), it is advisable to disable blanking and DPMS through both applications. To know more about XScreenSaver options, see XScreenSaver#DPMS and blanking settings.

xset

If neither of the above applications are running, then blanking and DPMS settings can be controlled using the xset command, see DPMS#Modify DPMS and screensaver settings with a command.

Note: There are some issues associated with blanking and resuming from blanking in some configurations. See [1][2].

Tips and tricks

Mounting support for Thunar and xfdesktop

If plugged external drives does not appear and installation partitions are shown as mounted devices, on the desktop and in Thunar, install gvfs. See Udisks#Hide selected partitions and Thunar#Automounting of large external drives for more advanced configuration options.

Screenshots

Xfce has its own screenshot tool, xfce4-screenshooter. It is part of the xfce4-goodies group.

Go to Applications > Settings > Keyboard, Application Shortcuts. Add the xfce4-screenshooter -f (or -w for the active window) command to use the Print key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.

Alternatively, an independent screenshot program like scrot can be used.

Disable Terminal F1 and F11 shortcuts

The xfce terminal binds F1 and F11 to help and fullscreen, respectively, which can make using programs like htop difficult. To disable those shortcuts, create or edit its configuration file, then log out and log back in. F10 can disabled in the Preferences menu.

~/.config/xfce4/terminal/accels.scm
(gtk_accel_path "<Actions>/terminal-window/fullscreen" "")
(gtk_accel_path "<Actions>/terminal-window/contents" "")

Terminal color themes or palettes

Terminal color themes or palettes can be changed in GUI under Appearance tab in Preferences. These are the colors that are available to most console applications like Emacs, Vi and so on. Their settings are stored individually for each system user in ~/.config/xfce4/terminal/terminalrc file. There are also so many other themes to choose from. Check forum thread Terminal Colour Scheme Screenshots for hundreds of available choices and themes.

Changing default color theme

Xfce's extra/terminal package comes with a darker colour palette. To change this, append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.

~/.config/xfce4/terminal/terminalrc
ColorPalette5=#38d0fcaaf3a9
ColorPalette4=#e013a0a1612f
ColorPalette2=#d456a81b7b42
ColorPalette6=#ffff7062ffff
ColorPalette3=#7ffff7bd7fff
ColorPalette13=#82108210ffff

Terminal tango color theme

To switch to tango color theme, open with your favorite editor

~/.config/xfce4/terminal/terminalrc

And add(replace) these lines:

ColorForeground=White
ColorBackground=#323232323232
ColorPalette1=#2e2e34343636
ColorPalette2=#cccc00000000
ColorPalette3=#4e4e9a9a0606
ColorPalette4=#c4c4a0a00000
ColorPalette5=#34346565a4a4
ColorPalette6=#757550507b7b
ColorPalette7=#060698989a9a
ColorPalette8=#d3d3d7d7cfcf
ColorPalette9=#555557575353
ColorPalette10=#efef29292929
ColorPalette11=#8a8ae2e23434
ColorPalette12=#fcfce9e94f4f
ColorPalette13=#72729f9fcfcf
ColorPalette14=#adad7f7fa8a8
ColorPalette15=#3434e2e2e2e2
ColorPalette16=#eeeeeeeeecec

Open URLs by middle mouse in terminal

On update to version 0.8 open URL with middle mouse turned off by default and just paste clip to cursor. To enable old behavior fix next option in ${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc (XDG_CONFIG_HOME=${HOME}/.config by default)

${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc
[Configuration]
MiscMiddleClickOpensUri=TRUE

env-modules autocompletion in Terminal

env-modulesAUR and env-modules-tclAUR packages provide shell autocompletion for login shell. However, by default sessions in xfce4-terminal are not considered as login. To enable autocompletion for Environment Modules tick corresponding checkbox in Preferences or just change CommandLoginShell to TRUE in ~/.config/xfce4/terminal/terminalrc.

Colour management

Xfce has no native support for colour management. [3] See ICC profiles for alternatives.

Multiple monitors

Xfce has support for multiple monitors. Settings can be configured in the Applications > Settings > Display dialog. For more information, see the display article from the Xfce documentation.

XFCE's display configuration is not persistent so you may find yourself needing to use the display tool a lot, especially if you use multiple displays. One workaround for this is to use arandr to easily configure your display configurations in the form of xrandr commands which you can assign to be executed as XFCE keyboard shortcuts.

SSH agents

By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:

xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false

To force using ssh-agent even if gpg-agent is installed, run the following instead:

xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent

To use GNOME Keyring, simply tick the checkbox Launch GNOME services on startup in the Advanced tab of Session and Startup in Xfce's settings. This will also disable gpg-agent and ssh-agent.

Source: http://docs.xfce.org/xfce/xfce4-session/advanced

Scroll a background window without shifting focus on it

Go to Main Menu > Settings > Window Manager Tweaks > Accessibility tab. Uncheck Raise windows when any mouse button is pressed.

Mouse button modifier

By default, the mouse button modifier in Xfce is set to Alt. This can be changed with xfconf-query. For instance, the following command will set the Super key as the mouse button modifier:

$ xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Super"

Strictly speaking, using multiple modifiers is not supported. However, as a workaround, multiple modifiers can be specified if the key names are separated with ><. For instance, to set Ctrl+Alt as the mouse button modifier, you can use the following command:

$ xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Ctrl><Alt"

Set the two fingers click to middle click for a touchpad

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Convoluted way of simply configuring Touchpad Synaptics (Discuss in Talk:Xfce#)

If you want the 2 finger click on the touchpad to do a middle click, create or edit the following file:

~/.config/xfce4/xfconf/xfce-perchannel-xml/pointers.xml
<channel name="pointers" version="1.0">
  <property name="SynPS2_Synaptics_TouchPad" type="empty">
    <property name="Properties" type="empty">
      <property name="Synaptics_Tap_Action" type="array">
        <value type="int" value="0"/>
        <value type="int" value="0"/>
        <value type="int" value="0"/>
        <value type="int" value="0"/>
        <value type="int" value="1"/>
        <value type="int" value="2"/>
        <value type="int" value="3"/>
      </property>
    </property>
  </property>
</channel>

The 2 in the array is the middle click.

Limit the minimum brightness of the brightness-slider

Limiting the minimum brightness can be useful for displays which turn off backlight on a brightness level of 0. In xfce4-power-manager 1.3.2 a new hidden option had been introduced to set a minimum brightness value with a xfconf4-property. Add brightness-slider-min-level as an int property in xfconf4. Adjust the int value to get a suitable minimum brightness level.

Adding profile pictures

To add profile pictures for each user to be displayed in the whisker-menu, simply place a 96x96 PNG file in the respective user's home directory with the name .face. For example the PNG file /home/bob/.face for user bob.

Image editing programs like GIMP can be used to convert and scale your favourite images down to 96x96.

Power manager plugin label

The xfconf option show-panel-label of type int controls the label of the power manager, it can be configured for different label formats: it can be set to 0 (no label), 1 (percentage), 2 (remaining time) or 3 (both).

It is also accessible through the power manager plugin GUI in Properties > Show label

Troubleshooting

Desktop icons rearrange themselves

At certain events (such as opening the panel settings dialog) icons on the desktop rearrange themselves. This is because icon positions are determined by files in the ~/.config/xfce4/desktop/ directory. Each time a change is made to the desktop (icons are added or removed or change position) a new file is generated in this directory and these files can conflict.

To solve the problem, navigate to the directory and delete all the files other than the one which correctly defines the icon positions. You can determine which file defines the correct icon positions by opening it and examining the locations of the icons. The topmost row is defined as row 0 and the leftmost column is defined by col 0. Therefore an entry of:

[Firefox]
row=3
col=0

means that the Firefox icon will be located on the 4th row of the leftmost column.

GTK themes not working with multiple monitors

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

Reason: Which configuration tools? What does ceasing to work mean? Is it that new themes cannot be selected or that themes display incorrectly? Is there a bug report? (Discuss in Talk:Xfce#)

Some configuration tools may corrupt displays.xml, which results in GTK themes under Applications Menu > Settings > Appearance ceasing to work. To fix the issue, delete ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml and reconfigure your screens.

Icons do not appear in right-click menus

Note: Despite the deprecation of GConf, this method does still work.

Users may find that icons do not appear when right-clicking options within some applications, including those made with Qt. This problem only appears to happen within Xfce. Run these two commands:

$ gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true
$ gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true

Modifying setting does not take effect

If you are running a separate Xsettings daemon, it may make some configuration not taking effect. Disable it by removing or commenting the corresponding line and restart Xorg.

NVIDIA and xfce4-sensors-plugin

To detect and use sensors of nvidia gpu you need to install libxnvctrl and then rebuild xfce4-sensors-plugin with ABS. You also have the option of using xfce4-sensors-plugin-nvidiaAUR which replaces xfce4-sensors-plugin.

Black screens at boot with NVIDIA and multiple monitors

Using NVIDIA, multiple monitors and NVIDIA/Troubleshooting#Avoid screen tearing may result as a black screen when booting Xfce. The screens' position conflict into the files /etc/X11/xorg.conf and ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml. Deleting the displays.xml file fixes the behavior.

$ rm ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml

Panel applets keep being aligned on the left

Add a separator someplace before the right end and set its "expand" property. [4]

Preferred Applications preferences have no effect

Most applications rely on xdg-open for opening a preferred application for a given file or URL.

In order for xdg-open and xdg-settings to detect and integrate with the Xfce desktop environment correctly, you need to install the xorg-xprop package.

If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed. Installing the package and allowing xdg-open to detect that you are running Xfce makes it forward all calls to exo-open instead, which correctly uses all your preferred applications preferences.

To make sure xdg-open integration is working correctly, ask xdg-settings for the default web browser and see what the result is:

# xdg-settings get default-web-browser

If it replies with:

xdg-settings: unknown desktop environment

it means that it has failed to detect Xfce as your desktop environment, which is likely due to a missing xorg-xprop package.

Restore default settings

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

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

Relogin for changes to take effect. If you get Unable to load a failsafe session upon login, see the #Session failure section.

Session failure

Symptoms include:

  • The mouse is an X and/or does not appear at all;
  • Window decorations have disappeared and windows cannot be closed;
  • (xfwm4-settings) will not start, reporting These settings cannot work with your current window manager (unknown);
  • Errors reported by a display manager such as No window manager registered on screen 0.
  • Unable to load a failsafe session:
Unable to load a failsafe session.
Unable to determine failsafe session name.  Possible causes: xfconfd isn't running (D-Bus setup problem); environment variable $XDG_CONFIG_DIRS is set incorrectly (must include "/etc"), or xfce4-session is installed incorrectly. 

Restarting Xfce or rebooting your system may solve the problem, but a corrupt session could also be the cause. Delete the session folder:

$ rm -r ~/.cache/sessions/

Also make sure that the relevant folders in $HOME are owned by the user starting xfce4. See Chown.

Fonts in window title crashing xfce4-title

Install ttf-droid and ttf-dejavu. See also FS#44382.

Laptop lid settings ignored

You may find that the lid close settings in Xfce4 Power Manager are ignored, meaning that the laptop will always suspend on lid close, no matter what settings are chosen in the power manager. This is because the power manager is not set to handle lid close events by default. Instead, systemd-logind handles the lid close event. To change this behavior so that the power manager handles lid close events, execute the following command:

$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false
Note: Under some circumstances, the logind-handle-lid-switch setting will get set to true when changes are made to the laptop lid actions or the lock on suspend setting. See [5]. In this case, you will need to toggle logind-handle-lid-switch to false again.

User switching action button is greyed out

The Switch User action button assumes that the gdmflexiserver executable (provided by GDM) exists. Thus, if GDM is not being used then the button will be greyed out. See the upstream bug report.

A possible workaround is to create an executable script called gdmflexiserver in /usr/bin or /usr/local/bin which calls the greeter switch command provided by the display manager which is being used.

Macros in .Xresources not working

Xfce loads $HOME/.Xresources file using xrdb, but with -nocpp option to skip preprocessing. For macros to work properly, copy /etc/xdg/xfce4/xinitrc to $HOME/.config/xfce4 directory and remove -nocpp option to xrdb from the resulting file. See this thread[dead link 2020-04-03 ⓘ].

Cursor theme doesn't change on login

Ensure the systemwide XDG cursor is set to your desired cursor theme - see Cursor themes#XDG specification.

Mousepad editor menu bar is not visible

Run gsettings set org.xfce.mousepad.preferences.window menubar-visible true to make it visible.

Trash icon not visible and trash applet does not work

Trash requires the optional dependency gvfs to work. Install gvfs and reboot the system.


See also