Read the Second Part of this Adventure
this post was written from my new OpenBSD 7.0 box
I wanted to edit some typos and grammatical error in my last OpenBDS post from my OBSD box, but after an unexpected shutdown I ended up with a corrupted file system. I was greeted with a lot of error messages and a recovery shell. Luckily the error told me exactly what to do: use the file system check utility fsck_ffs
to check the partition wd0e
(or so). I used the F option which auto deleted all corrupted files. That allowed me to boot again, but I also deleted files from /usr/
. So it turned out that I couldn't open xterm
anymore.
I decided to go for a reinstall, which anyway only takes around 10 minutes. This time I didn't want the display manager xenodm
to auto start. I thought: I might just use startx
to start i3
. So I followed my last OBSD post and executed startx
(pre-installed in contrast to arch) and got fvwm
running. Whoop whoop! When I prepared my xinitrc
# content of $HOME/.xinitrc exec /usr/local/bin/i3
I got the following error:
no screens found(EE)
Even after deleting my xinitrc
I didn't manage to get the X server running again. So, I thought: "I'll reinstall and adapt /etc/X11/xinit/xinitrc
to execute i3
instead of fvwm
since I don't know what I changed in order to stop X11 from working". Auto partitioning, X Server yes, xenodm yes, sshd no and reboot:
qemu-system-x86_64 -drive file=obsdbox.img -m 4G -smp cpus=2 -cdrom openbsd_install70.iso -boot once=d
Goals:
- use
st
as terminal emulator - use
firefox
as graphical browser - use
i3-gaps
as window manager - use
shutdown
to power down completely
Essentials
Before installting a new terminal emulator I did some minor conifguration and downloaded some essential packages. I added the group wheel
to doas.conf
such that I don't have to use su or login as root
:
su root -c 'echo "permit persist :wheel" > /etc/doas.conf' doas pkg_add git vim lynx bash bash-completion
1. Suckless Terminal
First off, I created a folder for global software and cloned the suckless terminal source code. I removed the -lrt
option from the config.mk
file with sed
(see OBSD pt.2). And added /opt/local/bin
to the PATH
variable. I also changed the keyboard shortcuts for shrinking and expand font sizes (search for zoom in config.h
), but didn't document it here.
doas mkdir -p /opt/local/src /opt/local/bin cd /opt/local/src doas git clone https://git.suckless.org/st cd st doas sed -i "s/ -lrt//" config.mk && doas make doas ln -s /opt/local/src/st/st /opt/local/bin/st echo -e "export PATH=$PATH:/opt/local/bin" >> ~/.profile echo -e "set -o vi\nexport PS=\"\u@\h:\w\$ \"" > ~/.bashrc
2. Install Firefox
This step is luckily literally one command:
doas pkg_add firefox
3. Make i3 default Window Manager
I don't know how, but it is the default window manager. Try:
echo "exec /usr/local/bin/i3 > ~/.xsession"
4. Shutdown
halt -p
You might want to avoid typing your password everytime:
echo "permit :wheel cmd /sbin/halt -p" | doas tee -a /etc/doas.conf