1FbTerm(1)                     FbTerm User Manual                     FbTerm(1)
2
3
4

NAME

6       FbTerm - a fast Frame Buffer based TERMinal emulator for linux
7

SYNOPSIS

9       fbterm [options] [--] [command [arguments]]
10

DESCRIPTION

12       FbTerm  is  a fast terminal emulator for linux with frame buffer device
13       or VESA video card. Features include:
14
15         * mostly as fast  as  terminal  of  linux  kernel  while  accelerated
16       scrolling is enabled
17         *  select  font with fontconfig and draw text with freetype2, same as
18       Qt/Gtk+ based GUI apps
19         * dynamically create/destroy  up  to  10  windows  initially  running
20       default shell
21         * record scroll-back history for every window
22         *  auto-detect current locale and convert text encoding, support dou‐
23       ble width scripts like Chinese, Japanese etc
24         * switch between configurable additional text encodings with hot keys
25       on the fly
26         *  copy/past selected text between windows with mouse when gpm server
27       is running
28         * change the orientation of screen display, a.k.a. screen rotation
29         * lightweight input method framework with client-server architecture
30         * background image for eye candy
31

OPTIONS

33       command [arguments] may be given to override  the  built-in  choice  of
34       shell  program.  Normally  FbTerm checks the SHELL variable. If that is
35       not set, it tries to use the user's login shell  program  specified  in
36       the password file. If that is not set, /bin/sh will be used. You should
37       use the -- argument to separate FbTerm's  options  from  the  arguments
38       supplied to the command.
39
40       FbTerm  first  uses  option  value specified in command line arguments,
41       then in the configure  file  $HOME/.fbtermrc.   If  that  file  doesn't
42       exist, FbTerm will create it with default options on startup.
43
44       -h, --help
45              display the help and exit
46
47       -V, --version
48              display FbTerm version and exit
49
50       -v, --verbose
51              display extra FbTerm's information
52
53       -n, --font-names=text
54              specify font family names
55
56       -s, --font-size=num
57              specify font pixel size
58
59       --font-width=num
60              force font width
61
62       -f, --color-foreground=num
63              specify foreground color
64
65       -b, --color-background=num
66              specify background color
67
68       -e, --text-encodings=text
69              specify additional text encodings
70
71       -r, --screen-rotate=num
72              specify the orientation of screen display
73
74       -i, --input-method=text
75              specify input method program
76
77       --cursor-shape=num
78              specify default cursor shape
79
80       --cursor-interval=num
81              specify cursor flash interval
82
83       --vesa-mode=num
84              specify VESA video mode
85
86       --vesa-mode=list
87              display available VESA video modes
88
89
90       see comments in $HOME/.fbtermrc for details of these options.
91

SHORTCUT SUMMARY

93       keyboard:
94         CTRL_ALT_E:    exit from FbTerm
95         CTRL_ALT_C:    create a new window
96         CTRL_ALT_D:    destroy current window
97         CTRL_ALT_1:    switch to window 1
98         CTRL_ALT_2:    switch to window 2
99         CTRL_ALT_3:    switch to window 3
100         CTRL_ALT_4:    switch to window 4
101         CTRL_ALT_5:    switch to window 5
102         CTRL_ALT_6:    switch to window 6
103         CTRL_ALT_7:    switch to window 7
104         CTRL_ALT_8:    switch to window 8
105         CTRL_ALT_9:    switch to window 9
106         CTRL_ALT_0:    switch to window 10
107         SHIFT_LEFT:    switch to previous window
108         SHIFT_RIGHT:   switch to next window
109         SHIFT_PAGEUP:    history scroll up
110         SHIFT_PAGEDOWN:  history scroll down
111         CTRL_ALT_F1:                 switch to encoding of current locale
112         CTRL_ALT_F2 to CTRL_ALT_F6:  switch to additional encodings
113         CTRL_SPACE:    toggle input method
114
115       mouse:
116         move when left button down:      select text
117         double click with left button:   auto select text
118         click with right button:         paste selected text
119
120       Sometimes  above  actions  will  not work, please try to redo them with
121       shift key holding down.
122

FRAME BUFFER DEVICE

124       Before executing FbTerm, make sure there is a frame  buffer  device  in
125       your  system,  and  you  have read/write access right with it. Normally
126       FbTerm tries to  open  /dev/fb0  and  /dev/fb/0,  environment  variable
127       "FRAMEBUFFER" may be used to override this built-in behavior.
128

VESA VIDEO DEVICE

130       From  version  1.6,  FbTerm  adds  VESA video card support. By default,
131       FbTerm tries frame buffer device first, if failure, then tries  to  use
132       VESA device with highest resolution and color depth. option "vesa-mode"
133       may be given to force only open VESA device with  the  specified  video
134       mode.  To see available video modes for your VESA card, execute "fbterm
135       --vesa-mode=list".
136
137       Attention: 1) VESA support requires root privilege to work; 2)  do  not
138       force  to  use  VESA  device  on  the  system  with frame buffer device
139       enabled, they maybe conflict with each other.
140

FONT

