Shell script to set up GNOME on a fresh FreeBSD install. Tested on 14.x.
You need a working FreeBSD system with your user in the wheel group. If you
just installed from DVD1.iso you should be most of the way there.
As root:
pkg update && pkg upgrade -y
pkg install -y sudo git
visudo # uncomment %wheel ALL=(ALL:ALL) ALLLog back in as your normal user, then:
git clone https://github.com/BenGoldberg0/FreeBSD_Install_Gnome
cd FreeBSD_Install_Gnome
chmod +x main.sh
sudo ./main.shThe script picks up your username from $SUDO_USER. If that's empty for some
reason it'll just ask.
pkg install xorg gnome- enables dbus, gdm, gnome and the linux compat layer in rc.conf
- adds proc and fdescfs to fstab (GNOME breaks without them) and mounts them
- adds your user to
videoandwheel - drops a polkit rule so wheel members can authenticate as admin
- offers to reboot
It's idempotent, so re-running it shouldn't double up fstab lines or anything.
This is the part that bites everyone. The base system has no KMS driver, so
without drm-kmod you're going to boot to a black screen.
sudo pkg install -y drm-kmodThen pick the right module for your GPU:
sudo sysrc kld_list+=i915kms # Intel
sudo sysrc kld_list+=amdgpu # AMD (recent)
sudo sysrc kld_list+=radeonkms # AMD (older)NVIDIA is its own thing — pkg install nvidia-driver nvidia-modeset and add
nvidia-modeset to kld_list.
service gdm status
less /var/log/Xorg.0.log
tail -n 200 /var/log/messages
mount | grep -E 'proc|fdescfs'Xorg.0.log saying "no screens found" almost always means your KMS module
didn't load. Check kldstat and re-read the Graphics section.
GPL-3.0.