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