The Handbook

    Theme
    • Guides
        • Check a system before installing FreeBSD
        • Orient a Linux administrator on FreeBSD
        • Supported FreeBSD releases
        • Choose a FreeBSD documentation and support channel
        • Move files safely without GNU mv -t
        • Update, upgrade, or update packages?
        • Upgrade 14.4 or 15.0 to FreeBSD 15.1
        • Choose packages, ports, or poudriere
        • Choose the quarterly or latest package branch
        • Choose a FreeBSD download or package mirror
        • Make a system setting persistent
        • Configure locale, keyboard, and time zone
        • Configure a serial console for recovery
        • Choose a custom kernel, module, or loader setting
        • Run a Linux binary with the compatibility layer
        • Check desktop and laptop hardware before installation
        • Choose and check a graphics driver
        • Choose Xorg or Wayland
        • Build a maintainable desktop baseline
        • Install and check a desktop browser
        • Check laptop Wi-Fi, power, and suspend
        • Check multimedia readiness
        • Choose and configure a printing stack
        • Run Windows applications with Wine
        • Snapshot and replicate a ZFS dataset
        • Choose a filesystem and storage layout
        • Operate ZFS without losing the recovery path
        • Restore files from a ZFS snapshot
        • Read ZFS pool health and run a scrub
        • Replace a failed device in a ZFS mirror
        • Replicate a ZFS dataset over SSH
        • Change PF safely on a remote host
        • Configure a narrow WireGuard tunnel
        • Plan a FreeBSD home server
        • Choose a mail server or an outgoing relay
        • Publish a network service safely
        • Choose a jail network model
        • Choose native jails or a jail manager
        • Choose a jail or a bhyve virtual machine
        • Establish a FreeBSD security baseline
        • Choose a MAC policy
        • Audit security-relevant activity
        • Start a DTrace performance investigation
    • Integrations
        • Create a first jail with Bastille
        • Compare jail managers and OCI tooling
        • Publish a Bastille service through PF
        • Mount a ZFS dataset in a Bastille jail
        • Update and upgrade Bastille jails
        • Back up and restore a Bastille jail
        • Prepare bhyve and vm-bhyve
        • Choose NFS or Samba for file sharing
        • Choose ZFS backup automation
        • Operate a signed poudriere repository
        • Manage FreeBSD configuration with Ansible or Salt
        • Run Motion with webcamd on FreeBSD
        • Design a reverse proxy, certificates, and monitoring
    • FAQ
    • Troubleshooting
        • Recover an interrupted freebsd-update run
        • Resolve a package repository or ABI mismatch
        • Diagnose the FreeBSD boot path
        • Recover with a ZFS boot environment
        • Diagnose DNS, routing, and firewall paths
        • Diagnose network mbuf exhaustion
        • Bind a service to a low port without running it as root
        • Diagnose audio output or input
        • Diagnose webcamd, cuse, and a webcam
        • Fix USB device permissions without opening every device
    • About this handbook
    • Synopsis
    • Keep the package source coherent
    • Prepare the login session
    • Start the session manually
    • Add one capability at a time
    • Add a graphical login only after the baseline works
    • Choose a different desktop deliberately
    • Maintain the result
    • Primary references

    Build a maintainable desktop baseline

    Last reviewed
    13 August 2026
    Applies to
    15.1-RELEASE, 15.0-RELEASE, 14.4-RELEASE

    Synopsis #

    A maintainable desktop starts with one verified graphics driver, one display stack, and one desktop session. Installing several desktops and enabling a display manager in the first transaction hides whether a failure belongs to the kernel driver, Xorg or Wayland, session startup, D-Bus, or the login manager.

    This procedure uses XFCE started manually through Xorg as a diagnostic baseline. It is not a universal desktop recommendation and does not establish that every graphics processor, display, or laptop function works. Complete the hardware preflight and graphics driver setup first. Select another maintained environment when its requirements better fit the system.

    Keep the package source coherent #

    Confirm the configured repositories and update their metadata:

    $ pkg repositories
    # pkg update
    

    Install Xorg, XFCE, and the D-Bus service used by the desktop:

    # pkg install xorg xfce dbus
    

    Do not switch package branches during desktop diagnosis. If a package-source policy has not been chosen, read the packages, ports, and poudriere guide first.

    Prepare the login session #

    Confirm the intended login’s supplementary groups:

    $ id
    

    Add it to video if the graphics setup requires that group, substituting the real login name:

    # pw groupmod video -m loginname
    

    End the existing login session and log in again after changing groups.

    Enable and start D-Bus:

    # sysrc dbus_enable=YES
    # service dbus start
    

    Create or inspect $HOME/.xinitrc. Preserve any existing configuration. For a new XFCE baseline, its content is one line:

    . /usr/local/etc/xdg/xfce4/xinitrc
    

    The file belongs to the unprivileged login, not to root.

    Start the session manually #

    From a virtual-terminal login as the desktop user, run:

    $ startx
    

    A successful session should reach XFCE, permit logout, and return to a usable terminal. Test keyboard and pointing devices, open a terminal, and inspect the active display and session variables.

    If startx fails, retain all terminal output and inspect the Xorg log:

    $ grep -E '\(EE\)|\(WW\)' $HOME/.local/share/xorg/Xorg.0.log
    

    The log may instead be /var/log/Xorg.0.log. Resolve kernel-driver attachment, device permissions, or an explicit Xorg error before adding a display manager.

    Add one capability at a time #

    After the baseline starts repeatedly, add workstation functions in an order that preserves useful diagnostics:

    1. Install one browser and test rendering.
    2. Verify audio output and input outside and inside the browser.
    3. Configure and test a webcam before a meeting application.
    4. Test removable and application-specific devices using scoped USB permissions .
    5. On a laptop, complete Wi-Fi and suspend tests .
    6. Separate locale, keyboard, and time-zone configuration from desktop-specific input settings.
    7. Select and test one printing stack only when printing is part of the required workload.
    8. Treat a Windows application as a separate compatibility decision using Wine , not as proof that the desktop baseline failed.

    Install applications through the chosen package source. Avoid copying Linux desktop service instructions unless the corresponding service and paths are documented for FreeBSD.

    Add a graphical login only after the baseline works #

    The FreeBSD desktop chapter documents LightDM as an XFCE display-manager option:

    # pkg install lightdm lightdm-gtk-greeter
    # sysrc lightdm_enable=YES
    

    Reboot during a controlled test or start the service from a virtual terminal. Keep a root shell or another virtual-terminal login available until LightDM has completed login and logout successfully.

    If the manager fails, disable it from a text console:

    # sysrc lightdm_enable=NO
    # service lightdm stop
    

    Do not enable two display managers. Their rc services and session selection can conflict even when both packages install successfully.

    Choose a different desktop deliberately #

    Plasma, GNOME, MATE, Cinnamon, and LXQt are available through FreeBSD packages, but their service, filesystem, display-manager, and Wayland requirements differ. Follow the current FreeBSD desktop chapter for the selected environment rather than adapting the XFCE line mechanically.

    When Wayland is required, use the Xorg or Wayland decision guide and the selected compositor’s documented startup procedure. Keep this Xorg baseline only if it remains useful as a recovery or comparison environment; otherwise remove unused desktop packages after the replacement is proven.

    Maintain the result #

    Record the FreeBSD release, package branch, graphics module, desktop package, and display manager. Review package upgrade transactions before accepting them, especially when they replace graphics, Xorg, compositor, or desktop packages. After a material upgrade, test login, browser, audio, external displays, and suspend before the next maintenance window closes.

    Primary references #

    • FreeBSD Handbook: Desktop environments
    • FreeBSD Handbook: XFCE
    • FreeBSD Handbook: Installing Xorg
    • startx(1)
    • pw(8)
    • service(8)
    • sysrc(8)

    Independent documentation. Not affiliated with or endorsed by the FreeBSD Project or the FreeBSD Foundation.

    Report a bug
    • Synopsis
    • Keep the package source coherent
    • Prepare the login session
    • Start the session manually
    • Add one capability at a time
    • Add a graphical login only after the baseline works
    • Choose a different desktop deliberately
    • Maintain the result
    • Primary references