<commit_before>#
# install 
#
# ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-amd64-20151229-r292858-memstick.img
#

# https://cooltrainer.org/a-freebsd-desktop-howto/

#
# TODO: check https://www.banym.de/freebsd/install-freebsd-11-on-thinkpad-t420
#

#
# install desktop
#

#
# https://www.freebsd.org/doc/handbook/x11.html
#

pkg install -y xorg xfce gdm gnome3-lite xlockmore

#

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig.$$

X -configure && cat /root/xorg.conf.new > /etc/X11/xorg.conf

# /etc/X11/xorg.conf for i5-box, using vesa

cat <<'EOF'> /etc/X11/xorg.conf
#
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	#Screen      1  "Screen1" LeftOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/share/fonts/misc/"
	FontPath     "/usr/local/share/fonts/TTF/"
	FontPath     "/usr/local/share/fonts/OTF/"
	FontPath     "/usr/local/share/fonts/Type1/"
	FontPath     "/usr/local/share/fonts/100dpi/"
	FontPath     "/usr/local/share/fonts/75dpi/"
EndSection

Section "Module"
	Load "glx"
	Load "dbe"
	Load "extmod"
	Load "dri"
	Load "record"
	Load "dri2"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Option "AccelMethod" "sna"
	Identifier  "Card0"
	#Driver      "intel"
	Driver      "vesa"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		#Modes "1366x768"
	EndSubSection
EndSection

#
EOF


#########  Do _NOT_ use /etc/ttys to start gdm at boot time.  This will result in gdm
#########  hanging or restarting constantly. Instead, add gdm_enable="YES" to
#########  /etc/rc.conf. GDM will be started automatic on the next reboot.

#
# gdm start on boot<commit_msg>add X driver status command<commit_after>#
# install 
#
# ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-amd64-20151229-r292858-memstick.img
#

# https://cooltrainer.org/a-freebsd-desktop-howto/

#
# TODO: check https://www.banym.de/freebsd/install-freebsd-11-on-thinkpad-t420
#

#
# install desktop
#

#
# https://www.freebsd.org/doc/handbook/x11.html
#

pkg install -y xorg xfce gdm gnome3-lite xlockmore

#

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig.$$

X -configure && cat /root/xorg.conf.new > /etc/X11/xorg.conf

# /etc/X11/xorg.conf for i5-box, using vesa

cat <<'EOF'> /etc/X11/xorg.conf
#
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	#Screen      1  "Screen1" LeftOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/share/fonts/misc/"
	FontPath     "/usr/local/share/fonts/TTF/"
	FontPath     "/usr/local/share/fonts/OTF/"
	FontPath     "/usr/local/share/fonts/Type1/"
	FontPath     "/usr/local/share/fonts/100dpi/"
	FontPath     "/usr/local/share/fonts/75dpi/"
EndSection

Section "Module"
	Load "glx"
	Load "dbe"
	Load "extmod"
	Load "dri"
	Load "record"
	Load "dri2"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Option "AccelMethod" "sna"
	Identifier  "Card0"
	#Driver      "intel"
	Driver      "vesa"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
		#Modes "1366x768"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		#Modes "1366x768"
	EndSubSection
EndSection

#
EOF

#
# check X driver status in X
#
glxinfo | grep -C 3 vendor
glxinfo | grep -C 3 render

glxgears

#########  Do _NOT_ use /etc/ttys to start gdm at boot time.  This will result in gdm
#########  hanging or restarting constantly. Instead, add gdm_enable="YES" to
#########  /etc/rc.conf. GDM will be started automatic on the next reboot.

#
# gdm start on boot
{'fraction_non_alphanumeric': 0.12349451734675534, 'fraction_numerical': 0.04997303613158368, 'mean_word_length': 3.1771771771771773, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3847246', 'n_tokens_mistral': 2373, 'n_tokens_neox': 2167, 'n_words': 512}