Skip to content

Instantly share code, notes, and snippets.

@Espionage724
Last active November 3, 2024 06:01
Show Gist options
  • Save Espionage724/beab5513059d4a8ed635ecb25a85b4e4 to your computer and use it in GitHub Desktop.
Save Espionage724/beab5513059d4a8ed635ecb25a85b4e4 to your computer and use it in GitHub Desktop.
FreeBSD 14.1 (Xfce) Set-up Notes (raw)

====== Information ======

====== TODOs ======

====== Download ======

FreeBSD-14.1-RELEASE-amd64-memstick.img

====== Installation Notes ======

===== Partitioning =====

==== ZFS ====

  • Auto ZFS on Root
  • Pool Type/Disks: stripe: 1 disk (''nda0'', [[linux;notes;drive_wipe|512e Sectors, wiped NVMe]])
  • :!: ''NO'' Force 4K Sectors

===== System Configuration =====

  • ''local_unbound''
  • ''sshd'' unchecked
  • ''moused'' unchecked
  • ''ntpd''
  • ''ntpd_sync_on_start''
  • ''powerd'' unchecked
  • ''dumpdev'' unchecked

===== System Hardening =====

  • ''clear_tmp''
  • ''disable_syslogd''

===== User =====

  • Invite to other groups: ''wheel''
  • Shell: ''sh''

===== Network =====

  • DHCP or Static on Ethernet (''em0'')
  • DHCP on USB Tether (''ue0'')
  • :!: Wifi didn't seem to ask for a passcode after scan/select during install ((works [[#wireless|post-install]]))

====== Network ======

===== Wireless =====

su -l

ee /etc/wpa_supplicant.conf

network={ ssid="myssid" psk="mypsk" }

===== USB Tethering =====

su -l

sysrc ifconfig_ue0=SYNCDHCP

/etc/netstart

====== Update ======

===== FreeBSD =====

su -l

freebsd-update fetch install

sync && reboot

===== pkg =====

su -l

pkg update --force

pkg upgrade

====== Xorg ======

su -l

pkg install xorg drm-kmod

pw groupmod video -m espionage724

sysrc kld_list+=i915kms

====== Xfce ======

su -l

pkg install xfce

ee /etc/fstab

Xfce

proc /proc procfs rw 0 0

sysrc dbus_enable="YES"

echo '. /usr/local/etc/xdg/xfce4/xinitrc' > /home/espionage724/.xinitrc

chown espionage724:espionage724 /home/espionage724/.xinitrc

sync && reboot

===== Login =====

  • Username -> Password -> ''startx''

startx

====== Software ======

su -l

pkg install filezilla firefox xdg-user-dirs

pkg install evince-lite evolution foliate gbrainy gimp keepassxc libreoffice mate-calc mpv thunar-archive-plugin transmission-gtk xfce4-screensaver xfce4-screenshooter-plugin xfce4-whiskermenu-plugin android-tools aria2 cups en-freebsd-doc en-hunspell gnome-keyring gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-libav gtk-sharp30 htop icoutils libressl mesa-demos noto unar wget xarchiver xrandr yt-dlp

===== Wine =====

wine wine-gecko wine-mono winetricks

===== Intel =====


libva-intel-driver

===== Games =====

  • TODO: Joystick fix for ''neverball''

neverball xonotic

==== DevilutionX ====

  • [[games;bsd;devilutionx|DevilutionX]]

devilutionx

==== Doomsday Engine ====

  • [[games;bsd;doomsday_engine|Doomsday Engine]]

doomsday fluid-soundfont

==== FlightGear ====

  • :!: [[games:bsd:flightgear|FlightGear]]
  • [[games;controller_bindings;flightgear_sidewinder_joystick|Sidewinder Precision Pro Joystick Bindings]]

flightgear flightgear-data

==== Other ====


minecraft-client

===== Tor Browser =====


tor-browser

====== Settings ======

===== XDG Dirs =====

  • :!: Done from regular user and not ''su''

xdg-user-dirs-update --force

===== Groups =====

  • ''operator'' to allow general reboot/power-off and [[bsd:notes:virtualbox|VirtualBox]]

su -l

pw groupmod 'operator' -m 'espionage724'

===== 32-bit Wine =====

  • :!: Needs done as regular user running Wine apps and not from ''su'' ((''pkg32.sh'' has ''echo "Don't run this script as root!"''))

