© 2011 Warren Block

Last updated 2011-05-26

Available in HTML or PDF. Links to all my articles here. Created with AsciiDoc.

High resolution VESA BIOS modes are rare. X11 can provide borderless screens and windows that look like a text-only console but have many more options.

Introduction

FreeBSD’s bitmap console modes are limited to those provided by the video card’s VESA BIOS. 1280x1024 is a standard mode, but higher resolutions are not available unless the video card manufacturer has implemented them. Many vendors expect their cards to only be used in bitmap mode anyway, and don’t bother with extending the VESA modes.

The end result is that console graphics modes higher than 1280x1024 are often not available. Fortunately, X can be used to provide a graphic console without requiring VESA BIOS support. Even better, basic X11 features like 2D acceleration and antialiased fonts are provided, and graphics-only applications like Firefox can be used.

Minimal Window Managers

There are a selection of window managers that don’t bother with all the graphical gadgets. A quick look through the ports system shows aewm, antiwm, badwm, evilwm, lwm, musca, ratpoison, scrotwm, stumpwm, twm, w9wm, and weewm.

For this example, I’ve chosen antiwm, which is extremely minimal. ratpoison and evilwm are possibly more popular choices.

Setup

Install X with /usr/ports/x11/xorg, then antiwm from /usr/ports/x11-wm/antiwm.

xterm from /usr/ports/x11/xterm can be used, but I prefer the additonal features provided by xfce’s Terminal. It’s in /usr/ports/x11/Terminal.

.xinitrc is used to change settings and run additional programs when X is started.

#!/bin/sh

# map the Zap combination
setxkbmap -option terminate:ctrl_alt_bksp

# set a fast key repeat
xset r rate 250 55

# use xrandr to disable monitors that should not be used.  For example,
# use only the DVI monitor of a VGA/DVI pair:
# /usr/local/bin/xrandr --output VGA-0 --off

# run xterm with no border, white text on a black background, maximized,
#     with large fonts.
# xterm -borderwidth 0 -fg white -bg black -maximized -fn 10x20 &

# run xfce's Terminal (/usr/ports/x11/Terminal) without a menubar
# if desired, turn off the scroll bar with right-click,
# Preferences, General, Scrollbar is: Disabled
Terminal --hide-menubar &

# start antiwm
# for key commands, see /usr/local/share/doc/antiwm/README
exec antiwm

Usage

After startx, the screen is a remarkably console-like terminal. Terminal has many configuration settings to control the font, colors, and actions. Right-click and choose Preferences to change these settings.

antiwm uses various control-t sequences to switch between windows and start new shells as described in /usr/local/share/doc/antiwm/README. Changing these sequences requires modifying the source and recompiling antiwm. Minimalism, remember?

It may be simpler to use Terminal’s tab feature for multiple terminals. Enabling the menubar will show those tabs. The key sequences to control them are shown on the Preferences/Shortcuts tab.

tmux, in /usr/ports/sysutils/tmux, is another option for providing multiple terminals and sessions.

Because this is still X, graphics programs like Firefox or GIMP will still work.

To stop X, use ctrl-alt-backspace.