nsd: authoritative  nsd: DNSSEC  nsd: DANE  rdist: intro  pentest notes  talks  i3wm: quick'n'dirty 

Quick steps to run i3wm on OpenBSD

Short note about the scope

As I’m not so familiar with i3wm (I mostly ran XFCE or Gnome for years) my first run was done into a Virtualbox VM. That way I’m gonna give you some tips to play with better resolutions under (thanks to Joel Carnat: @jcarnat)

https://www.tumfatig.net/20190131/customized-resolution-for-openbsd-in-virtualbox/

Here’s how I set mine to deal with 1440x900 resolution:

VBoxManage setextradata openbsd-i3-vm CustomVideoMode1 1440x900x32

VBoxManage getextradata openbsd-i3-vm
 Key: CustomVideoMode1, Value: 1440x900x32

nb. If you set the video mode in later steps note that you will need to shutdown the VM fully before re-running it - that way only the changes will take effect.

steps to change resolution (only in case of a VM, skip to the next step if you run it natively):

OpenBSD 6.5 installation steps

Well, do it the way you like ;-)

First post-installation steps

As I’m running a 6.5 (and not a -CURRENT but if there is some tips I’ll try to keep this page up to date) here’s what to be done, my humble way:

$ doas syspatch
$ doas pkg_add -v i3 tmuxinator conky firefox mozilla-dicts-fr libreoffice-i18n-fr p7zip password-store
$ doas pkg_add -v xpdf audacity gimp profanity irssi [...whatever you want...]

These packages matches my “early” needs but only i3 is required so far. Note that i3 doesn’t come with its own terminal (xterm will be used) but you can here install your favorite one. May be Thunar too, if you would like to use a classic graphical file manager (I used some xfce4-* tools by habbits).

Additional packages to match your needs, the idea here is just to stay focused on the i3wm itself, no to tell you how to make a “perfect desktop || thistooldoitbetter”.

Time to set your i3 WM up

Now let’s run X and do some early things:

$ startx
$ i3-config-wizard
$ echo "exec --no-startup-id setxbmap fr" >> ~/.config/i3/config
$ echo "exec --no-startup-id xrandr --ouput default --mode 1440x900" >> ~/.config/i3/config

Then kill your X server (quick'n'dirty way is still Ctrl+Alt+Backspace ;-))

I dropped the section “start some nice programs” to avoid xclock / xconsole & so on to be run at startup, editing /etc/X11/xinit/xinitrc

I also modified .config/i3/config:

bindsym $mod+Return exec /usr/X11R6/bin/xterm

to:

bindsym $mod+Return exec /usr/X11R6/bin/xterm -bg black -fg white

Then comes the last step:

$ sed -i 's/^fvwm || xterm$/exec i3/' /etc/X11/xinit/xinitrc
$ startx

TADA! First run.

nb. feel free to take a long look a the lovely single config file ~/.config/i3/config

Some early screenshots:

My workspace #1: 10 stacked terminals left side, window on the right running htop

Workspace #2 here: mostly used by Firefox, two tabs

Workspace #3 here: one calling conky, running it, and a netstat

And the #4 last one, writing some Libreoffice/Impress presentation

Usefull shortcuts and tips for the newcomers

i3wm uses a default “Bind Key” (called “Mod Key” into i3’s config file: ~/.config/i3/config) combination with other ones to give your window manager “orders” - like the way to arrange windows, put them in fullscreen, search for a binary into your PATH & run it, navigate through workspaces & so on. This magic key could be the “Windows” or “Fn” key on your keyboard. But you can ensure by running some of the quick tips below:

Mod+Return : opens up a terminal
Mod+2 : will bring you to workspace #2 (and so on...) - take a look at i3status' bottom bar
Mod+d : will bring up the "dmenu", typing the first characters (executable binary must be into PATH)
Mod+f : will make the current window in fullscreen (Mod+f again to de-fullscreen it)
Mod+[jklm]: will make you get the focus on near windows

Feel free to play (and break/loose) your windows here:

https://defkey.com/i3-window-manager-shortcuts

and there (the official one):

https://i3wm.org/docs/userguide.html

ps. I really dislike full white background, do not forget to take a look at that section. I’ll drop down mine and my fonts, with some screenshots later:

https://i3wm.org/docs/userguide.html#changingcolors

That’s all for the moment! :-)


© 2019 captain_say_w00t  and the puffy sisters  User Agreement  Privacy Policy