Search:  
Gentoo Wiki

Xfce/Installation

Warning: This page is out of date (reference this forum post), despite the efforts of said author to clean it up. You may have better luck with the official Gentoo XFCE Configuration Guide .

Contents

Installation

emerge -av xfce4

..and for some extra tools you can do:

emerge -av xfce4-extras

Please visit the #xfce channel on irc.freenode.net if you have any questions.

Configuring XDM

Change the default manager in /etc/rc.conf

File: /etc/rc.conf
XSESSION="startxfce4"

Or you can edit your ~/.xsession script

File: ~/.xsession
xfce4-session

You may need to restart XDM:

/etc/init.d/xdm restart

Setting up KDM

You can use the KDM (KDE Display Manager) to start Xfce. Once you have emerged KDM, be sure to add DISPLAYMANAGER="kdm" to /etc/conf.d/xdm.

Setting up GDM

You can use GDM (Gnome Display Manager) to start Xfce. Once you have emerged GDM, be sure to add DISPLAYMANAGER="gdm" to /etc/conf.d/xdm.

Configuring SLiM

If you want to avoid unwanted KDE or GNOME dependencies on your system, and avoid the little attractive interface of XDM, you probably want to try SLiM. For configuring SLiM, you can easily follow the indications on the project's page at berlios and for certain tips take a look into SLiM. SLiM is in Portage:

# emerge -av slim

Qingy

As another alternative to XDM / GDM / KDM or SLiM you can use Qingy. (See the projects page at sourceforge). Qingy is in the portage tree, so it should pose no or little problem to install. Do notice that Qingy is NOT a display manager but a GettY replacement!

startx Directly

Yet another alternative is to startx immediately. This has the advantages of both speed and the fewest dependencies/files (none!). This has the one downside of not asking for the users password, so do not use if security is an issue for the user. Add this into /etc/conf.d/local.start

File: /etc/conf.d/local.start
su <username> -c 'source /etc/profile;startxfce4 >/dev/null 2>/dev/null &'

Tips

KDE style screen locking

To lock screen xfce4 uses xflock4 script. It tries to run either xscreensaver-command or xlock. You can edit the script or create file /usr/bin/xlock

File: /usr/bin/xlock
kdesktop_lock --forcelock

then type

chmod 755 /usr/bin/xlock

Now if you want to lock screen, press the lock icon on the xfce panel. Locking the screen with kdesktop_lock allows you to easily log in as another user without closing your graphical session.

Autostart

Note: In XFCE 4.4 there is a utility to autostart programs, so if you feel daring, maybe you should give it a shot. :-)

To start an application every time xfce4 starts, put a script into ~/Desktop/Autostart/ If you want for example to start gkrellm2 type:

$ mkdir ~/Desktop/Autostart
$ which gkrellm2 > ~/Desktop/Autostart/gkrellm2
$ chmod 755 ~/Desktop/Autostart/gkrellm2

or simply a symlink

$ ln -s /usr/bin/conky ~/Desktop/Autostart/conky
$ ls -l ~/Desktop/Autostart
total 0
lrwxrwxrwx  1 root root 14 Oct 30 22:43 conky -> /usr/bin/conky

Directory ~/Desktop/Autostart/ may be visible on your desktop, as Xfce 4.4 and later support icons on the desktop.

Shutdown or reboot

If you get an error when trying to shutdown computer from xfce4 session using shutdown button from the panel, this tip is for you. Open terminal and switch to user root

# su -

Make sure you have sudo installed

# emerge -au sudo

Enter command:

# visudo

This opens file /etc/sudoers in the editor specified by your $EDITOR environment variable (e.g. /bin/nano).

Add at the bottom of the file the following line:

File: /etc/sudoers

%shutdown ALL=(root) NOPASSWD: /usr/libexec/xfsm-shutdown-helper

Make sure the path to xfsm-shutdown-helper file is correct. If it is not in /usr/libexec, it may be found in /usr/lib/xfce4. Create shutdown group

# groupadd shutdown

Now you must add user who wants to shutdown computer from his xfce4 session to shutdown group.

# gpasswd -a user shutdown

Composite

Xfwm4 includes its own compositing manager, which allows transparency for the panel and shadows for the windows. The compositing manager uses the X.org >= X11R6.8.0 Xcomposite extension, so you first have to be running this version of the graphical server. The composite extension has to be activated in your /etc/X11/xorg.conf using the following section:

Section "Extensions"
 Option "Composite" "Enable"
EndSection

Check that you have compiled xfwm4 with composite extension by "xfwm4 -V". If it says no then re-emerge it with the xcomposite USE flag set in /etc/portage/package.use.

It's known to work well with NVidia cards and NVidia drivers, especially if you add the

Option "RenderAccel" "true"

option in the Device section of your xorg.conf file.

Orage 24-hour time

Right click clock -> Properties

in your line with %X (most likely line 1) replace %X with %R, and if you want seconds displayed %R:%S

Configure keyboard layout

Take a look at the recent XfKC (Xfce Keyboard Configuration) tool (project page). If it doesn't work, or want to do the job manually, check the following ressources: TIP Speak Your Language and X11 Keyboard.

Here's a sample Xorg configuration section (at any rate, check the above mentioned ressources).

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
option "CoreKeyboard"
option "XkbRules" "xorg"
option "XkbModel" "pc105"
option "XkbLayout" "us,ro,ru"
option "XkbVariant" ",winkeys,winkeys"
option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection

See Also

Retrieved from "http://www.gentoo-wiki.info/Xfce/Installation"

Last modified: Wed, 27 Aug 2008 21:14:00 +0000 Hits: 83,153