Difference between revisions of "Xfce"

From ArchWiki
Jump to: navigation, search
m (Commands for the settings manager)
(cruft elimination, mostly)
Line 2: Line 2:
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
  
== What is Xfce?==
+
== 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.
 
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?==
+
== Why use Xfce? ==
 
Here is a (subjective) list of reasons to use Xfce:
 
Here is a (subjective) list of reasons to use Xfce:
 
* It's fast, faster than the other major DEs.
 
* It's fast, faster than the other major DEs.
Line 14: Line 14:
 
* It comes with a built-in compositor which allows for true transparency among other cool things.
 
* It comes with a built-in compositor which allows for true transparency among other cool things.
  
== Why not use Xfce?==
+
== Why not use Xfce? ==
 
Here is a (subjective) list of reasons not to 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.
 
* Doesn't contain all the features and integration of the major DEs.
Line 20: Line 20:
 
* Because it's based on the CDE design, the layout may not be as familiar.
 
* Because it's based on the CDE design, the layout may not be as familiar.
  
== How to Install Xfce==
+
== How to Install Xfce ==
 
The Xfce source and documentation are available at http://www.xfce.org/. But since you're using ArchLinux, you can grab Xfce from Pacman.
 
The Xfce source and documentation are available at http://www.xfce.org/. But since you're using ArchLinux, 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.
 
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 Xfce4 system, run:
+
To install the base Xfce system, run:
  
<pre>
+
# pacman -S xfce4
# pacman -S xfce4
 
</pre>
 
  
If you want extras, like Panel plugins and extra themes, (you probably do), run this:
+
If you want extras, like panel plugins and extra themes, run this:
  
<pre>
+
# pacman -S xfce4-goodies gtk2-themes-collection
# pacman -S xfce4-goodies gtk2-themes-collection
 
</pre>
 
  
 
If you want to be able to play sound files, you should also install ESD, which acts as the Xfce sound daemon. (Or you can install xfmedia, the default Xfce media player, and it will pull ESD as a dependency.)
 
If you want to be able to play sound files, you should also install ESD, which acts as the Xfce sound daemon. (Or you can install xfmedia, the default Xfce media player, and it will pull ESD as a dependency.)
Line 41: Line 37:
 
  # pacman -S esd
 
  # pacman -S esd
  
Note that after installing Xfce, you need to update your $PATH. You can do this (for example) by logging in again.
+
== Running Xfce ==
  
== Running Xfce4==
+
There are two ways to run Xfce. One is the "automatic" method. To start Xfce from the console, you can simply run:
  
There are two ways to run Xfce4. One is the "automatic" method. To start Xfce from the console, you can simply run:
+
# startxfce4
 
 
<pre>
 
# startxfce4
 
</pre>
 
 
'''Note:''' startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.
 
