]> Pileus Git - ~andy/gtk/blob - docs/README.linux-fb
Add note about child property changes.
[~andy/gtk] / docs / README.linux-fb
1 About GtkFB:
2 ------------
3 The linux-fb port of Gtk+, also known as GtkFB is an implementation of
4 gdk (and therefor gtk) that runs on the linux framebuffer. It runs in
5 a single process that doesn't need X. It should run most Gtk+ programs
6 without any changes to the source.
7
8 Build requirements:
9 -------------------
10 To run GtkFB programs you will need glib, pango and gtk from cvs
11 HEAD. Make sure you update these at the same time, since changes to
12 glib and pango often forces changes in gtk+. Pango optionally depends
13 on libfribidi, but for normal GtkFB usage that can be ignored.
14
15 You also need freetype 2, I recommend that you use freetype 2.0.1 or
16 later, as there was some problems with freetype-config in 2.0.
17 Make sure that you install freetype before pango, since pango also
18 needs it.
19 Freetype can be found at ftp://ftp.freetype.org
20
21 Hardware requirements:
22 ----------------------
23 You need a graphics card with an availible framebuffer driver that can
24 run in 8, 16, 24 or 32 bpp. I use the matroxfb driver, but i.e. vesafb
25 should work too. You also need a supported mouse. Currently supported
26 is ps2 mouse, ms serial mouse and fidmour touchscreen.
27
28 Building and installing:
29 ------------------------
30 First build and install glib and pango as usual, in that order.
31
32 Then configure Gtk by running configure (or autogen.sh if running from
33 cvs) with --with-gdktarget=linux-fb.
34
35 Then compile as ususal: make; make install
36
37 Fonts:
38 ------
39 Since GtkFB uses freetype 2 to render fonts it can render truetype and
40 postscript type 1 antialiased fonts.
41
42 At startup it scans some directories looking for fonts. By default
43 it looks in $prefix/lib/ft2fonts, and if you want to change this you
44 must add something like:
45
46 [PangoFT2]
47 FontPath = /usr/share/fonts/default/Type1:/usr/share/fonts/default/TrueType
48
49 To your $prefix/etc/pango/pangorc or ~/.pangorc.
50
51 You must also set up font aliases for the fonts Sans, Serif and Monotype.
52 This is done by creating a $prefix/etc/pango/pangoft2.aliases or
53 ~/.pangoft2_aliases file. You can also set the name of this file using the
54 key AliasFiles in the PangoFT2 section in pangorc.
55
56 An example of a font alias file for the urw fontset is:
57 sans normal normal normal normal "urw gothic l"
58 serif normal normal normal normal "urw palladio l"
59 monospace normal normal normal normal "nimbus mono l"
60
61 And one using the Windows truetype fonts is:
62 sans normal normal normal normal "arial"
63 serif normal normal normal normal "times new roman"
64 monospace normal normal normal normal "courier new"
65
66 A more detailed example can be found in examples/pangoft2.aliases in the
67 pango distribution.
68
69 Running:
70 --------
71 To run a program you should only need to start it, but there are some
72 things that can cause problems, and some things that can be controlled
73 by environment variables. Try testgtk distributed with gtk+ to test
74 if things work.
75
76 If you use a ps2 mouse, make sure that /dev/psaux is readable and
77 writable.
78
79 Make sure gpm is not running.
80
81 If you don't specify anything GtkFB will start up in the current
82 virtual console in the current resolution and bit-depth. This can be
83 changed by specifying environment variables:
84
85 GDK_VT:
86  unset means open on the current VT.
87  0-9: open on the specified VT. Make sure you have read/write rights
88       there.
89  new: Allocate a new VT after the last currently used one.
90
91 GDK_DISPLAY_MODE:
92  Specifies the name of a mode in /etc/fb.modes that you want to use.
93
94 GDK_DISPLAY_DEPTH:
95  Specify the desired bit depth of the framebuffer.
96  
97 GDK_DISPLAY_WIDTH:
98  Specify the desired width of the framebuffer.
99  
100 GDK_DISPLAY_HEIGHT:
101  Specify the desired height of the framebuffer.
102
103 GDK_DISPLAY:
104  Specify the framebuffer device to use. Default is /dev/fb0
105
106 GDK_MOUSE_TYPE:
107  Specify mouse type. Currently supported is:
108   ps2 - PS/2 mouse
109   imps2 - PS/2 intellimouse (wheelmouse)
110   ms - Microsoft serial mouse
111   fidmour - touch screen
112  Default is ps2.
113
114 GDK_KEYBOARD_TYPE:
115  Specify keyboard type. Currently suppored is
116   xlate - normal tty mode keyboard.
117     Quite limited, cannot detect key up/key down events. Doesn't
118     handle ctrl/alt/shift for all keys. This is the default driver,
119     but should not be used in "production" use.
120   raw - read from the tty in RAW mode.
121     Sets the keyboard in RAW mode and handles all the keycodes. This
122     gives correct handling of modifiers and key up/down events. You
123     must be root to use this. If you use this for development or
124     debugging it is recommended to enable magic sysrq handling in the
125     kernel. Then you can use ALT-SysRQ-r to turn the keyboard back to
126     normal mode.
127  Default is xlate.
128
129 HACKING:
130 --------
131
132 Pressing Ctrl-Alt-Return repaints the whole screen.
133 Unfortunately this cannot be pressed when using the xlate keyboard
134 driver, so instead you can use shift-F1 instead when using this
135 driver.
136
137 Pressing Ctrl-Alt-BackSpace kills the GtkFB program. (Can't be pressed
138 in the xlate driver.
139
140 More to be written.
141
142    - Alexander Larsson <alexl@redhat.com>
143      2000/12/06
144
145