Xfce Wiki

Sub domains
 

This is an old revision of the document!


Tips & Tricks

This page contains various tips for the Xfce desktop environment.

Performance Tips

Lets face it, one of the reasons for using XFCE is performance, it is lighter and more responsive than Gnome on almost all hardware, particularly noticeable on machines with less memory and processor.

Fonts

Fonts play a huge part in performance of a GUI. With all of the font smoothing, hinting and rendering turned on you may notice significant latency when you choose menus or when dialog boxes appear. Turn all of the font rendering and hinting off, menus and dialog boxes will appear much faster, snappy in fact, scrolling on web browsers, text editors, terminal emulators will also be much faster.

The only problem with this is ugly fonts. I recommend the “Kochi Gothic” font on a laptop LCD from 9 points and larger. Recommendations for other good fonts on LCD and destop displays are welcomed.

How to use an alternative menu

If you want to use the new menu from GNOME, with quick starters for favorites applications and such, you can use the xfapplet panel plugin with the GNOME main menu applet. The menu should be installed with your package system, look for gnome-main-menu. Xfce screenshot, video.

Add a new xfapplet item inside your panel, and open its properties dialog to add the GNOME menu applet.

See also: How to customize the Xfce 4.5+ menu

Gtkrc files

  • A tutorial about the Gtkrc format can be found here.
  • You can not define a custom background for Thunar icon/ list views due to a bug in Gtk+ itself.
  • You can define a custom panel background with something like this:
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"

How to add or remove applications from the system menu

Add an application

You have to create a .desktop file (usually in /usr/share/applications for system wide or ~/.local/share/applications for your user) for the application you want to add.

In the following example, we create an entry in the menu with the name “foo” in the submenu “Multimedia”:

[Desktop Entry]
Encoding=UTF-8
Name=foo
GenericName=bar
Comment=Senseless program ever
Exec=foobar
Icon=/usr/share/pixmaps/foobar.xpm
Terminal=false
Type=Application
Categories=Multimedia;

You can read more about .desktop files here.

The libexo provides several utils amongst one to handle desktop entry files in a GUI fashion: exo-desktop-item-edit. With it you can create a new .desktop file, by running the command exo-desktop-item-edit --create-new ;-)

Remove an application from the menu

You can do this in two ways:

  • First way, and the easier one is to simply remove the .desktop file in the /usr/share/applications/ folder, but you will lose mime data (file associations).
  • The second way is to add this line to the .desktop file:
NoDisplay=true

How to customize starting xfce

This includes getting necessary environment variables into the GUI runtime.

  • Copy the file /etc/xdg/xfce4/xinitrc to ~/.config/xfce4/
  • Edit this file. For example, you can add something like this somehwere in the middle:
    • source $HOME/.bashrc
    • # start rxvt-unicode server
    • urxvtd -q -o -f

Make use of the desktop margins

The desktop margins can be used to set the bounds of the maximized windows. They can be used in a nifty way when you have only one panel.

Go to Settings > Workspaces & Margins > Margins. If you have a panel at the top, set a little margin at the bottom. Now you can access the desktop at any time at the bottom part of your display. Right click it to open the Xfce Menu.