'''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'll copy /opt/xfce4/etc/xdm/xfce4/xinitrc (/opt/xfce4/etc/xdg/xfce4/xinitrc instead for me using Noodle release)  to $HOME/.xfce4, and edit that file
+
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 up using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.
 
To add programs to the startup up 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):
 
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):
  
<pre>
+
xfce-mcs-manager
xfce-mcs-manager
+
xfwm4 --daemon
xfwm4 --daemon
+
xfdesktop &
xfdesktop &
+
exec xfce4-panel
exec xfce4-panel
 
</pre>
 
  
 
or
 
or
<pre>
+
exec xfce4-session
exec xfce4-session
 
</pre>
 
  
== How To Use Xfce With DM's==
+
== 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 [[ Adding_a_login_manager_%28KDM%2C_GDM%2C_or_XDM%29_to_automatically_boot_on_startup| Enable a DM]].
+
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 [[Adding_a_login_manager_%28KDM%2C_GDM%2C_or_XDM%29_to_automatically_boot_on_startup|Enable a DM]].
  
==How to shutdown and reboot from Xfce==
+
== How to shutdown and reboot from Xfce ==
  
NOTE: It is no longer necessary (XFCE >= 4.4) to use SUDO to enable shutdown and reboot for normal users, therefore, if you enable the DBUS and HAL daemon's, you can skip this section. XFCE now utilizes DBUS. Make sure DBUS and HAL are enabled at boot (these can be added to the daemon array in /etc/rc.conf) and voila, you should be able to select the shutdown/reboot options from within XFCE. Also note that running DBUS and HAL will also enable you to automount optical or external media! To make the best use of this, install thunar-volman.
+
Make sure that DBus and HAL are enabled in the DAEMONS line in /etc/rc.conf. Then add your normal user to the power group:
  
NOTE: I find that adding myself to the power group clears up this issue entirely.
 
 
  # gpasswd -a USER power
 
  # gpasswd -a USER power
<hr>
 
* Install sudo:
 
# pacman -S sudo
 
* Add the following line at the end of <code>/etc/sudoers</code> file with visudo command:
 
# visudo
 
 
* Note that the new Xfce packages in the 'extra' repository now place Xfce under '/usr'.
 
user ALL=(root) NOPASSWD: /usr/lib/xfce4/xfsm-shutdown-helper
 
where 'user' is the name of the user you want to allow to shutdown and reboot pc from Xfce.
 
 
Alternatively you can create ''shutdown'' group and allow all its members to shutdown:
 
%shutdown ALL=(root) NOPASSWD: /usr/lib/xfce4/xfsm-shutdown-helper
 
 
# groupadd shutdown
 
# gpasswd -a user shutdown
 
where 'user' is name of the user.
 
  
To allow all users to be able to shutdown system add this to /etc/sudoers:
+
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).
%users hostname=NOPASSWD:/usr/lib/xfce4/xfsm-shutdown-helper
 
Where hostname is the name of current machine.
 
  
==Commands for the settings manager==
+
== 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:
 
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:
Line 123: Line 92:
 
To review all the available setting manager commands run the following in a terminal:
 
To review all the available setting manager commands run the following in a terminal:
  
<pre>$ grep xfce-setting-show /usr/share/applications/xfce*settings*</pre>
+
$ grep xfce-setting-show /usr/share/applications/xfce*settings*
  
==How to enable the compositor in Xfce 4.4+==
+
== 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.
 
Xfce 4.4 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on.
  
Line 138: Line 107:
 
* Finally, restart X and the compositor should be available.
 
* Finally, restart X and the compositor should be available.
  
==Why doesn't my desktop refresh?==
+
== Why doesn't my desktop refresh? ==
XFCE 4.4 uses FAM (File Alteration Monitor) to get notification when a file or directory changes.
+
Xfce 4.4 uses FAM (File Alteration Monitor) to get notification when a file or directory changes.
 
Don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf
 
Don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf
  
Line 146: Line 115:
 
* [[Howto make GTK apps look nice| HOWTO: Make GTK1 apps look nice]]
 
* [[Howto make GTK apps look nice| HOWTO: Make GTK1 apps look nice]]
  
== External Resources==
+
== External Resources ==
* [http://www.us.xfce.org/documentation/ XFCE.org] - The complete documentation.
+
* [http://www.us.xfce.org/documentation/ Xfce.org] - The complete documentation.
* [http://www.xfce-look.org/ XFCE-Look] - Themes, wallpapers, and more.
+
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.
 
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] -  How to edit the auto generated menu with the menu editor
 
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] -  How to edit the auto generated menu with the menu editor
 
* [http://wiki.xfce.org Xfce Wiki]
 
* [http://wiki.xfce.org Xfce Wiki]

Revision as of 19:41, 17 February 2008


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 the best out of any WM/DE, IMO.
  • 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 ArchLinux, 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 and extra themes, run this:

# pacman -S xfce4-goodies gtk2-themes-collection

If you want to be able to play sound files, you should also install ESD, which acts as the Xfce sound daemon. (Or you can install xfmedia, the default Xfce media player, and it will pull ESD as a dependency.)

# pacman -S esd

Running Xfce

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 up 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

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

Make sure that DBus and HAL are enabled in the DAEMONS line in /etc/rc.conf. Then add your normal user to the power 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).

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*

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) to get notification when a file or directory changes. Don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf

Related Articles

External Resources