123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <!DOCTYPE html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><meta name="keywords" content="GNU, Emacs, Libre Software, Hurd, Guile, Guix" /><meta name="description" content="GNUcode.me is a website focusing on libre software projects, especially the GNU project." /><link type="application/atom+xml" rel="alternate" title="GNUcode.me -- Feed" href="/feed.xml" /><a rel="me" href="https://fosstodon.org/@thegnuguy"></a><link type="text/css" href="css/footer.min.css" rel="stylesheet"></link><link type="text/css" href="css/header.min.css" rel="stylesheet"></link><link type="text/css" href="css/main.min.css" rel="stylesheet"></link><title>Afterboot OpenBSD — GNUcode.me</title></head><body><header><nav><ul><li><a href="index.html">GNUcode.me</a></li><li><a href="services.html">Services</a></li><li><a href="about.html">About</a></li><li><a href="business-ideas.html">Business-ideas</a></li></ul></nav></header><h1>Afterboot OpenBSD</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — April 28, 2023</h3><div><h1>set up doas</h1><p>Let’s make any user that is in the group “wheel” able to execute privledged
- commands.</p><pre><code># cat /etc/examples/doas.conf | sed 's/keepenv/persist keepevn/' > /etc/doas.conf</code></pre><h1>install packages</h1><pre><code># pkg_add emacs dino netsurf dino git fish mpv firefox gpg \
- hack-fonts pkg_add isync evince libreoffice xfce4-terminal \
- xfce4-screenshooter xfce4-dict i3</code></pre><p>When I installed isync, I got a message that said,
- the following rcscripts were installed: /etc/rc.d/saslauthd
- apparently openbsd’s packaged isync, lets you set up a daemon to periodically
- fetch your email. looking at the file, I’m not sure what it is.</p><p>Well I could list all of the packages that I minually installed, it is actually
- much easier to create a list of packages.</p><pre><code>pkg_info -mz | tee openbsd-pkg-list</code></pre><p>Now, when I want to re-install those packages I can just do this:</p><pre><code># pkg_add -l list</code></pre><h1>clone my various repos</h1><pre><code>cd ~/
- git clone https://notabug.org/jbranso/prog
- cd prog
- mkdir -p gnu/guix/
- cd gnu/guix
- git clone https://notabug.org/jbranso/guix
- mv guix guix-src
- git clone https://notabug.org/jbranso/guix-config</code></pre><h1>update my OpenBSD install</h1><p><code># doas syspatch</code></p><h1>enable softupdates</h1><p>Unless you are using really old ancient hardware, you should enable softupdates.</p><p>change</p><p><code>43434930490.a / ffs rw 1 1</code></p><p>to</p><p><code>43434930490.a / ffs rw,softdep 1 1</code></p><h1>window manager stuff</h1><h2>modify my ~/.xsession</h2><p>auto start xfce, prefer utf-8, set up a background color, and lock X after some
- inactivity.</p><pre><code>cat ~/.xsession
- # prefer UTF-8 whenever possible
- export LC_CTYPE="en_US.UTF-8"
- # use UTF-8 everywhere
- export LANG=en_US.UTF-8
- # specify location of kshrc
- export ENV=$HOME/.kshrc
- # set your background color
- xsetroot -solid dimgray
- xidle -delay 5 -sw -program "/usr/X11R6/bin/xlock -mode flag" \
- -timeout 300
- exec i3</code></pre><h2>set up polybar for i3</h2><p><a href="https://forum.endeavouros.com/t/tutorial-easy-setup-endeavour-xfce-i3-tiling-window-manager/13171">https://forum.endeavouros.com/t/tutorial-easy-setup-endeavour-xfce-i3-tiling-window-manager/13171</a></p><pre><code># doas pkg_add polybar
- $ mkdir ~/.config/polybar
- $ cp /usr/local/share/examples/polybar/config ~/.config/polybar</code></pre><p>This <a href="https://github.com/polybar/polybar/wiki/Fonts">wiki page</a> has a lot of details about setting up fonts.</p><p>More information is in my <a href="https://notabug.org/jbranso/openbsd-home/src/master/.config/polybar">polybar config</a>.</p><h1>If this is a laptop with a battery, then install this</h1><p><a href="https://dataswamp.org/~solene/2022-03-21-openbsd-cool-frequency.html">https://dataswamp.org/~solene/2022-03-21-openbsd-cool-frequency.html</a></p><pre><code># doas pkg_add obsdfreqd
- # rcctl enable obsdfreqd
- # rcctl stop apmd
- # rcctl disable apmd
- # rcctl start obsdfreqd</code></pre><h1>set up doom emacs</h1><p>(I also need to ensure that <code>~/prog/gnu/guix/</code> exists because my emacs looks for
- some guix snippets).</p><pre><code>git clone --depth 1 https://github.com/doomemacsdoomemacs ~/.config/emacs
- ~/.config/emacs/bin/doom install</code></pre><p>add doom emacs to path</p><pre><code>cat ~/.profile
- # $OpenBSD: dot.profile,v 1.8 2022/08/10 07:40:37 tb Exp $
- #
- # sh/ksh initialization
- #
- PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/home/joshua/.config/emacs/bin
- export PATH HOME TERM</code></pre><h1>copy my ~/ config files</h1><p>cp .authinfo.gpg, .ssh, .mbsyncrc, .gnupg/</p><p>cp documents to ~/</p><h1>import my gpg keys from my usb stick.</h1><p><code>gpg --import ./dismail.de.gpg.key.asc</code></p><p><code>git config --global commit.gpgsign true</code></p><p><code>gpg --list-secret-keys --keyid-format=long</code></p><p>Copy the really long alphanumeric word from the above command. It'll
- look something like:</p><p>62A42A3CC13497D626FZ686C750BCFEF3A5E1572</p><p><code>git config --global user.signingkey <your alphanumeric word></code></p><h2>set up pinentry</h2><pre><code>pkg_add pinentry-dmenu</code></pre><p>There are two things that you need to do to set up pinentry-dmenu, so that when I
- need to sign commits or decrypt stuff, the pinentry-dmenu popup happens.</p><ul><li><p>set up gpg agent</p><pre><code>cat ~/.gnupg/gpg-agent.conf
- pinentry-program /usr/local/bin/pinentry-dmenu
-
- default-cache-ttl 3600</code></pre></li><li><p><code>man gpg-agent</code> says to do this:</p><pre><code>You should always add the following lines to your .bashrc or whatever
- initialization file is used for all shell invocations:
- cat ~/.profile | grep GPG_TTY
- GPG_TTY=$(tty)
- export GPG_TTY</code></pre></li><li><p>start a dbus session</p><p>This is only needed if you want to use pinentry-gnome3</p><pre><code>cat ~/.xsession | grep dbus
- # start a dbus session, which I believe gpg needs to for graphical pinentry
- # I found this command in /usr/local/share/doc/pkg-readmes/dbus
- if [ -x /usr/local/bin/dbus-launch -a -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then
- eval `dbus-launch --sh-syntax --exit-with-x11`</code></pre></li></ul><p>If you have difficulty getting pinentry to work, here are some steps to
- manually get pinentry to work:</p><p>in a fish terminal a type in:</p><pre><code>gpgconf --kill gpg-agent
- set GPG_TTY $(tty)
- export GPG_TTY
- git commit -m "my commit message"</code></pre><h1>change <code>/etc/motd</code></h1><p>I once set an invalid option up in /etc/fstab that threw me in a root shell with
- only root mounted. All of a sudden vi would not work. That below command is
- how to fix it: <code>export TERM=vt200</code></p><pre><code>cat /etc/motd
- OpenBSD 7.2 (GENERIC.MP) #7: Sat Feb 25 14:07:58 MST 2023
- Welcome to OpenBSD: The proactively secure Unix-like operating system.
- Please use the sendbug(1) utility to report bugs in the system.
- Before reporting a bug, please try to reproduce it with the latest
- version of the code. With bug reports, please try to ensure that
- enough information to reproduce the problem is enclosed, and if a
- known fix for it exists, include that as well.
- If you are having trouble using vi in the console try this:
- export TERM=vt200;</code></pre><h1>install haunt on OpenBSD</h1><p><code>doas pkg_add guile info</code></p><p>First install guile-commonmark:</p><pre><code>$ cd ~/prog/guile
- $ git clone git clone https://github.com/OrangeShark/guile-commonmark
- $ cd guile-commonmark
- # export AUTOCONF_VERSION=2.71
- # export export AUTOMAKE_VERSION=1.16.5
- # doas pkg_add autoconf automake</code></pre><p>Why am I seeing 2 aclocal binaries? No idea.</p><pre><code>ls /usr/local/bin/aclocal*
- ls /usr/local/bin/automake*
- /usr/local/bin/aclocal
- /usr/local/bin/aclocal-1.16
- /usr/local/bin/automake
- /usr/local/bin/automake-1.16</code></pre><p>Arsen on irc helped me figure out the next incantation.</p><pre><code>AUTOMAKE=automake-1.16 ACLOCAL=aclocal-1.16 ./bootstrap
- ./configure
- make
- make check
- # make install</code></pre><p>Now let’s install haunt</p><pre><code>git clone https://git.dthompson.us/haunt.git
- cd haunt
- AUTOMAKE=automake-1.16 ACLOCAL=aclocal-1.16 ./bootstrap
- ./configure
- make
- make check
- # make install</code></pre></div></article></section></main><footer><p>© 2020 Joshua Branson. The text on this site is free culture under the Creative Commons Attribution Share-Alike 4.0 International license.</p><p>This website is build with Haunt, a static site generator written in Guile Scheme. Source code is <a href="https://notabug.org/jbranso/gnucode.me">available.</a></p><p>The color theme of this website is based off of the famous <a href="#3f3f3f" target="_blank">zenburn</a> theme.</p></footer></body>
|