Xfce

From Gentoo Wiki
Jump to: navigation, search
This page is a translated version of the page Xfce and the translation is 1% complete.

Other languages:
English • ‎español • ‎français • ‎italiano • ‎português do Brasil • ‎русский • ‎فارسی • ‎中文(中国大陆)‎ • ‎日本語 • ‎한국어

Pour citer xfce.org: "Xfce est un environnement de bureau léger pour les systèmes d'exploitation Unix-like. Son but est d'être rapide et d'utiliser de moins de ressources système, tout en restant visuellement attractif et simple d'utilisation."

Installation

Éviter les dépendances inutiles

Eviter les paquets optionnel de GNOME gardera votre système léger et consistant. Cette section est entièrement optionnelle; Procédez de cette manière si votre but est de garder votre système léger plutôt que lourd.

Assurez-vous d'utiliser le profil basique "desktop" :

root #eselect profile set default/linux/amd64/13.0/desktop

app-text/poppler a +qt5 par défaut:

FILE /etc/portage/package.use/xfceDésactiver le USE flag qt5 pour poppler
app-text/poppler -qt5

Bien sûr, -qt5 peut aussi être définit globallement dans /etc/portage/make.conf si on le désire.

Emerge

C'est le moment d'installer Xfce !

Sans inclure explicitement xfce-extra/xfce4-notifyd dans la commande emerge, virtual/notification-daemon s'appuiera sur x11-misc/notification-daemon de GNOME à la place. Donc installez le conjointement à xfce-base/xfce4-meta et déselectionnez le plus tard afin qu'il soit exclu du fichier world:

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

Bien sûr, il est aussi possible de ne choisir que les paquets requis:

root #emerge --ask xfce-base/xfwm4 xfce-base/xfce4-panel

Configuration

Gestionnaire de connexion (Display manager )

Il est possible d'utiliser un gestionnaire de connexion pour démarrer Xfce. Veuillez vous référer à l'article display manager pour en configurer un.

La plupart des gestionnaire de connexion utilise les fichiers

  • .desktop pour configurer les sessions. Voici un exemple de fichier desktop:
FILE xfce4.desktopXfce4 desktop file for display managers
[Desktop Entry]
Encoding=UTF-8
Name=Xfce4
Comment=Utilisez cette session pour éxécuter Xfce 4 comme environnement de bureau
Exec=/usr/bin/startxfce4
Icon=/usr/share/pixmaps/xfce4_xicon1.png
Type=Application

Le fichier Desktop doit ensuite être placé au bon endroit pour le gestionnaire de connexion.

Démarrer Xfce sans gestionnaire de connexion (display manager)

startx et startxfce4 sont des alternatives disponibles pour démarrer Xfce sans utiliser un gestionnaire de connexion.

startx

Pour utiliser startx, créez un fichier ~/.xinitrc contenant:

FILE ~/.xinitrcDémarrer xfce4 avec startx
exec startxfce4

Si vous rencontrez des problèmes d'autorisations ou de permissions avec xfce4 avec un profil OpenRC (ouverture du gestionnaire d'alimentation impossible, la veille ne marche pas...), assurez-vous que le paquet sys-auth/consolekit a été emergé avec le USE flag pm-utils. Puis modifier la ligne d'au dessus dans ~/.xinitrc par (Consultez cette entrée de Gentoo Forums pour plus d'informations):

FILE ~/.xinitrcStarting xfce4 the right way when invoking startx
ck-launch-session dbus-launch --sh-syntax --exit-with-session xfce4-session

startxfce4

To launch the Xfce4 desktop simply type startxfce4 at the command-line and press enter:

user $startxfce4

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

Volume keys

xfce4-volumed

Install xfce-extra/xfce4-volumed to manage the volume keys (deprecated - Suggested replacements include media-sound/tudor-volumed or use key binds in a Window Manager or mixer):

root #emerge --ask xfce-extra/xfce4-volumed

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

root #emerge --ask xfce-extra/xfce4-volumed-pulse

Keyboard shortcuts

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

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

Consistent GTK+ 3 themes

Native Xfce theme engine

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

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

If not simply:

