FbTerm(1)
πΈ FbTerm(1) β FbTerm User Manual πΈ
π NAME
FbTerm β a fast Frame Buffer based TERMinal emulator for linux β¨
β¨ SYNOPSIS
fbterm [options] [--] [command [arguments]]
π¦ DESCRIPTION
okay so bestie, FbTerm is a fast terminal emulator for linux, and it runs on a frame buffer device or a VESA video card. and the feature list?? it's giving main character energy fr fr:
- mostly as fast as terminal of linux kernel while accelerated scrolling is enabled
- select font with fontconfig and draw text with freetype2, same as Qt/Gtk+ based GUI apps
- dynamically create/destroy up to 10 windows initially running default shell
- record scroll-back history for every window
- auto-detect current locale and convert text encoding, support double width scripts like Chinese, Japanese etc
- switch between configurable additional text encodings with hot keys on the fly
- copy/past selected text between windows with mouse when gpm server is running
- change the orientation of screen display, a.k.a. screen rotation
- lightweight input method framework with client-server architecture
- background image for eye candy
π₯ OPTIONS
command [arguments] may be given to override the built-in choice of shell program. Normally FbTerm checks the SHELL variable. If that is not set, it tries to use the user's login shell program specified in the password file. If that is not set, /bin/sh will be used. You should use the -- argument to separate FbTerm's options from the arguments supplied to the command.
FbTerm first uses option value specified in command line arguments, then in the configure file $HOME/.fbtermrc. If that file doesn't exist, FbTerm will create it with default options on startup. π
-h,--helpβ display the help and exit-V,--versionβ display FbTerm version and exit-v,--verboseβ display extra FbTerm's information-n,--font-names=textβ specify font family names-s,--font-size=numβ specify font pixel size--font-width=numβ force font width--font-height=numβ force font height-f,--color-foreground=numβ specify foreground color-b,--color-background=numβ specify background color-e,--text-encodings=textβ specify additional text encodings-a,--ambiguous-wideβ treat ambiguous width characters as wide-r,--screen-rotate=numβ specify the orientation of screen display-i,--input-method=textβ specify input method program--cursor-shape=numβ specify default cursor shape--cursor-interval=numβ specify cursor flash interval--vesa-mode=numβ specify VESA video mode--vesa-mode=listβ display available VESA video modes
see comments in $HOME/.fbtermrc for details of these options. π
β¨οΈ SHORTCUT SUMMARY
πΉ keyboard
CTRL_ALT_Eβ exit from FbTermCTRL_ALT_Cβ create a new windowCTRL_ALT_Dβ destroy current windowCTRL_ALT_1β switch to window 1CTRL_ALT_2β switch to window 2CTRL_ALT_3β switch to window 3CTRL_ALT_4β switch to window 4CTRL_ALT_5β switch to window 5CTRL_ALT_6β switch to window 6CTRL_ALT_7β switch to window 7CTRL_ALT_8β switch to window 8CTRL_ALT_9β switch to window 9CTRL_ALT_0β switch to window 10SHIFT_LEFTβ switch to previous windowSHIFT_RIGHTβ switch to next windowSHIFT_PAGEUPβ history scroll upSHIFT_PAGEDOWNβ history scroll downCTRL_ALT_F1β switch to encoding of current localeCTRL_ALT_F2toCTRL_ALT_F6β switch to additional encodingsCTRL_SPACEβ toggle input methodCTRL_ALT_Kβ kill input method server
π±οΈ mouse
- move when left button down β select text
- double click with left button β auto select text
- click with right button β paste selected text
Sometimes above actions will not work, please try to redo them with shift key holding down. π yes really, just hold shift and try again bestie
π FRAME BUFFER DEVICE
Before executing FbTerm, make sure there is a frame buffer device in your system, and you have read/write access right with it. Normally FbTerm tries to open /dev/fb0 and /dev/fb/0, environment variable FRAMEBUFFER may be used to override this built-in behavior. π«Ά
β VESA VIDEO DEVICE
From version 1.6, FbTerm adds VESA video card support. By default, FbTerm tries frame buffer device first, if failure, then tries to use VESA device with highest resolution and color depth. option vesa-mode may be given to force only open VESA device with the specified video mode. To see available video modes for your VESA card, execute fbterm --vesa-mode=list.
Attention: 1) VESA support requires root privilege to work; 2) do not force to use VESA device on the system with frame buffer device enabled, they maybe conflict with each other. π do not do it, i'm serious
π FONT
FbTerm invokes fontconfig to get a font list, if the first font doesn't contain the glyph for the rendering character, it will try second font, then the third, ... and so on, user can see this ordered font list with fbterm -v. π
If you don't like the fonts selected by FbTerm, execute fc-list to get available fonts, choose favorites as the value of option font-names. You may also modify the configure file of fontconfig, which will change the behavior of all programs based on fontconfig! β οΈ like, all of them. periodt.
π¦ TEXT ENCODING
By using iconv, FbTerm converts other encodings to internal encoding UTF-8. On startup, FbTerm checks variable LC_CTYPE to determine the default text encoding, which is binded to shortcut CTRL_ALT_F1. User can specify up to 5 additional encodings with option text-encodings, for example, as a Chinese user, you set text-encodings=gbk,big5, shortcut CTRL_ALT_F2 will bind to gbk, and CTRL_ALT_F3 bind to big5. β¨
In a number of CJK encodings there are ambiguous width characters which have a width of either narrow or wide depending on the context of their use. By default, FbTerm treats them as narrow width characters, option ambiguous-wide may be used to change the behavior.
πΈ BACKGROUND IMAGE
FbTerm doesn't load and parse any image file with various formats directly, instead it takes a screen shot of frame buffer device on startup if variable FBTERM_BACKGROUND_IMAGE is defined, then uses this screen shot as the background for text rendering. In order to enable background image support, user should first put a image to frame buffer device with a image viewer. A wrapper script using fbv is listed below:
#!/bin/bash
# fbterm-bi: a wrapper script to enable background image with fbterm
# usage: fbterm-bi /path/to/image fbterm-options
echo -ne "\e[?25l" # hide cursor
fbv -ciuker "$1" << EOF
q
EOF
shift
export FBTERM_BACKGROUND_IMAGE=1
exec fbterm "$@"
Attention: 1) do not enable background image on frame buffer device with 8bpp depth, because FbTerm changes color map table for correct text rendering; 2) if the screen shot is different from the original image, try to use a fast scrolling disabled frame buffer device. π«£ like, the vibes will be off otherwise
π 256 COLOR EXTENSION
FbTerm supports xterm's 256 color mode extension. The first 16 colors are the default terminal colors. Additionally, there's a 6x6x6 color cube, and 24 grayscale tones. But xterm's 256 color escape sequences conflict with the linux sequences implemented by FbTerm, so private escape sequences were introduced to support this feature:
ESC [ 1 ; n } set foreground color to n (0 - 255)
ESC [ 2 ; n } set background color to n (0 - 255)
ESC [ 3 ; n ; r ; g ; b } set color n to (r, g, b) , n, r, g, b all in (0 - 255)
A new terminfo database entry named fbterm was added to use these private sequences, all program based on terminfo should work with it. By default, FbTerm sets environment variable TERM to value linux, user need run TERM=fbterm /path/to/program to enable 256 color mode. π
π§ INPUT METHOD
Instead of adding input method directly in FbTerm, a client-server based input method framework is designed to do this work. FbTerm acts as a client, standalone IM program as a server, and they run in separated processes.
As a normal IM user, you should install a IM program written for FbTerm, and specify it as the value of option input-method. CTRL_SPACE is the shortcut to activate/deactivate input method. And CTRL_ALT_K may be used to kill the IM program when it has freezed. π
π SECURITY NOTES
FbTerm tries to change linux kernel key map table to setup shortcuts, which requires SYS_TTY_CONFIG capability since kernel version 2.6.15. It means FbTerm should be a setuid 0 program to allow non-root users to use shortcuts. FbTerm only switches to root privilege temporarily when changing key map table, we believe it's pretty much free from security problems. If you really don't like this and have a linux kernel with file system capabilities enabled, which allow user to give binaries a subset of root's powers without using setuid 0 (official kernel 2.6.27 includes it), you can run command sudo setcap 'cap_sys_tty_config+ep' /path/to/fbterm.
FbTerm redirects /dev/tty0 output to the pseudo terminal of current sub-window. In linux before version 2.6.10, anybody can do this as long as the output was not redirected yet; since version 2.6.10, only root or a process with the CAP_SYS_ADMIN capability may do this. You should do similar work with above ones for FbTerm to enable this feature for non-root users. π
okay bestie, this is the part where we make it go FAST π¨β¨
π₯ PERFORMANCE π₯
ngl, this is the tea: according to test results, FbTerm spends more than 95% of its time just painting the screen. like, that's basically its whole personality. so if you speed up painting, you speed up everything. here are some suggestions for your frame buffer device, bestie π
- Enable fast scrolling on the frame buffer device. how does it work? the visible screen is literally just a window into the video memory β so when you scroll, FbTerm only changes the start of that window. it does not have to repaint the whole screen. iconic behaviour, no notes π
- On Intel P6 family processors, the Memory Type Range Registers (MTRRs) may be used to control processor access to memory ranges. and if your video card is on a PCI or AGP bus, turning on write-combining lets bus write transfers get squished together into one bigger transfer before they burst out over the PCI/AGP bus. this can increase performance of FbTerm's paint operations. slay π
fr fr, you might have to enable these yourself for your video card. for example: by default, fast scrolling and write-combining are all disabled on a general VESA frame buffer device, so you'll need to edit your GRUB/LILO configure file to turn them on. here's a GRUB example π«Ά
title Ubuntu
root (hd0,0)
kernel /boot/vmlinuz ro root=LABEL=UBUNTU splash vga=0x317 video=vesafb:ywrap,mtrr:3
initrd /boot/initrd.img
and you can vibe check your fast scrolling status with fbterm -v β if you see a message with scrolling: redraw, that means fast scrolling is disabled. anything else means it's enabled β¨
π AUTHOR π
Written by dragchan. (main character energy, honestly π)
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie π please submit bug reports to <http://code.google.com/p/fbterm/issues>.
π COPYRIGHT π
Copyright Β© 2008-2010 dragchan. License GPLv2: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (yes that's the dramatic part, we love a disclaimer π)
and that's the whole page, bestie!! π this was FbTerm 1.7, dated October 2010 β FbTerm(1), periodt πβ¨π¦
go forth and scroll fast π
π¦ where this page comes from
- debian bookworm: fbterm 1.7-5 Β· GPL-2.0-only
- debian trixie: fbterm 1.7-5 Β· GPL-2.0-only
- fedora 43: fbterm 1.7-33.fc43 Β· GPL-2.0-or-later
- fedora 44: fbterm 1.7-34.fc44 Β· GPL-2.0-or-later
- ubuntu jammy: fbterm 1.7-5 Β· GPL-2.0-only
- ubuntu noble: fbterm 1.7-5build1 Β· GPL-2.0-only
- ubuntu questing: fbterm 1.7-5build1
- ubuntu resolute: fbterm 1.7-5build2 Β· GPL-2.0-only
- ubuntu stonking: fbterm 1.7-5build2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms