FreeBSD Installation & Config Guide

Step 1: Base Installation

  1. Download the FreeBSD ISO from the official page.
  2. Boot the installer and follow the standard "next-next" prompts to configure your disks and network.
  3. Add a standard user to the wheel group during the post-install prompt, or run:
    adduser

Step 2: System Update & Graphics Drivers

  1. Ensure your package repository is up to date:
    pkg upg
  2. Identify your graphics hardware:
    pciconf -lv | grep -B4 VGA
  3. Install the DRM kernel modules (assuming Intel i915kms):
    pkg install drm-kmod
    sysrc kld_list+=i915kms

Step 3: Desktop Environment (KDE)

  1. Install Xorg, KDE, and essential drivers/utilities using pkg:
    pkg install libva-intel-driver mesa-libs mesa-dri
    pkg install --quiet --yes kde5 plasma5-sddm-kcm sddm xorg
    pkg install xf86-video-intel konsole dolphin falkon fastfetch htop
  2. Enable required services to start on boot:
    sysrc dbus_enable+="YES" && service dbus start
    sysrc sddm_enable+="YES" && service sddm start
  3. Configure your local .xinitrc and shell aliases:
    echo "exec startkde5" > ~/.xinitrc
    echo "alias ls='ls -alrt --color=auto'" > /etc/profile.d/shaliases.sh
    . /etc/profile.d/shaliases.sh

Step 4: Linux Compatibility Layer

  1. Enable the Linux subsystem to run compatible binaries:
    sysrc kld_list+=linux
    sysrc kld_list+=linux64
    sysrc linux_enable="YES"

Step 5: Hardware Configurations (Xorg & Polkit)

  1. Create the Intel Xorg configuration at /usr/local/etc/X11/xorg.conf.d/20-intel.conf:
    Section "Device"
        Identifier "Card0"
        Driver     "intel"
    EndSection
  2. Create the Monitor configuration at /usr/local/etc/X11/xorg.conf.d/10-monitor.conf:
    Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        SubSection "Display"
        Modes      "1024x768"
        EndSubSection
    EndSection
  3. Grant the wheel group admin permissions by creating /usr/local/etc/polkit-1/rules.d/40-wheel-group.rules:
    polkit.addRule(function(action, subject) {
        if (subject.isInGroup("wheel")) {
            return polkit.Result.YES;
        }
    });

Step 6: Fonts & Display Manager (Ly)

  1. Install and configure URW fonts:
    pkg install urwfonts mkfontscale
    Add the following to /usr/local/etc/X11/xorg.conf.d/90-fonts.conf:
    Section "Files"
        FontPath "/usr/local/share/fonts/urwfonts/"
    EndSection
  2. Install the ly display manager:
    pkg install ly
  3. Add the configuration hints to /etc/gettytab:
    Ly:\
      :lo=/usr/local/bin/ly:\
      :al=root:
  4. Modify the ttyv1 line in /etc/ttys to match this:
    ttyv1 "/usr/libexec/getty Ly" xterm onifexists secure
  5. Reboot your system to apply all changes:
    reboot