Notes on OpenBSD setup and usage
There are a few things I do on any OpenBSD desktop, I'm collecting many of them here. This is borrowed from several sources including:
Set caps as ctrl
# wsconsctl keyboard.map+="keysym Caps_Lock = Control_L"
To make this run at boot, add
keyboard.map+="keysym Caps_Lock = Control_L"
setxkbmap -option 'ctrl:nocaps'
Thinkpad Trackpoint scrolling
Enable middle button scrolling with the trackpointAdd the following to .xsession:
xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5
Disable x consoleBy default xconsole is on the xenocara login screen and stays into X11
sed -i 's/xconsole/#xconsole/' /etc/X11/xenodm/Xsetup_0 echo 'xset b off' >> /etc/X11/xenodm/Xsetup_0
Update fstab(5) to add noatime:
# cp /etc/fstab /etc/fstab.bak # sed -i 's/rw/rw,softdep,noatime/' /etc/fstab
Enable apmd(8):For a laptop enable power management.
# rcctl enable apmd # rcctl set apmd flags -A -z 7 # rcctl start apmd ampd (ok)
To check current battery life run apm(8)
Add your username
# echo 'permit persist keepenv username' > /etc/doas.conf
Add your user to staff group:Add your user to the staff group. This group has higher resource limits in login.conf. You'll need to log out and back in for this change to take effect.
usermod -G staff YOUR_USERNAME
Fix Screen Tearing (Intel only)
Pasted from c0ffee.net
The default modesetting driver doesn't use vsync, so you'll get a lot of tearing when scrolling webpages or watching videos. If you have an Intel-based video chipset, you can switch to the intel driver to get smooth video.
Create the /etc/X11/xorg.conf.d directory:
Then, create intel.conf with the following contents:
/etc/X11/xorg.conf.d/intel.confSection "Device" Identifier "drm" Driver "intel" Option "TearFree" "true" EndSection
Restart xenodm to restart the X server:
rcctl restart xenodm
My tmux setup
mosh host -- tmux a. Uses C-z
curl https://laydros.net/docs/conf/tmux.conf -o ~/.tmux.conf
Disable SSH access except for keyUpdate /etc/ssh/sshd_config with the following:
PermitRootLogin no PasswordAuthentication no ChallengeResponseAuthentication no UsePAM no
rcctl restart sshd