How to configure XFCE in Debian Wheezy

using simple tips and tricks.


1. Bigger Icons in the main menu

The default size for the icons in the main menu is small. The menu looks like having too much information in a small space. To solve this problem, edit the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml. Check the line starting by property name="IconSizes" and replace it by something like this:

property name="IconSizes" type="string" value="gtk-menu=16,16:gtk-button=16,16:panel-applications-menu=22,22:panel-directory-menu=32,32"

Of course you can play setting different sizes for the icons until you are a happy.

2. Enable touchpad tap

If you have just installed XFCE you probably have noticed that tapping is disabled and that you are left with using the touchpad's buttons. This can easily be rectified by editing the file /usr/share/X11/xorg.conf.d/50-synaptics.conf. Make sure that the Section "InputClass" looks as follows:

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
    Option "TapButton1" "1"
    Option "VertEdgeScroll" "1"
    Option "HorizEdgeScroll" "1"

Probably you just have to add a few lines to your default configuration.

3. Text of icons on Desktop

If you want to remove the background color from the icon text and get a white color for the text here it follows the solution. Open or create the file ~/.gtkrc-2.0 and copy the following:

style "xfdesktop-icon-view" {
    XfdesktopIconView::label-alpha = 01

    base[NORMAL] = "#000000"
    base[SELECTED] = "#ffffff"
    base[ACTIVE] = "#ffffff"

    fg[NORMAL] = "#ffffff"
    fg[SELECTED] = "#000000"
    fg[ACTIVE] = "#000000"
}
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

With this configuration the icon's text is white (good for dark backgrounds). When the icon becomes selected, the text becomes black and the background becomes white with a certain degree of transparency. #ffffff stands for white, and #000000 means black color.

4. Slow Thunar startup

When you first open up Thunar it attempts to find all network servers so that when you select "Network" they are listed immediately. Then, to avoid such a delay, edit the following file: /usr/share/gvfs/mounts/network.mount and change AutoMount to false:

[Mount]
Type=network
Exec=/usr/lib/gvfs/gvfsd-network
AutoMount=false

This way the network will only be analized under request by clicking the corresponding icon in Thunar.

5. Keyboard issues writing foreign languages

Are you writing in Spanish or French with an English keyboard and you need to type accents or tildes? Go to Main Menu -> Settings Manager -> Session and Startup. Click on Application Autostart and you add a new application. You may write the name and the comment you like, but make sure you add the following command:

setxkbmap -option compose:lwin

After restarting, for instance, if you type: left windows key + ' and then you type "e" you get "é".

Do you want to write in Japanese using a non-Japanese keyboard? Then install the following opening a terminal:

apt-get install ibus anthy ibus-anthy fonts-takao-mincho

The show starts with a simple Ctr + Space. If you want to see fonts correctly in your favorite browser it is good to have the takao-mincho fonts installed in your system.

6. Quick Filter in Synaptic Package Manager

By default the Quick Filter window in Synaptic is disabled. To get it enabled you have to install a package called apt-xapian-index:

apt-get install apt-xapian-index

After restarting synaptic and waiting a few seconds or minutes you will get the quick filter window active.

7. Display Manager LightDM and dual monitors

XFCE is managed from LightDM display manager (The program where you enter your login name and password). If you use dual monitors (for instance a laptop connected to a big monitor) you realize that LightDM uses the resolution corresponding to the smaller monitor, so the image you get on your nice big monitor is quite ugly. To solve this problem, open a terminal and type xrandr. This program will show you the internal name of your display devices and their resolutions. In my case I have a laptop monitor identified by "LVDS1" working with 1024x768 pixels and an external monitor identified with "VGA1" working at 1680x1050 pixels. Take your time to gather the information corresponding to your devices because you will use it.

The second step follows. We need to prepare a script (from Mr. Hanynowsky) using the information of our displays. This script will tell LightDM to use the external monitor when it is connected. If not, it will use the laptop's display. Create a file called display.sh and edit it with your favorite editor. Add the following (using your own devices!):

