-
-
Notifications
You must be signed in to change notification settings - Fork 5
Framebuffer Mode
Framebuffer mode provides direct rendering to /dev/fb0 on Linux console, enabling pixel-perfect DOS-like display with classic text modes.
Note: This feature is Linux-only and requires the framebuffer-backend feature at compile time.
- Linux operating system
- Physical console (TTY1-6), not terminal emulators or SSH
- Access to
/dev/fb0(root or member ofvideogroup) - Compiled with
--features framebuffer-backend
# Build with framebuffer support
cargo build --release --features framebuffer-backend
# Run in framebuffer mode (may require sudo)
sudo ./target/release/term39 -f --fb-mode=80x25Use the interactive setup wizard to configure framebuffer mode:
term39 --fb-setupThe wizard allows you to:
- Select text mode
- Choose pixel scale factor
- Select console font
- Configure mouse settings
Settings are saved to ~/.config/term39/fb.toml.
| Mode | Columns | Rows | Character Size |
|---|---|---|---|
40x25 |
40 | 25 | 16x16 |
80x25 |
80 | 25 | 8x16 (default) |
80x43 |
80 | 43 | 8x11 |
80x50 |
80 | 50 | 8x8 |
| Mode | Columns | Rows | Character Size |
|---|---|---|---|
160x50 |
160 | 50 | 8x16 |
160x100 |
160 | 100 | 8x16 |
320x100 |
320 | 100 | 8x16 |
320x200 |
320 | 200 | 8x8 |
# Enable framebuffer mode
term39 -f
term39 --framebuffer
# Specify text mode
term39 -f --fb-mode=80x50
# Set pixel scale (1-4 or auto)
term39 -f --fb-scale=2
# Specify font
term39 -f --fb-font=Unifont-APL8x16# List available fonts
term39 --fb-list-fonts
# Use specific font
term39 -f --fb-font=Uni3-Terminus16# Specify mouse device
term39 -f --mouse-device=/dev/input/event2
# Adjust sensitivity (0.1-5.0)
term39 -f --mouse-sensitivity=1.5
# Swap mouse buttons
term39 -f --swap-mouse-buttons
# Invert axes
term39 -f --invert-mouse-x
term39 -f --invert-mouse-y| Option | Description |
|---|---|
-f, --framebuffer
|
Enable framebuffer mode |
--fb-mode <MODE> |
Text mode (40x25, 80x25, etc.) |
--fb-scale <SCALE> |
Pixel scale factor (1, 2, 3, 4, auto) |
--fb-font <FONT> |
Console font name |
--fb-list-fonts |
List available fonts and exit |
--fb-setup |
Launch setup wizard |
--mouse-device <DEV> |
Mouse input device path |
--mouse-sensitivity <N> |
Mouse sensitivity (0.1-5.0) |
--swap-mouse-buttons |
Swap left/right buttons |
--invert-mouse-x |
Invert X-axis |
--invert-mouse-y |
Invert Y-axis |
# Add to video group (for /dev/fb0)
sudo usermod -aG video $USER
# Add to input group (for mouse devices)
sudo usermod -aG input $USER
# Log out and back in for changes to take effectsudo term39 -f --fb-mode=80x25Ensure you're on a physical console (Ctrl+Alt+F1 through F6), not a terminal emulator.
Add your user to the video group:
sudo usermod -aG video $USERThen log out and back in.
-
Check if mouse device exists:
ls -la /dev/input/mice /dev/input/event* -
Add user to input group:
sudo usermod -aG input $USER -
Try specifying the device explicitly:
term39 -f --mouse-device=/dev/input/event2
Use --fb-list-fonts to see available fonts and their dimensions, then select one matching your desired text mode.
| Font | Dimensions | Notes |
|---|---|---|
Unifont-APL8x16 |
8x16 | Excellent Unicode coverage |
Uni3-Terminus16 |
8x16 | Good all-around font |
Uni3-TerminusBold16 |
8x16 | Bold variant |
Unifont |
16x16 | Full Unicode, for 40x25 mode |
Install fonts on Debian/Ubuntu:
sudo apt install kbd unifontFramebuffer settings are saved to ~/.config/term39/fb.toml:
[display]
mode = "80x25"
scale = "auto"
[font]
name = "Unifont-APL8x16"
[mouse]
device = "/dev/input/mice"
swap_buttons = false
invert_x = false
invert_y = false