At first install some crucial packages via root propmt
pkg install pkg
pkg install sudo xorg xinit yad zenity xterm firefox pluma nano inxi lightdm lightdm-gtk-greeter
Enable lightdm in /etc/rc.conf to start at system boot:
sysrc lightdm_enable="YES"
echo "exec dbus-launch --exit-with-x11 ck-launch-session mate-session" > ~/.xinitrc
https://docs.freebsd.org/en/books/handbook/desktop/index.html
You need to edit groups, sudoers file, install graphick driver, set directories, set locales and set usb umount.
###################################################
#################### GROUPS ####################
###################################################
sudo pw groupmod video -m username
sudo pw groupmod wheel -m username
sudo pw groupmod webcamd -m username
… Replace username with real username
###################################################
#################### SUDOERS #########################
###################################################
If not wanting to spend hours to teaching how to use vi editor, the best way is to install nano editor and use nano for editing sudoers file.
… run as root
pkg install sudo nano
sudo EDITOR=nano visudo
… comment out wheel and sudo lines like
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL:ALL) NOPASSWD: ALL
## Uncomment to allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
…. save and quit
###################################################
#################### GRAPHICKS ####################
###################################################
sudo pkg install inxi
pciconf -lv|grep -B4 VGA
inxi -Gx
sudo pkg install drm-kmod
sudo nano /etc/rc.conf
sysrc kld_list+=i915kms ## intel
sysrc kld_list+=radeonkms ## amd
More settings from https://docs.freebsd.org/en/books/handbook/x11/
############################################
My /etc/rc.conf
hostname=”dc7700″
keymap=”fi.kbd”
wlans_run0=”wlan0″
ifconfig_wlan0=”WPA DHCP”
moused_enable=”YES”
# Set dumpdev to ”AUTO” to enable crash dumps, ”NO” to disable
dumpdev=”NO”
sysrc dbus_enable=”YES”
dbus_enable=”YES”
sysrc lightdm_enable=”YES”
lightdm_enable=”YES”
fusefs_enable=”YES”
sysrc kld_list+=i915kms
kld_list=”i915kms”
ifconfig_em0=”DHCP”
webcamd_enable=”YES”
###################################################
#################### DIRECTORIES #################
###################################################
To get directories, you need to run a commands
sudo pkg install xdg-user-dirs xdg-utils
xdg-user-dirs-update
… after running xdg-user-dirs-update, take it off from startup applications.
My ~/.config/user-dirs.dirs file
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you’re
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR=”$HOME/yyy”, where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR=”/yyy”, where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR=”$HOME/Työpöytä”
XDG_DOWNLOAD_DIR=”$HOME/Lataukset”
XDG_TEMPLATES_DIR=”$HOME/Mallit”
XDG_PUBLICSHARE_DIR=”$HOME/JUlkinen”
XDG_DOCUMENTS_DIR=”$HOME/Asiakirjat”
XDG_MUSIC_DIR=”$HOME/Musiikki”
XDG_PICTURES_DIR=”$HOME/Kuvat”
XDG_VIDEOS_DIR=”$HOME/Videot”
My ~/.config/user-dirs.locale file
fi_FI
###################################################
#################### LOCALES ####################
###################################################
To determine the current locale setting:
locale
To add or edit locale
nano ~/.login_conf
… my contents (Finnish locale)
# see login.conf(5)
#
me:\
:charset=UTF-8:\
:lang=fi_FI.UTF-8:\
… after editing reboot
###################################################
############## USB UNMOUNT ####################
###################################################
I have not find how to unmount USB-devices as regular user, but the next script may help you
#!/bin/sh
#
# RJP 24.6.2025 USB unmount script
# Packages sudo, xterm and yad must be installed
#
#
mount > /tmp/mount.txt
yad --center --width=700 --height=200 --text-align=center --title="MOUNTED DRIVES" --text="INFO: $(cat /tmp/mount.txt)"
yad --text="Would like to unmount USB?" --title="QUESTION"
if [ $? = 0 ];
then
/bin/sh -c "xterm -e 'sudo umount /media/da0*'&& yad --center --borders=5 --width=400 --text-align=center --button=ok:1 --title='USB should be unmounted' --buttons-layout=center"
else exit 0
fi
sleep 1
rm /tmp/mount.txt