OpenBSD BASED Challenge Day 3

by Root BSD

Today I learned some cool new things about tmux(1),xterm(1), and installed the source tree via cvs(1).

Day 3 into the challenge and I'm getting some cool refreshers about using xterm(1) and tmux(1). Turns out my problem with tmux is because the -2 flag needs to be set for 256 color mode in the terminal (my main terminal sakura doesn't require this). I was unsuccessful in getting 256 color-mode set in ~/.tmux.conf. So I set this in my ~/.cwmrc

xterm -e tmux -2

Simple enough! The tmux(1) man page was pretty lengthy, so I made heavy use of the / command to find right keywords to get me going. Setting colors for the window statuses is done like this,

setw -g window-status-current-style 'fg=colour0 bg=colour36 bold' setw -g window-status-current-format ' #I#[fg=colour0]:#[fg=colour0]#W#[fg=colour0]#F '

setw -g window-status-style 'fg=colour49 bg=colour233' setw -g window-status-format ' #I#[fg=colour192]:#[fg=colour193]#W#fg=colour194]#F '

window-status-current is the active tab, window-status-format is the inactive tab. The clock on the right hand side is set like this,

set -g status-right '#[fg=colour233,bg=colour42] %m/%d #[fg=colour233,bg=colour42] %I:%M:%S '

There is also a clock-mode-style option to set 12 or 24 hour formats.

Control of tmux(1) is pretty straightforward. CTRL-b is the prefix key. C-b β€œ will split the window horizontally, C-b % will split the window vertically. C-b c will open a new window in a tabbed arrangement, windows are numbered beginning with 0. C-b arrow key will move you to your desired frame. C-b C-arrows resize panes, C-b ! will break your current frame from the panes into it's own tab, etc. The tmux(1) manpage has a detailed list of all the keybindings. They can be configured in the ~/.tmux.conf

Another cool feature I discovered is attach/detach client feature. C-b d will β€œdetach” the client, basically suspending all your work to memory. Then resume with tmux attach, really neat stuff. I feel like I'm only scratching the surface of what I can do with tmux. I normally just use it because I'm a tabbed window manager kind of guy and I don't want 20 terminals open, rather one terminal open with tmux doing the heavy lifting for me.

Another really cool thing I learned is how to resize the internal border (space between text and window border) in xterm(1), it can be done with the -b flag or in the ~/.Xdefaults(or .Xresources)

xterm*internalBorder: 8

If only xterm(1) did better with transparency, I may switch to it on my production machine. Normally I use the sakura terminal.

I also went ahead and installed the entire OpenBSD source tree via anoncvs. Instructions are listed in the anoncvs section on OpenBSD's main website. The key thing is to setup your src ports and xenocara folders to belong to the wsrc group. However I was still not getting write permissions so I just set my user as the folder's owner. Don't know if this is cheating or not, but they advised not to do too much as root.

chown user src ports xenocara

Well that's enough for today. I also found a neat way to read gopher sites through links fb via floodgap.com's gopher proxy lite.

http://gopher.floodgap.com/gopher/gw.lite?=gopher.floodgap.com+70+312f6e6577

Gopher is an alternative web protocol and gopher sites are called 'gopher holes'. A lot of interesting reads can be found in gopher holes. I also found a gemini portal for the gemini protocal, but many of the listed sites didn't work. I'll look more into that.

All in all using OpenBSD this way is opening my mind to a based kind of simplicity in OpenBSD that I knew was there, but never really forced myself to learn it. I realize now just how bloated my normal way of using the machine is. Now I understand that the software in ports is there for us to use and enjoy, however base tools, command line tools do take it to a calmer level of computer interaction. I expect this month to really change the way I use an OpenBSD system going forward. Anyways, happy hacking in OpenBSD!

Also, please forgive me but I installed scrot. No more photos of the LCD screen with my phone, that just didn't feel right.

Tmux beauty

My tmux rice!

Installing the source tree

Installing the source tree via anoncvs.