For the complete documentation index, see llms.txt. This page is also available as Markdown.

10.4 Xfce

Xfce is a lightweight desktop environment based on GTK+, providing a simple, efficient, and easy-to-use desktop experience. It is fully configurable, featuring a main panel with menus, applets, and application launchers, and provides a file manager and sound manager with theme support. Due to its fast, lightweight, and efficient nature, it is well-suited for computers with lower specifications or limited memory.

It is worth mentioning that the Xfce logo is a mouse 🐀. A user once shared an anecdote claiming that because the default Xfce wallpaper featured a mouse 🐀, their computer screen was scratched by a cat 🐈 (SanjaytheToilet. [joke] The default desktop startup screen causes damage to monitor![EB/OL]. (2015-08-04)[2026-04-04]. https://bugzilla.xfce.org/show_bug.cgi?id=12117.).

Installing the Xfce Desktop Environment

  • Install via pkg

# pkg install xorg lightdm lightdm-gtk-greeter xfce wqy-fonts xdg-user-dirs xfce4-goodies lightdm-gtk-greeter-settings
  • Or install via ports:

# cd /usr/ports/x11/xorg/ && make install clean
# cd /usr/ports/x11-wm/xfce4 && make install clean # Note the number 4 in the package name
# cd /usr/ports/x11/xfce4-goodies/ && make install clean
# cd /usr/ports/x11-fonts/wqy/ && make install clean
# cd /usr/ports/x11/lightdm/ && make install clean
# cd /usr/ports/x11/lightdm-gtk-greeter/ && make install clean
# cd /usr/ports/x11/lightdm-gtk-greeter-settings/ && make install clean
# cd /usr/ports/devel/xdg-user-dirs/ && make install clean

Package Description

Package
Description

xorg

X Window System

lightdm

Lightweight Display Manager LightDM

lightdm-gtk-greeter

LightDM GTK+ login screen plugin

xfce

Xfce Desktop Environment

wqy-fonts

WenQuanYi Chinese Fonts

xdg-user-dirs

Manage user home directories

xfce4-goodies

Xfce add-ons and plugins collection

lightdm-gtk-greeter-settings

Graphical tool for configuring the LightDM GTK+ login screen

startx Command

Write the Xfce startup script to the ~/.xinitrc file to start Xfce using the startx command:

Write the Xfce startup script to the ~/.xsession file to start Xfce via the display manager:

Starting Services

Set the D-Bus service to start on boot:

Set the LightDM display manager to start on boot:

Setting the Chinese Environment

Edit the /etc/login.conf file: find the default:\ section and change :lang=C.UTF-8 to :lang=zh_CN.UTF-8.

You also need to rebuild the capability database based on the /etc/login.conf file:

Screenshots

FreeBSD Install Xfce
FreeBSD Install Xfce
FreeBSD Install Xfce

Install using pkg:

Or install using Ports:

Review the post-installation instructions and configure accordingly.

XTerm Terminal Dynamic Title

sh

Edit the ~/.shrc file and add:

Warning

This script uses eval which poses an injection risk! Use with caution.

csh

Edit the ~/.cshrc file and add:

tcsh

Edit the ~/.tcshrc file and add:

Bash

Edit the ~/.bashrc file and add:

Zsh

Edit the ~/.zshrc file and add:

References

Troubleshooting and Outstanding Issues

To dynamically display the current process, currently only sh supports this functionality.

Last updated