root #emerge --ask x11-themes/gtk-engines-xfce

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

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

Greybird theme

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

root #emerge --ask x11-themes/greybird

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

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

Other themes

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

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

Additional applications

There are a number of additional applications that are part of Xfce.

Package Description
x11-terms/xfce4-terminal A popular terminal emulator for Xfce; superior to the standard xterm program.
xfce-base/xfce4-appfinder Application finder.
xfce-base/thunar Xfce's file manager.
xfce-extra/xfce4-mixer Volume control. (deprecated and removed from Gentoo - Pulseaudio users can install xfce-extra/xfce4-pulseaudio-plugin. Others can install media-sound/volumeicon or similar tray audio mixer)
xfce-extra/thunar-volman Manages removable media and drives.
xfce-extra/tumbler File previewer for Thunar.
xfce-extra/thunar-archive-plugin Plugin for Thunar to work with archives; uses app-arch/file-roller.
xfce-extra/xfce4-battery-plugin Displays battery percentage, time remaining, power source (AC or battery), fan status, warnings, and can even be configured to execute commands at certain power levels, which can be used to put the laptop into hibernate mode when the battery is almost exhausted.
xfce-extra/xfce4-verve-plugin A small command line embedded into the panel; quicker than opening up another terminal to run a command.
xfce-extra/xfce4-mount-plugin One-click mounting of devices listed in /etc/fstab.
xfce-extra/xfce4-sensors-plugin Monitor hardware sensors, such as CPU temperature, fan RPM, hard drive temp, motherboard voltage, and more.
x11-themes/xfwm4-themes Several window-manager themes.
xfce-extra/xfce4-power-manager An application to monitor and manage power usage (especially important for laptops). Choose maximum-performance or battery-saving modes. Adjust screen brightness and setup hibernate, suspend, and shutdown actions (i.e., when the lid is shut or buttons are pressed). Can warn when the battery reaches certain levels, or even turn off the machine. Includes panel plugins to display battery/charging status, and control brightness.

The following applications work well in Xfce and round out a basic desktop environment.

Package Description
app-editors/mousepad Lightweight text editor.
app-cdr/xfburn CD burning application.
x11-misc/alacarte GNOME's menu editor works fine in Xfce.
x11-terms/tilda Lightweight quake-style terminal emulator.
app-office/orage Simple calendar.

Troubleshooting

Enable vertical window snapping

Most modern desktop environments have vertical window snapping enabled by default. This is also possible in Xfce, but not by default. To enable, navigate to: SettingsWindow managerAdvanced tab.

  • Make sure the "Snap windows to screen border" checkbox has been checked.
  • Make sure the checkboxes under "Wrap workspaces when reaching the screen edge" have been unchecked. These interfere with vertical window snapping.

Once the checkboxes are set it should be now possible to drag a window to the right or left side of the screen, which should cause the window to resize to 50% of the screen width.

Keyboard shortcuts can be set in order to do this via the typical Super+ or Super+ behavior. Navigate to SettingsWindow managerKeyboard tab.

Set the "Tile window to the left" and "Tile window to the right" actions with the Super+ and Super+ key combinations respectively.

Audio mixer complains about missing pavucontrol binary

Clicking the speaker (audio) icon in the panel and then selecting Audio mixer... results in a message saying "pavucontrol binary not found".

The solution is to install media-sound/pavucontrol:

root #emerge --ask media-sound/pavucontrol

Program starting hotkeys are not working / Colors not changeable from appearance

Xfce can have hotkeys for both starting an application as well as modifying the behavior of an already running application or setting. An example of behavior hotkey is the Ctrl+Alt+D combination, which minimizes all windows to show the deskop (and vice-versa).

Assuming that hotkeys for starting an application (such as Alt+F2 to start the application finder) are not working, while the application can be started from the menu, then Consolekit is not running. Start it, and make sure that it gets started at boot time:

root #/etc/init.d/consolekit start
root #rc-update add consolekit default

This will also start D-Bus, a prerequisite for Consolekit. Restart X to enjoy the new hotkeys and colors.

See also

  • Xfce Guide - A highly detailed installation and configuration guide. Read this to get all the juicy Gentoo related details!