Intelligent X11 Configuration Tool for GhostBSD
xconfig
is a comprehensive X Window System configuration tool for GhostBSD/FreeBSD. It performs intelligent hardware detection, installs the right drivers, and applies optimized Xorg configurations for physical GPUs and common hypervisors. It includes an interactive bsddialog-based menu for manual selection.
- Intel:
i915kms
(auto or with external config) - AMD:
amdgpu
(modern) andradeonkms
(legacy) - NVIDIA: auto classifies to a supported branch (e.g.,
nvidia-driver-580/470/390/340/304
) - Generic:
vesa
,scfb
(syscons framebuffer)
- VirtualBox (vboxguest/vboxservice enable & start)
- VMware
- QEMU/KVM
- Microsoft Hyper-V
- Unknown Hypervisors:
vesa
fallback
- GhostBSD / FreeBSD with
pkg
bsddialog
(preferred) ordialog
- X Window components present on the system
- Root privileges (
sudo
)
The script will also use
/xdrivers
(if available) for offline.pkg
files, falling back topkg
repos otherwise.
# Clone
git clone https://github.com/GhostBSD/xconfig.git
cd xconfig
# Install the script
sudo install -m 755 bin/xconfig /usr/local/bin/xconfig
# Install external config templates (system-wide)
sudo mkdir -p /usr/local/etc/X11/cardDetect
sudo cp -r cardDetect/* /usr/local/etc/X11/cardDetect/
The script also looks for
cardDetect
next to the script ($SCRIPT_DIR/cardDetect
) so you can run in-tree during development.
sudo xconfig auto
Detects hardware and applies the best configuration (including NVIDIA/AMD/Intel and hypervisors).
sudo xconfig setup
# or
sudo xconfig manual
Opens the bsddialog/dialog UI. Choices are built safely via set --
(no fragile quoting).
# GPUs
sudo xconfig nvidia # Auto-detect the correct NVIDIA branch
sudo xconfig intel # Intel with external config template
sudo xconfig intel-auto # Intel auto (no config file)
sudo xconfig amd # Auto decide: amdgpu or radeonkms (based on device)
sudo xconfig amdgpu # Force amdgpu template
sudo xconfig radeonkms # Force radeonkms template
# Virtualization
sudo xconfig virtualbox
sudo xconfig vmware
sudo xconfig qemu
sudo xconfig hyperv
# Fallback / recovery
sudo xconfig vesa
sudo xconfig scfb
sudo xconfig safe
# Advanced
sudo xconfig dual # Dual-monitor template
sudo xconfig debug
Prints FreeBSD version, detected GPUs, candidate drivers, current Xorg status, presence of /xdrivers
, and available config templates.
Place templates in either:
$(dirname "$0")/cardDetect/
(development/portable), or/usr/local/etc/X11/cardDetect/
(system-wide)
File | Purpose |
---|---|
XF86Config.intel |
Intel (i915kms, tuned) |
XF86Config.amdgpu |
Modern AMD (Glamor/DRI3) |
XF86Config.radeonkms |
Legacy AMD (DRI2) |
XF86Config.virtualbox |
VirtualBox |
XF86Config.vmware |
VMware |
XF86Config.qemu |
QEMU/KVM |
XF86Config.hyperv |
Microsoft Hyper-V |
XF86Config.scfb |
Syscons framebuffer |
XF86Config.vesa |
Generic VESA |
XF86Config.safe |
Minimal recovery |
XF86Config.dual |
Dual-monitor starter |
When a template is applied, the existing
/etc/X11/xorg.conf
is backed up to/etc/X11/backup/xorg.conf.YYYYMMDD_HHMMSS
.
The script classifies the device and selects an appropriate package branch:
- Newer/modern:
nvidia-driver-580
- Previous gens:
nvidia-driver-470
- Older gens:
nvidia-driver-390
,nvidia-driver-340
,nvidia-driver-304
Exact package names available on your system may vary; the script lists available
nvidia-driver-*
if installation fails.
If /xdrivers/drivers-list
and corresponding .pkg
files exist, xconfig
installs from there first:
/xdrivers/drivers-list # lines: "<pkgname> <filename.pkg>"
/xdrivers/<filename.pkg> # package payloads
Falls back to pkg install
on failure.
BSD 2-Clause “Simplified” License — see LICENSE.