142       FbTerm invokes fontconfig to get a font list, if the first font doesn't
143       contain the glyph for the rendering character, it will try second font,
144       then the third, ... and so on, user can see this ordered font list with
145       "fbterm -v".
146
147       If  you  don't  like the fonts selected by FbTerm, execute "fc-list" to
148       get available fonts, choose favorites as the  value  of  option  "font-
149       names".  You  may  also  modify the configure file of fontconfig, which
150       will change the behavior of all programs based on fontconfig!
151

TEXT ENCODING

153       By using iconv, FbTerm converts other encodings  to  internal  encoding
154       UTF-8.  On  startup,  FbTerm  checks variable LC_CTYPE to determine the
155       default text encoding, which is binded to shortcut  CTRL_ALT_F1.   User
156       can  specify up to 5 additional encodings with option "text-encodings",
157       for example, as a  Chinese  user,  you  set  "text-encodings=gbk,big5",
158       shortcut CTRL_ALT_F2 will bind to gbk, and CTRL_ALT_F3 bind to big5.
159

BACKGROUND IMAGE

161       FbTerm  doesn't  load  and  parse  any  image file with various formats
162       directly, instead it takes a screen shot  of  frame  buffer  device  on
163       startup  if variable FBTERM_BACKGROUND_IMAGE is defined, then uses this
164       screen shot as the background for text rendering. In  order  to  enable
165       background image support, user should first put a image to frame buffer
166       device with a image viewer. A wrapper script using fbv is listed below:
167
168           #!/bin/bash
169
170           # fbterm-bi: a wrapper  script  to  enable  background  image  with
171       fbterm
172           # usage: fbterm-bi /path/to/image fbterm-options
173
174           echo -ne "\e[?25l" # hide cursor
175
176           fbv -ciuker "$1" << EOF
177           q
178           EOF
179
180           shift
181           export FBTERM_BACKGROUND_IMAGE=1
182           exec fbterm "$@"
183
184       Attention:  1)  do  not  enable background image on frame buffer device
185       with 8bpp depth, because FbTerm changes color  map  table  for  correct
186       text  rendering;  2)  if the screen shot is different from the original
187       image, try to use a fast scrolling disabled frame buffer device.
188

INPUT METHOD

190       Instead of adding input method  directly  in  FbTerm,  a  client-server
191       based  input  method framework is designed to do this work. FbTerm acts
192       as a client, standalone IM program as a server, and they run  in  sepa‐
193       rated processes.
194
195       As  a  normal IM user, you should have a IM program written for FbTerm,
196       and specify it as the value of option  "input-method".   CTRL_SPACE  is
197       the shortcut to activate/deactivate input method.
198
199

SECURITY NOTES

201       FbTerm  tries  to change linux kernel key map table to setup shortcuts,
202       which requires SYS_TTY_CONFIG capability from kernel version 2.6.15. It
203       means  FbTerm  should  be a setuid 0 program to allow non-root users to
204       use shortcuts. FbTerm only switches to root privilege temporarily  when
205       changing  key map table, we believe it's pretty much free from security
206       problems.
207
208       If you really don't like this and not use  VESA  support,  and  have  a
209       linux kernel with file system capabilities enabled, which allow user to
210       give binaries a subset of root's powers without using setuid  0  (offi‐
211       cial  kernel  2.6.27  includes  it),  you  can run command "sudo setcap
212       'cap_sys_tty_config+ep' /path/to/fbterm".
213

PERFORMANCE

215       According test result, FbTerm spends more than  95%  time  on  painting
216       screen.  Speedup painting will significantly increase performance. Here
217       are some suggestions for frame buffer device:
218
219         * Enable fast scrolling on frame buffer device.  The  visible  screen
220       will  be just a window of the video memory, when scrolling, FbTerm only
221       change the start of window, no need to repaint the whole screen.
222
223         * On Intel P6 family  processors  the  Memory  Type  Range  Registers
224       (MTRRs)  may  be  used to control processor access to memory ranges. If
225       you have video card on a  PCI  or  AGP  bus,  enabling  write-combining
226       allows bus write transfers to be combined into a larger transfer before
227       bursting over  the  PCI/AGP  bus.  This  can  increase  performance  of
228       FbTerm's paint operations.
229
230       Maybe  you  need to enable them manually for your video card. For exam‐
231       ple, by default fast scrolling and write-combining are all disabled  on
232       general  VESA  frame  buffer device, GRUB/LILO configure file should be
233       modified to enable them.  A GRUB example is showed below:
234
235       title Ubuntu
236           root (hd0,0)
237           kernel  /boot/vmlinuz   ro   root=LABEL=UBUNTU   splash   vga=0x317
238       video=vesafb:ywrap,mtrr:3
239           initrd /boot/initrd.img
240
241       You  may  check  fast scrolling status with "fbterm -v", a message with
242       "scrolling:  redraw"  means  fast  scrolling  is  disabled,   otherwise
243       enabled.
244

AUTHOR

246       Written by dragchan.
247

REPORTING BUGS

249       Please submit bug reports to <http://code.google.com/p/fbterm/issues>.
250
252       Copyright  ©  2008-2009  dragchan.  License GPLv2: GNU GPL version 2 or
253       later <http://gnu.org/licenses/gpl.html>.
254       This is free software: you are free  to  change  and  redistribute  it.
255       There is NO WARRANTY, to the extent permitted by law.
256
257
258
259FbTerm 1.6                       November 2009                       FbTerm(1)
Impressum