#!/bin/bash
# V-1.0 by Hanynowsky - April 2012.
# I am a very basic script that works around bug 874241 reported in launchpad.

XCOM0="/usr/bin/xrandr -q | grep 'VGA1 connected'"

XCOM1="/usr/bin/xrandr --output VGA1 --primary --mode 1680x1050 --output LVDS1 --off"

XCOM2="/usr/bin/xrandr --output LVDS1 --mode 1024x768"

# if the external monitor is connected, then we tell XRANDR to set up an extended desktop
if [ -n "$XCOM0" ] || [ ! "$XCOM0" = "" ]; then eval $XCOM1

# if the external monitor is disconnected, then we tell XRANDR to output only to the laptop screen
else eval $XCOM2
fi
exit 0;

You only need to change the names of the displays and their resolution. When you are finished you grant to the file execution permission:

sudo chmod +x display.sh

Copy the file display.sh to the folder /usr/share as root.

Last step. We tell LightDM to use this script. Edit the file /etc/lightdm/lightdm.conf. Under "[SeatDefaults]" you will find a line that looks like "#display-setup-script=". Uncomment the line and add the script's path so it becomes:

display-setup-script=/usr/share/display.sh

Save the file. Then you logout and if you are lucky, it will look fine!

Changing the greeter's background of LightDM

8. Changing the greeter's background, the theme, and the computer icon of LightDM

We start by changing the background image. The easiest way to do that is to get your favorite background image (for instance myfavback.png) in the folder /usr/share/pixmaps/. Then edit the file /etc/lightdm/lightdm-gtk-greeter.conf and you set background=/usr/share/pixmaps/myfavback.png. When you logout you will see the new background. Enjoy it!

When you change the background, may be then you decide that the theme is not the appropiate one. The theme determines the color of the upper bar and the login menu as well. The default theme is "Adwaita". If you choose a dark background you may wish to use a dark theme as well. First thing to do is to install a suitable gtk3 theme. In my case I installed "delorean-dark". You may find this theme in gnome-look.org. Themes are located in /usr/share/themes and you can add your favorite theme in that folder. Be careful with the permissions: every folder and file should be owned by root. Now edit the file /etc/lightdm/lightdm-gtk-greeter.conf and change the option "theme-name" accordingly. For instance:

theme-name=delorean-dark

Be careful to choose the right name for the theme, because sometimes it does not coincide with the name of the folder that contains it. Best way to check the real name is to list it in the Settings -> Appearance menu of XFCE.

To change the 64x64 computer icon above the login text box you must follow these steps: First you create or get a 64×64 pixel png file and place it in /usr/share/icons/hicolor/64x64/devices. After that you then run:

sudo gtk-update-icon-cache /usr/share/icons/hicolor

Second, you edit the file greeter.ui:

sudo gedit /usr/share/lightdm-gtk-greeter/greeter.ui

This file defines the layout of the login screen. Around line 34 you find a line like this one:

<property name="icon_name">computer</property>

Change the icon_name property to be the name of your icon (without the png extension). And that's it.

9. Volume control with an applet in the XFCE panel

Raw Debian installation with XFCE desktop does not provide a nice icon in the panel to control de volume. I like using "Volti". Volti allows controlling audio volume from system tray/notification area; left click opens volume scale (slider) and scroll wheel on tray icon changes volume. It only depends on ALSA. To install it open a terminal and type:

sudo apt-get install volti xfce4-notifyd

You probably already have "xfce4-notifyd" which provides configurable notifications on the desktop (including volume changes when using the keyboard, for instance). Go to Main Menu -> Settings Manager -> Session and Startup. Click on Application Autostart and you add a new application. You may write the name Volti and the comment Volume control, and make sure you add the following command /usr/bin/volti. If you logout and login again you should get your volume control applet in the notification area of your panel.


Raconet Linux