'/usr/local/share/wine/pkg32.sh' install wine mesa-dri gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-libav libressl

'/usr/local/share/wine/pkg32.sh' update --force

'/usr/local/share/wine/pkg32.sh' upgrade

===== Xfce =====

==== Appearance ====

  • Style -> Greybird
  • Icons -> elementary Xfce
  • Fonts -> Enable anti-aliasing -> Uncheck and re-check for full check-mark
  • Fonts -> Rendering -> Hinting: None
  • Fonts -> Rendering -> Sub-pixel order: None
  • Fonts -> DPI -> Uncheck Custom DPI setting

==== Panel Preferences ====

  • Items -> Add -> Whisker Menu (move to beginning of Items and remove Applications Menu) ((default app menu doesn't allow right-clicking desktop entries which prevents extra 2004scape and Wine launcher stuff))
  • Items -> Window Buttons -> Settings Wrench -> Uncheck ''Group windows by application''

==== Terminal ====

  • General -> [x] Unlimited Scrollback
  • Appearance -> [x] Use system font
  • Appearance -> Background -> Transparent Background ''0.80''

==== Window Manager ====

  • Style -> Theme -> Greybird-dark

===== loader.conf =====

==== Spinesnap ====

su -l

ee '/boot/loader.conf'

kern.geom.label.disk_ident.enable="0" kern.geom.label.gptid.enable="0" cryptodev_load="YES" zfs_load="YES" autoboot_delay="2" hw.usb.usbhid.enable="1"

==== Unused ====

hw.acpi.osname="Windows 2017"

exec="gop set 0"

==== Boot Commands ====

  • TODO: Under misc

boot

gop list

===== rc.conf =====

==== Spinesnap ====

su -l

ee '/etc/rc.conf'

clear_tmp_enable="YES" syslogd_flags="-ss" hostname="Spinesnap" ifconfig_em0="inet 192.168.1.150 netmask 255.255.255.0" defaultrouter="192.168.1.1" ifconfig_em0_ipv6="inet6 accept_rtadv" local_unbound_enable="YES" ntpd_enable="YES" ntpd_sync_on_start="YES" moused_nondefault_enable="NO" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="NO" zfs_enable="YES" kld_list="i915kms" dbus_enable="YES" cupsd_enable="YES"

===== sysctl.conf =====

==== Spinesnap ====

su -l

ee '/etc/sysctl.conf'

#security.bsd.see_other_uids=0 dev.hwpstate_intel.0.epp=0

===== device.hints =====

==== Spinesnap ====

su -l

ee '/boot/device.hints'

hint.hdac.0.cad0.nid20.config="as=1 seq=0" hint.hdac.0.cad0.nid33.config="as=1 seq=15 device=Headphones"

===== Keyboard Shortcuts =====

bash -c "secret-tool lookup 'keepass' 'default' | keepassxc --pw-stdin ~/'Documents/keepass.kdbx'"

xfce4-terminal --title='FreeBSD Updater' --command "su -l 'root' -c 'freebsd-update fetch install && pkg update --force && pkg upgrade && sync && echo 'Done' && sleep '3''"

xfce4-popup-whiskermenu

mixer 'vol'='+5%' >> /dev/null 2>&1

mixer 'vol'='-5%' >> /dev/null 2>&1

mixer 'vol'='mute=toggle' >> /dev/null 2>&1

==== Keys ====

  • Listed respectively to above

  • Ctrl + Alt + Z

  • F6

  • Super/Windows Key

  • ''mixer'' commands bound to ''AudioRaiseVolume'', ''AudioLowerVolume'', and ''Audio Mute'' ((when set from a USB keyboard, requires ''hw.usb.usbhid.enable=1''))

===== Network =====

==== local-unbound DNS ====

cat '/etc/rc.conf' | grep 'local_unbound_enable'

su -l

ee '/etc/resolv.conf'

nameserver 127.0.0.1 options edns0

===== Printer =====

==== CUPS ====

su -l

sysrc cupsd_enable="YES"

service 'cupsd' start

==== Printer ====

  • http://localhost:631/admin

  • Log-in as regular user (not ''root'')

  • Internet Printing Protocol (ipp)

  • HP

  • IPP Everywhere ™

  • Output Mode: DeviceGray

  • Duplex: DuplexNoTumble ((presumably double-sided printing, flip-on-long-edge))

ipp://192.168.1.164/ipp/print

Kole

===== Game Controllers =====

  • :!: See [[bsd;notes;joystick|Joystick]]

===== profile.d =====

==== Mesa ====

su -l

ee '/usr/local/etc/profile.d/Mesa-tweaks.sh'

# Mesa export MESA_DISK_CACHE_SINGLE_FILE='1' export MESA_DISK_CACHE_DATABASE='1' export MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ='1' export VAAPI_MPEG4_ENABLED='1' export mesa_glthread='true' export MESA_NO_ERROR='1'

End

===== KeePassXC =====

==== Settings ====

  • General -> [ ] Load previous databases on startup
  • Security -> [x] Use DuckDuckGo service to download website icons

==== Add Database Password to GNOME Keyring ====


secret-tool store --label='KeePass' 'keepass' 'default'

===== mpv =====

mkdir -p ~/'.config/mpv' && ee ~/'.config/mpv/mpv.conf'

save-position-on-quit sub-auto=fuzzy force-window=yes profile=gpu-hq scale=ewa_lanczossharp cscale=ewa_lanczossharp video-sync=display-resample interpolation tscale=oversample hwdec=vaapi hwdec-codecs=all

===== Secure Shell =====

  • TODO

===== Drive Maintenance =====

  • TODO

===== Wine =====

  • See [[bsd;notes;wine|Wine]]

===== Xorg =====

  • [[bsd;notes;xorg.conf_snippets|xorg.conf Snippets]] (75Hz, ''evdev'')

==== Full RGB HDMI ====

  • ''xrandr'' lines go above ''xfce4/xinitrc''

ee ~/'.xinitrc'

xrandr --output HDMI-1 --set "Broadcast RGB" Full xrandr --output HDMI-1 --set "content type" Game

====== Firefox ======

  • See [[programs;firefox|Firefox]]

====== Notable Folders and Commands ======

===== Font Cache =====


fc-cache -r -v

===== Drive Wipe =====

gpart show

gpart destroy -F 'da0'

===== USB Flash Drive =====

camcontrol devlist

usbconfig -d '/dev/ugen0.6' power_off

===== User/Group =====

awk -F":" '{print $1}' /etc/passwd

awk -F":" '{print $1}' /etc/group

===== pkg =====

  • ''x'' is package name

pkg info -l x

pkg autoremove

===== Handbook =====

pkg info -l 'en-freebsd-doc'

gio open '/usr/local/share/doc/freebsd/en/books/handbook'

===== CPU Frequency =====


su -l root -c "sysctl 'dev.cpu.0.freq' 'dev.cpu.1.freq' 'dev.cpu.2.freq' 'dev.cpu.3.freq' 'dev.cpu.4.freq' 'dev.cpu.5.freq' 'dev.cpu.6.freq' 'dev.cpu.7.freq'"

===== Network Restart =====

su -l

'/etc/netstart'

===== hw-probe =====

su -l

pkg install 'hw-probe'

hw-probe -all -upload

===== Crashdump Clean-up =====


rm -fv ~/*'.core'

===== Xfce Settings Reset =====

rm -fv ~/'.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml'

gio open ~/'.config/xfce4/xfconf/xfce-perchannel-xml'

gio open ~/'.config/xfce4/xfconf'

===== Audio Output Switch =====

mixer -a

echo ' Headphones ' && mixer -d 'pcm1' -f '/dev/mixer1'

echo ' Onboard ' && mixer -d 'pcm0' -f '/dev/mixer0'

===== Logs =====

newsyslog -v -CC -N

cat '/dev/null' > '/var/log/all.log'

cat '/dev/null' > '/var/log/Xorg.0.log'

gio open '/var/log'

ls -la '/var/log'

==== syslog.conf ====

=== all.log ===

== Enable ==

  • Uncomment

su -l

ee '/etc/syslog.conf'

#. /var/log/all.log

== Permissions ==

su -l

touch '/var/log/all.log' && chmod '600' '/var/log/all.log'

== View ==

su -l

ee '/var/log/all.log'

===== Other Files/Paths =====

  • TODO
@Espionage724
Copy link
Author

Espionage724 commented Sep 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment