Notes

Shawn Shifflett
This page last modified on Tue Aug 25 23:31:44 2020 UTC



I keep personal notes that I doubt anyone but me would find useful. If something on this page helps you and you would like to keep these notes for later reference you can download my notes in LaTeX format.

OpenBSD

Configure environmental controls on OpenBSD and MacBook Pro

Configure right-clicking on trackpad in X:

* add to .xinitrc

  synclient TapButton1=1
  synclient TapButton2=3
  synclient TapButton3=2

* configure screen and key lights manually

  wsconsctl display.brightness=N%
  wsconsctl keyboard.backlight=N%
Enable kernel hardware management on OpenBSD and MacBook Pro

Add hw.perfpolicy=auto to /etc/sysctl.conf

Enable power management on laptop installations
  rcctl enable apmd
  rcctl set apmd flags -A
  rcctl start apmd
Ensure that your user is added to the 'staff' group
  usermod -G staff USERNAME
Edit staff memory utilization in /etc/login.conf
  staff:\
    :datasize-cur=1024M:\
    :datasize-max=8192M:\
    :maxproc-cur=512:\
    :maxproc-max=1024:\
    :openfiles-cur=4096:\
    :openfiles-max=8192:\
    :stacksize-cur=32M:\
    :ignorenologin:\
    :requirehome@:\
    :tc=default:
Install OpenBSD with whole drive encryption

Assumptions are that installation is from USB media. Boot from the installer USB stick and then select [S]hell to get a command prompt.

  # fdisk -iy sd0		# MBR not GPT
  # disklabel -E sd0
  >a a
  offset:[64]
  size:[the size of your drive]
  FS type:[4.2BSD] RAID
  >w
  >q
  No label changes
  # bioctl -c C -l sd0a softraid0
  New pass phrase:
  re-type passphrase
  # cd /dev && sh MAKEDEV sd2
  # dd if=/dev/zero of=/dev/rsd2c bs=1m count=1
  # exit

The exit command starts the installer script. Select 'sd2' as the installer disk. Specify [disk] as the location of the package sets and then answer 'no' when asked if the disk is mounted, select 'sd1', mount the 'a' partition.

Linux / Unix

Generate SSH keys

On client:

  ssh-keygen -t rsa

Transfer client's id_rsa.pub file to server of interest.

On server:

  cat id_rsa.pub >> ~/.ssh/authorized_keys
Reconnect to GNU Screen automatically after SSH login

Append to .bashrc:

  if [ -z "$STY" ]; then screen -RR; fi
Configure a Dell C1760nw laser printer in Debian-based Linux

Unfortunately Dell does not provide any GNU/Linux drivers for the c1760nw. However, that particular printer is a rebranding of the Xerox Phaser 6000. Xerox does provide GNU/Linux drivers in both .RPM and .DEB format.

I give 100% of the credit for this installation hack to Codefucius's 2014 blog post regarding the same.

Download the Xerox 600 drivers. There is no way to wget the file directly as there is a licensing agreement:

Xerox drivers

Install the 32bit dependencies:

  dpkg --add-architecture i386
  sudo apt-get install libcupsimage2:i386

Unzip the Xerox drivers which will provide a .deb driver package. Install this package with assurance that dependencies are met:

  sudo gdebi <driver.deb>

or

  sudo dpkg -i <driver.deb>
  sudo apt-get install -f

Add your desired user to the lpadmin group to allow administration of CUPS.

  sudo gpasswd -a <YOURUSER> lpadmin

Connect to the local CUPS server, install the Dell printer via the admin interface, but choose the Xerox 6000B driver.

  http://localhost:631
Java Webstart execution at CLI
  javaws <container_name>.jnlp
Full-Screen VirtualBox w/ Linux Host and OpenBSD Guest

On host Linux system execute:

  VBoxManage setextradata [VM-name] CustomVideoMode1 [WxHxBPP]

On guest OpenBSD system use the following xorg.conf file in /etc/X11.

Credit for the help, and the original article is hosted at HiR.

Disabled the demon touchpad on Bunsen Labs Linux

Find the device ID associated with your touchpad:

  sudo xinput

Disabled is based on its device ID:

  xinput set-prop <id> "Device Enabled" 0

9Front

Detect and Update Resolution on 9Front Installations

@{rfork n; aux/realemu; aux/vga -p} # obtain a list of vesa bios modes

@{rfork n; aux/realemu; aux/vga -m vesa -l 1024x768x16} # example resolution

Configure Rio to auto-scroll

sam $home/lib/profile

Add the -s parameter:

rio -s -i riostart

Restart Rio to show the change:

fshalt -r