====== 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 the alternative GNOME-menu ===== If you want to use the new menu from GNOME, with quick starters for favorites applications and such, you can use the [[http://goodies.xfce.org/projects/panel-plugins/xfce4-xfapplet-plugin|xfapplet panel plugin]] with the GNOME main menu applet. The menu should be installed with your package system, look for **gnome-main-menu**. [[http://wirelessimage4.pbwiki.com/f/Screenshot.png|Xfce screenshot]], [[http://www.novell.com/video/desktop/|video]]. Add a new xfapplet item inside your panel, and open its properties dialog to add the GNOME menu applet. If you don't like GNOME main menu, try Ubuntu System Panel, available in several distributions. See also: [[/howto/customize-menu|How to customize the Xfce 4.5+ menu]] ===== Gtkrc files ===== * A tutorial about the Gtkrc format can be found [[http://live.gnome.org/GnomeArt/Tutorials/GtkThemes|here]]. * Xfce has also a couple of custom gtkrc settings for some of the applications: [[http://svn.xfce.org/svn/xfce/xfdesktop/branches/xfce_4_4/README|xfdesktop]] and [[http://thunar.xfce.org/pwiki/documentation/advanced_settings|Thunar]] (see also [[http://thunar.xfce.org/pwiki/documentation/faq#how_do_i_assign_different_keyboard_shortcuts|editable shortcuts]]). * You can not define a custom background for Thunar icon/ list views due to a [[http://bugzilla.gnome.org/show_bug.cgi?id=71926|bug in Gtk+]] itself. * You can define a custom panel background with something like this: # ~/.gtkrc-2.0 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" } style "panel-color" { fg[NORMAL] = "#222222" fg[ACTIVE] = "#111111" bg[NORMAL] = "#edeff2" bg[PRELIGHT] = "#3d6eab" bg[ACTIVE] = "#3d6eab" } widget_class "*Panel*" style "panel-background" widget "*PanelWidget*" style "panel-color" widget "*PanelApplet*" style "panel-color" widget "*Panel*" style "panel-color" widget_class "*Panel*" style "panel-color" class "*Panel*" style "panel-color" class "*Tray*" style "panel-color" class "*tray*" style "panel-color" ===== How to add or remove applications in 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 [[http://standards.freedesktop.org/desktop-entry-spec/latest/|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===== //Fixme: The purpose of this paragraph is unclear// 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. This trick works with panels on all sides.