Debian Codegraph @

doc/fbterm.1.in

raw
1 .TH "FbTerm" "1" "@RELEASE_DATE@" "FbTerm @VERSION@" "FbTerm User Manual"
2 .SH "NAME"
3 FbTerm - a fast Frame Buffer based TERMinal emulator for linux
4 .SH "SYNOPSIS"
5 \fBfbterm\fR [\fIoptions\fR] [--] [\fIcommand\fR [\fIarguments\fR]]
6 .SH "DESCRIPTION"
7 FbTerm is a fast terminal emulator for linux with frame buffer device or VESA video card. Features include:
8
9 * mostly as fast as terminal of linux kernel while accelerated scrolling is enabled
10 * select font with fontconfig and draw text with freetype2, same as Qt/Gtk+ based GUI apps
11 * dynamically create/destroy up to 10 windows initially running default shell
12 * record scroll-back history for every window
13 * auto-detect current locale and convert text encoding, support double width scripts like Chinese, Japanese etc
14 * switch between configurable additional text encodings with hot keys on the fly
15 * copy/past selected text between windows with mouse when gpm server is running
16 * change the orientation of screen display, a.k.a. screen rotation
17 * lightweight input method framework with client-server architecture
18 * background image for eye candy
19 .SH "OPTIONS"
20 \fIcommand\fR [\fIarguments\fR] may be given to override the built-in choice of shell program. Normally FbTerm
21 checks the \fISHELL\fR variable. If that is not set, it tries to use the user's login shell program specified in the password
22 file. If that is not set, /bin/sh will be used. You should use the \fI--\fR argument to separate FbTerm's options from
23 the arguments supplied to the \fIcommand\fR.
24
25 FbTerm first uses option value specified in command line arguments, then in the configure file \fI$HOME/.fbtermrc\fR.
26 If that file doesn't exist, FbTerm will create it with default options on startup.
27 .TP
28 \fB-h, --help\fR
29 display the help and exit
30 .TP
31 \fB-V, --version\fR
32 display FbTerm version and exit
33 .TP
34 \fB-v, --verbose\fR
35 display extra FbTerm's information
36 .TP
37 \fB-n, --font-names=\fR\fItext\fR
38 specify font family names
39 .TP
40 \fB-s, --font-size=\fR\fInum\fR
41 specify font pixel size
42 .TP
43 \fB--font-width=\fR\fInum\fR
44 force font width
45 .TP
46 \fB--font-height=\fR\fInum\fR
47 force font height
48 .TP
49 \fB-f, --color-foreground=\fR\fInum\fR
50 specify foreground color
51 .TP
52 \fB-b, --color-background=\fR\fInum\fR
53 specify background color
54 .TP
55 \fB-e, --text-encodings=\fR\fItext\fR
56 specify additional text encodings
57 .TP
58 \fB-a, --ambiguous-wide
59 treat ambiguous width characters as wide
60 .TP
61 \fB-r, --screen-rotate=\fR\fInum\fR
62 specify the orientation of screen display
63 .TP
64 \fB-i, --input-method=\fR\fItext\fR
65 specify input method program
66 .TP
67 \fB--cursor-shape=\fR\fInum\fR
68 specify default cursor shape
69 .TP
70 \fB--cursor-interval=\fR\fInum\fR
71 specify cursor flash interval
72 .TP
73 \fB--vesa-mode=\fR\fInum\fR
74 specify VESA video mode
75 .TP
76 \fB--vesa-mode=list\fR
77 display available VESA video modes
78
79 .TP
80 see comments in \fI$HOME/.fbtermrc\fR for details of these options.
81 .SH "SHORTCUT SUMMARY"
82 keyboard:
83 CTRL_ALT_E: exit from FbTerm
84 CTRL_ALT_C: create a new window
85 CTRL_ALT_D: destroy current window
86 CTRL_ALT_1: switch to window 1
87 CTRL_ALT_2: switch to window 2
88 CTRL_ALT_3: switch to window 3
89 CTRL_ALT_4: switch to window 4
90 CTRL_ALT_5: switch to window 5
91 CTRL_ALT_6: switch to window 6
92 CTRL_ALT_7: switch to window 7
93 CTRL_ALT_8: switch to window 8
94 CTRL_ALT_9: switch to window 9
95 CTRL_ALT_0: switch to window 10
96 SHIFT_LEFT: switch to previous window
97 SHIFT_RIGHT: switch to next window
98 SHIFT_PAGEUP: history scroll up
99 SHIFT_PAGEDOWN: history scroll down
100 CTRL_ALT_F1: switch to encoding of current locale
101 CTRL_ALT_F2 to CTRL_ALT_F6: switch to additional encodings
102 CTRL_SPACE: toggle input method
103 CTRL_ALT_K: kill input method server
104
105 mouse:
106 move when left button down: select text
107 double click with left button: auto select text
108 click with right button: paste selected text
109
110 Sometimes above actions will not work, please try to redo them with shift key holding down.
111 .SH "FRAME BUFFER DEVICE"
112 Before executing FbTerm, make sure there is a frame buffer device in your system, and you have read/write access right
113 with it. Normally FbTerm tries to open /dev/fb0 and /dev/fb/0, environment variable "\fIFRAMEBUFFER\fR" may be used to override this
114 built-in behavior.
115 .SH "VESA VIDEO DEVICE"
116 From version 1.6, FbTerm adds VESA video card support. By default, FbTerm tries frame buffer device first, if failure,
117 then tries to use VESA device with highest resolution and color depth. option "\fIvesa-mode\fR" may be given to force only open
118 VESA device with the specified video mode. To see available video modes for your VESA card, execute "\fBfbterm --vesa-mode=list\fR".
119
120 Attention: 1) VESA support requires root privilege to work; 2) do not force to use VESA device on the system with frame buffer device
121 enabled, they maybe conflict with each other.
122 .SH "FONT"
123 FbTerm invokes fontconfig to get a font list, if the first font doesn't contain the glyph for the rendering character,
124 it will try second font, then the third, ... and so on, user can see this ordered font list with "\fBfbterm -v\fR".
125
126 If you don't like the fonts selected by FbTerm, execute "fc-list" to get available fonts, choose favorites as
127 the value of option "\fIfont-names\fR". You may also modify the configure file of fontconfig, which will
128 change the behavior of all programs based on fontconfig!
129 .SH "TEXT ENCODING"
130 By using iconv, FbTerm converts other encodings to internal encoding UTF-8. On startup, FbTerm checks variable
131 \fILC_CTYPE\fR to determine the default text encoding, which is binded to shortcut CTRL_ALT_F1.
132 User can specify up to 5 additional encodings with option "\fItext-encodings\fR", for example, as a Chinese user,
133 you set "text-encodings=gbk,big5", shortcut CTRL_ALT_F2 will bind to gbk, and CTRL_ALT_F3 bind to big5.
134
135 In a number of CJK encodings there are ambiguous width characters which have a width of either narrow or wide
136 depending on the context of their use. By default, FbTerm treats them as narrow width characters,
137 option "\fIambiguous-wide\fR" may be used to change the behavior.
138 .SH "BACKGROUND IMAGE"
139 FbTerm doesn't load and parse any image file with various formats directly, instead it takes a screen shot of
140 frame buffer device on startup if variable \fIFBTERM_BACKGROUND_IMAGE\fR is defined, then uses this screen shot as
141 the background for text rendering. In order to enable background image support, user should first
142 put a image to frame buffer device with a image viewer. A wrapper script using fbv is listed below:
143 \fB
144 .br
145
146 #!/bin/bash
147
148 # fbterm-bi: a wrapper script to enable background image with fbterm
149 # usage: fbterm-bi /path/to/image fbterm-options
150
151 echo -ne "\\e[?25l" # hide cursor
152
153 fbv -ciuker "$1" << EOF
154 q
155 EOF
156
157 shift
158 export FBTERM_BACKGROUND_IMAGE=1
159 exec fbterm "$@"
160 \fR
161 Attention: 1) do not enable background image on frame buffer device with 8bpp depth, because FbTerm changes color map
162 table for correct text rendering; 2) if the screen shot is different from the original image, try to use a fast scrolling
163 disabled frame buffer device.
164 .SH "256 COLOR EXTENSION"
165 FbTerm supports xterm's 256 color mode extension. The first 16 colors are the default terminal colors. Additionally, there's
166 a 6x6x6 color cube, and 24 grayscale tones. But xterm's 256 color escape sequences conflict with the linux sequences implemented by FbTerm,
167 so private escape sequences were introduced to support this feature:
168 \fB
169 .br
170
171 ESC [ 1 ; n } set foreground color to n (0 - 255)
172 ESC [ 2 ; n } set background color to n (0 - 255)
173 ESC [ 3 ; n ; r ; g ; b } set color n to (r, g, b) , n, r, g, b all in (0 - 255)
174 \fR
175
176 A new terminfo database entry named "fbterm" was added to use these private sequences, all program based on terminfo should work with it.
177 By default, FbTerm sets environment variable "TERM" to value "linux", user need run "TERM=fbterm /path/to/program" to enable 256 color mode.
178 .SH "INPUT METHOD"
179 Instead of adding input method directly in FbTerm, a client-server based input method framework is designed to do
180 this work. FbTerm acts as a client, standalone IM program as a server, and they run in separated processes.
181
182 As a normal IM user, you should install a IM program written for FbTerm, and specify it as the value of option "\fIinput-method\fR".
183 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.
184
185 .SH "SECURITY NOTES"
186 FbTerm tries to change linux kernel key map table to setup shortcuts, which requires \fISYS_TTY_CONFIG\fR capability since kernel
187 version 2.6.15. It means FbTerm should be a setuid 0 program to allow non-root users to use shortcuts. FbTerm only
188 switches to root privilege temporarily when changing key map table, we believe it's pretty much free from security problems.
189 If you really don't like this and have a linux kernel with file system capabilities enabled, which allow user to give
190 binaries a subset of root's powers without using setuid 0 (official kernel 2.6.27 includes it), you can run command
191 "\fBsudo setcap 'cap_sys_tty_config+ep' /path/to/fbterm\fR".
192
193 FbTerm redirects /dev/tty0 output to the pseudo terminal of current sub-window. In linux before version 2.6.10, anybody can do this
194 as long as the output was not redirected yet; since version 2.6.10, only root or a process with the \fICAP_SYS_ADMIN\fR capability may do this.
195 You should do similar work with above ones for FbTerm to enable this feature for non-root users.
196
197 .SH "PERFORMANCE"
198 According test result, FbTerm spends more than 95% time on painting screen. Speedup painting will significantly
199 increase performance. Here are some suggestions for frame buffer device:
200
201 * Enable fast scrolling on frame buffer device. The visible screen will be just a window of the video memory,
202 when scrolling, FbTerm only change the start of window, no need to repaint the whole screen.
203
204 * On Intel P6 family processors the Memory Type Range Registers (MTRRs) may be used to control processor access to
205 memory ranges. If you have video card on a PCI or AGP bus, enabling write-combining allows bus write transfers
206 to be combined into a larger transfer before bursting over the PCI/AGP bus. This can increase performance of
207 FbTerm's paint operations.
208
209 Maybe you need to enable them manually for your video card. For example, by default fast scrolling and write-combining
210 are all disabled on general VESA frame buffer device, GRUB/LILO configure file should be modified to enable them.
211 A GRUB example is showed below:
212
213 title Ubuntu
214 root (hd0,0)
215 kernel /boot/vmlinuz ro root=LABEL=UBUNTU splash vga=0x317 \fBvideo=vesafb:ywrap,mtrr:3\fR
216 initrd /boot/initrd.img
217
218 You may check fast scrolling status with "\fBfbterm -v\fR", a message with "scrolling: redraw" means fast scrolling
219 is disabled, otherwise enabled.
220 .SH "AUTHOR"
221 Written by dragchan.
222 .SH "REPORTING BUGS"
223 Please submit bug reports to <\fBhttp://code.google.com/p/fbterm/issues\fR>.
224 .SH "COPYRIGHT"
225 Copyright \(co 2008-2010 dragchan. License GPLv2: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
226 .br
227 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.