Xfce
From ArchWiki
i18n |
---|
Česky |
English |
Español |
简体中文 |
Italiano |
Türkçe |
What is Xfce?
Xfce is a Desktop Environment, like GNOME or KDE. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.
Why use Xfce?
Here is a (subjective) list of reasons to use Xfce:
- It's fast, faster than the other major DEs.
- It's stable. In the long time Xfce-4 has been out, only a small handful of bugs has been discovered, despite it having a rather large following.
- It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.
- It works great with multiple monitors. Xfce's Xinerama support is arguably the best out of any WM/DE.
- It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."
- It comes with a built-in compositor which allows for true transparency among other cool things.
Why not use Xfce?
Here is a (subjective) list of reasons not to use Xfce:
- Doesn't contain all the features and integration of the major DEs.
- Slower development cycle.
- Because it's based on the CDE design, the layout may not be as familiar.
How to Install Xfce
The Xfce source and documentation are available at http://www.xfce.org/. But since you're using Arch Linux, you can grab Xfce from Pacman.
Xfce is modular. That means there is no need for you to run every part, you can pick and choose. Because of this, Xfce has a bunch of Arch packages.
To install the base Xfce system, run:
# pacman -S xfce4
If you want extras, like panel plugins, run this:
# pacman -S xfce4-goodies
To get xfce working, you HAVE to install the dbus package, otherwise you'll keep getting some dbus errors and unable to start xfce:
# pacman -S dbus
If you want to admire 'Tips and Tricks' on login, you must install the fortune-mod package:
# pacman -S fortune-mod
At the time of this writing there is a known issue with Xfce missing icons in the default menu. To fix this you have to install the following icon sets:
# pacman -S gnome-icon-theme
NOTE: In order to get the xfce4-mixer to work with alsa, you may need to install gstreamer0.10-base-plugins. See below for help with OSS.
Running Xfce
Before you start xfce, you must get the hal daemon working, to do this:
# sudo /etc/rc.d/hal start
You may want to add hal to the daemon section in rc.conf so you don't have to start is manaully everytime.
There are two ways to run Xfce. One is the "automatic" method. To start Xfce from the console, you can simply run:
# startxfce4
Note: startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.
To customize the Xfce startup using this method, you could copy /etc/xdg/xfce4/xinitrc to $HOME/.xfce4, and edit that file.
To add programs to the startup using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.
If you want more control over what starts and your initial settings, you can add these items to your $HOME/.xinitrc (leaving out and adding what you want):
xfce-mcs-manager xfwm4 --daemon xfdesktop & exec xfce4-panel
or
exec xfce4-session
or
exec startxfce4
How To Use Xfce With DMs
As of Xfce 4.2.0, the Arch packages add the proper session files for Xfce. They are contained in the xfce-utils package, which should be installed with a base installation. Simply Enable a DM.
How to shutdown and reboot from Xfce(This may also help with issues Mounting USB Drives)
Make sure that DBus and HAL are enabled in the DAEMONS line in /etc/rc.conf. Then add your normal user to the shutdown group:
# gpasswd -a USER power
Note: This group is only used by HAL, so you still need root privileges for shutting down the system via command line (halt/poweroff/shutdown).
With the new hal in extra situation has changed: Use either a consolekit/policykit capable display manager (e.g. gdm) or when you start from a shell use "startx" instead of "startxfce4" and add this to your ~/.xinitrc:
exec ck-launch-session xfce4-session
or
exec ck-launch-session startxfce4
see http://bbs.archlinux.org/viewtopic.php?id=59954 for more details.
Tips
Commands for the settings manager
There is no official documentation for the commands executed. One must look at .desktop files /usr/share/applications/ folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:
xfce-setting-show backdrop xfce-setting-show display xfce-setting-show keyboard xfce4-menueditor xfce-setting-show sound xfce-setting-show mouse xfce-setting-show session xfce-setting-show xfce-setting-show splash xfce-setting-show ui xfce-setting-show xfwm4 xfce-setting-show wmtweaks xfce-setting-show workspaces xfce-setting-show printing_system xfce4-appfinder xfce4-autostart-editor xfce4-panel -c
To review all the available setting manager commands run the following in a terminal:
$ grep xfce-setting-show /usr/share/applications/xfce*settings*
A drop down console like in quake
# pacman -S tilda
will install tilda, a drop down console, juste like yakuake in kde. It uses quite some ram, and a more lightweight alternative would be stjerm that can be found in the AUR.
To configure tilda, type
# tilda -C
which opens a configuration window in X.
Guake
A much more eyecandy and functional alternative is guake, which is available in community repo:
# pacman -S guake
How to enable the compositor in Xfce 4.4
Xfce 4.4 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on.
You can find it in Settings->Window manager tweaks. But if it isn't there, take the following steps:
- Open up $HOME/.config/xfce4/mcs_settings/wmtweaks.xml, and ensure that <option name="Xfwm/UseCompositing" type="int" value="1"/> is present. If the wmtweaks file is not there, open up the Settings->Window manager tweaks and change some things, then close it, and the file should appear.
- Make sure the following lines are in your /etc/X11/xorg.conf file:
Section "Extensions" Option "Composite" "Enable" EndSection
- Finally, restart X and the compositor should be available.
Why doesn't my desktop refresh?
Xfce 4.4 uses FAM (File Alteration Monitor) or gamin (FAM's successor) to get notification when a file or directory changes. If you decide to use FAM, don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf. This step is not necessary for gamin.
Use a transparent background for desktop icon titles
To change the default white background of desktop icon titles to something more suitable, edit the .gtkrc-2.0 file in your home directory and add the following (create the file if needed):
style "xfdesktop-icon-view" { XfdesktopIconView::label-alpha = 10 base[NORMAL] = "#000000" base[SELECTED] = "#71B9FF" base[ACTIVE] = "#71FFAD" fg[NORMAL] = "#ffffff" fg[SELECTED] = "#71B9FF" fg[ACTIVE] = "#71FFAD" } widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
How to customize xfce panel background
The same, edit ~/.gtkrc-2.0. ( foo.bar is path to your image )
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"
Quicklaunch and smart bookmark plugins for xfce panel
If these options do not appear in your "add new items" panel menu when the appropriate package(s) are installed, edit /usr/share/xfce4/panel-plugins/quicklauncher.desktop as follows:
#X-XFCE-Module=/usr/lib/xfce4/panel-plugins/libquicklauncher.so X-XFCE-Module=quicklauncher X-XFCE-Module-Path=/usr/lib/xfce4/panel-plugins
and similarly for smartbookmark (replacing quicklauncher->smartbookmark in the above).
This might only be a problem for those installing xfce4-panel and plugins seperately from an actual xfce4 install.
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
How to add themes to XFCE
1. Go to xfce-look.org and click "Themes" in the left navbar. Look around for a theme you want and click "Download".
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.
3. Move the extracted folder to /usr/share/themes (for all users) or ~/.themes (for just you). Inside /usr/share/themes/abc, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.
4. GTK theme is available here:
Menu --> Settings --> Appearance
You select your xfwm theme in:
Menu --> Settings --> Window Manager
Fonts
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full
You could also try using a custom DPI setting
Replacements for the default 'menu' panel applet
The "Ubuntu System Panel" (Gnome) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows Gnome applets to be used in Xfce.
It is available in the AUR
How to remove menu entries from the System menu
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:
- Go to the /usr/share/applications folder. Type in the terminal (Xfce menu > System > Terminal):
$ cd /usr/share/applications
- This folder should be full of .desktop files. To see how many there are, type:
$ ls
Say the one you want to edit is Firefox. Type in the terminal:$ sudo mousepad firefox.desktop
- In the bottom of the file, paste the following:
NoDisplay=true
- Save and exit. Now Firefox won’t show up in the System menu. You can do this with any program.
But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via wine)?
I've found some shortcuts that show in the category “Other” in this directory: ~/.local/share/applications/wine/.
How do I get xfce4-mixer and OSS4 to work together?
For Old Xfce4.4
It seems as if the xfce4-mixer package in the binary repositories is only compiled for ALSA sound support. For those of us who use OSS4, there is a very easy way to get xfce4-mixer to support OSS4. First, navigate to the SVN entry for the xfce4-mixer package[1]:
Then download both the PKGBUILD and the .install file to the same directory on your machine. Next, cd to that directory, and look for this line in the PKGBUILD file (it's near the bottom):
--with-sound=alsa || return 1
Change alsa to oss in that line and save the file. Then run:
makepkg PKGBUILD
This takes a few minutes, depending upon the speed of your system and your compiling options in /etc/makepkg.conf.
After that, there will be a .pkg.tar.gz file in the current directory, and all you need to do to finish installing xfce4-mixer is:
pacman -U xfce4-mixer-4.4.2-2-i686.pkg.tar.gz
Your file version and architecture may be different from mine; 4.4.2-2 32-bit was the version I installed on my system.
EDIT: I have just posted the modified version of xfce4-mixer as xfce4-mixer-oss4 on AUR, and you can simply install that as you would any ABS package and achieve the same results as above.
--Kclive18 18:02, 23 September 2008 (EDT)
For New Xfce4.6
New xfce4.6 use gstreamer as backend to control volume, so you have to make your gstreamer work. First of all, of course is install xfce4-mixer.
pacman -S xfce4-mixer
Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins
pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins
login and logout, or just remove the mixer plugin and add it again. If it doesn't work at all, then you have to compile gstreamer0.10-good-plugins yourself. and can
Download the PKGBUILD and other files needed from ABS or here, edit the PKGBUILD, add --enable-oss.
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-oss\ --disable-static --enable-experimental \ --enable-ladspa \ --with-package-name="GStreamer Good Plugins (Arch Linux)" \ --with-package-origin="http://www.archlinux.org/" || return 1
and then run makepkg -i.
makepkg -i
Still not working? Try tis package in AUR gstreamer0.10-good-plugins-ossv4, modify the pkgver to the newest in the PKGBUILD, and it should work.
Other LINKS: OSS forum
How to make screenshots (print-screen key)
Simple way is use command-line screenshot utility with Xfce
# pacman -S scrot
Then
Xfce-menu --> Settings --> Keybord >>> Application Shortcuts
Add new setting for command "scrot" use key "PrintScreen".
All screenshorts will be placed in your home folder with unique name like
this "2009-02-19-063052_1280x1024_scrot.png"!
Screenshooter
There is also an a plugin for the panel able to do this with available in extra:
# pacman -S xfce4-screenshooter
Change volume with keyboard volume buttons
Go to Settings > Keyboard. Click the "Application Shortcuts" tab and add click the "Add" button. Add the following:
ALSA
amixer set Master 5+
for the volume up button
amixer set Master 5-
for the volume down button
amixer set Master toggle
for the mute/unmute button.
OSS
Use one of these scripts: [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS ]
If using ossvol (recommended), add:
ossvol -i 1
for the volume up button
ossvol -d 1
for the volume down button
ossvol -t
for the mute/unmute button
Change mount options
A common problem when automounting usb sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved changing the default iocharset to utf8, which is easily done adding a line to /etc/xdg/xfce4/mount.rc:
[vfat] uid=<auto> shortname=winnt utf8=true # FreeBSD specific option longnames=true
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.
Troubleshooting
Keyboard shortcuts aren't working
This is usually the case when the settings helper is not working. To start it execute:
xfce4-settings-helper
Now it should be working fine.
Related Articles
External Resources
- Xfce.org - The complete documentation.
- Xfce-Look - Themes, wallpapers, and more.
- Xfce Wikia - How to edit the auto generated menu with the menu editor
- Xfce Wiki
- Howto: Remove menu entries from the System menu
- XFCE themes at linuxquestions.org