Contents of /alx-src/trunk/alx-config/setup_xfree.sh
Parent Directory | Revision Log
Revision 217 -
(show annotations)
(download)
(as text)
Sat Mar 5 17:08:18 2005 UTC (19 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 11023 byte(s)
Sat Mar 5 17:08:18 2005 UTC (19 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 11023 byte(s)
test; not ready for public
1 | #!/bin/bash |
2 | source /etc/alx-config/config.rc |
3 | |
4 | default_xfreeconf(){ |
5 | |
6 | cat > /etc/X11/XF86Config << "EOF" |
7 | Section "Module" |
8 | |
9 | Load "dbe" # Double buffer extension |
10 | SubSection "extmod" |
11 | Option "omit xfree86-dga" # don't initialise the DGA extension |
12 | EndSubSection |
13 | |
14 | Load "type1" |
15 | Load "speedo" |
16 | Load "freetype" |
17 | # Load "xtt" |
18 | # Load "glx" |
19 | Load "dri" |
20 | Load "vnc" |
21 | |
22 | EndSection |
23 | |
24 | Section "Files" |
25 | |
26 | RgbPath "/usr/X11R6/lib/X11/rgb" |
27 | |
28 | FontPath "/usr/X11R6/lib/X11/fonts/local/" |
29 | FontPath "/usr/X11R6/lib/X11/fonts/misc/" |
30 | FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled" |
31 | FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled" |
32 | #prevents slow startup when disabled -> speedo, type1 |
33 | #FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" |
34 | #FontPath "/usr/X11R6/lib/X11/fonts/Type1/" |
35 | FontPath "/usr/X11R6/lib/X11/fonts/TrueType/" |
36 | FontPath "/usr/X11R6/lib/X11/fonts/freefont/" |
37 | FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" |
38 | FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" |
39 | |
40 | # The module search path. The default path is shown here. |
41 | |
42 | # ModulePath "/usr/X11R6/lib/modules" |
43 | |
44 | EndSection |
45 | |
46 | Section "ServerFlags" |
47 | |
48 | # ctrl+alt+fn disabled; dont't allow to switch consoles |
49 | # Option "DontVTSwitch" |
50 | |
51 | # ctrl+alt+backspace disabled; don't restart the xserver |
52 | # Option "DontZap" |
53 | |
54 | # ctrl+alt+[+]/[-] disabled; don't allow to change resolution |
55 | # Option "Dont Zoom" |
56 | |
57 | EndSection |
58 | |
59 | Section "InputDevice" |
60 | |
61 | Identifier "Keyboard1" |
62 | Driver "Keyboard" |
63 | |
64 | Option "AutoRepeat" "500 30" |
65 | # Option "Xleds" "1 2 3" |
66 | Option "XkbRules" "xfree86" |
67 | Option "XkbModel" "pc104" |
68 | Option "XkbLayout" "de" |
69 | |
70 | EndSection |
71 | |
72 | |
73 | Section "InputDevice" |
74 | |
75 | Identifier "Mouse1" |
76 | Driver "mouse" |
77 | |
78 | Option "Protocol" "PS/2" |
79 | Option "Device" "/dev/psaux" |
80 | Option "Resolution" "1200" |
81 | Option "ZAxisMapping" "4 5" |
82 | |
83 | EndSection |
84 | |
85 | #vnc |
86 | Section "InputDevice" |
87 | Identifier "vncKeyboard" |
88 | Driver "rfbkeyb" |
89 | EndSection |
90 | |
91 | Section "InputDevice" |
92 | Identifier "vncMouse" |
93 | Driver "rfbmouse" |
94 | EndSection |
95 | |
96 | |
97 | Section "Monitor" |
98 | # Aamazing CM-1528-FS |
99 | Identifier "mon0" |
100 | HorizSync 28-64 |
101 | VertRefresh 47-104 |
102 | |
103 | EndSection |
104 | |
105 | |
106 | Section "Device" |
107 | Identifier "vga0" |
108 | Driver "vesa" |
109 | #VideoRam 32768 |
110 | # Insert Clocks lines here if appropriate |
111 | |
112 | # vnc options |
113 | # By default, no password is required. |
114 | # The next rfbauth uses the root password for vncserver |
115 | Option "rfbauth" "/root/.vnc/passwd" |
116 | Option "rfbport" "5900" |
117 | |
118 | # The use one of the next ...shared options ("nevershared" is the default) |
119 | #Option "nevershared" |
120 | Option "alwaysshared" |
121 | |
122 | Option "dontdisconnect" |
123 | |
124 | # To activate the http server |
125 | Option "httpdir" "/usr/share/vnc/classes" |
126 | Option "httpport" "5800" |
127 | |
128 | # For XEvents |
129 | # The local user must accept the new connection. |
130 | # An X application must be used to send the acceptance back to the server. |
131 | # Using the extension library as detailed above. |
132 | # Option "useraccept" |
133 | |
134 | # Enable the vnc service on this device, IMPORTANT!!!!!!!!!!!! |
135 | Option "usevnc" |
136 | |
137 | # The options below are new in the 4.3.0 release |
138 | |
139 | # Only listen on the localhost interface |
140 | # Option "localhost" |
141 | |
142 | # Listen on a specific interface |
143 | # Option "interface" "192.168.0.1" |
144 | |
145 | # View only session |
146 | # Option "viewonly" |
147 | ### monitor settings lesen ### |
148 | source $SETTINGS_TEMPLATE/system/monitor/monitor |
149 | # The option below is new in the 4.3.0.4 release |
150 | # Option "loginauth" |
151 | |
152 | EndSection |
153 | |
154 | |
155 | Section "Screen" |
156 | Identifier "Screen 1" |
157 | Device "vga0" |
158 | Monitor "mon0" |
159 | DefaultDepth 16 |
160 | |
161 | Subsection "Display" |
162 | Depth 8 |
163 | Modes "1024x768" |
164 | ViewPort 0 0 |
165 | EndSubsection |
166 | Subsection "Display" |
167 | Depth 16 |
168 | Modes "1024x768" |
169 | ViewPort 0 0 |
170 | EndSubsection |
171 | Subsection "Display" |
172 | Depth 24 |
173 | Modes "1024x768" |
174 | ViewPort 0 0 |
175 | EndSubsection |
176 | EndSection |
177 | |
178 | Section "ServerLayout" |
179 | |
180 | Identifier "Simple Layout" |
181 | Screen "Screen 1" |
182 | InputDevice "Mouse1" "CorePointer" |
183 | InputDevice "Keyboard1" "CoreKeyboard" |
184 | |
185 | #vnc |
186 | InputDevice "vncMouse" "ExtraPointer" |
187 | InputDevice "vncKeyboard" "ExtraKeyboard" |
188 | |
189 | EndSection |
190 | |
191 | # Section "DRI" |
192 | # Mode 0666 |
193 | # EndSection |
194 | EOF |
195 | } |
196 | |
197 | |
198 | |
199 | setup_xfreeconf(){ |
200 | |
201 | mkdir -p $SETTINGS_TEMPLATE/system |
202 | rm -rf $SETTINGS_TEMPLATE/system/vga |
203 | rm -rf $SETTINGS_TEMPLATE/system/mouse |
204 | rm -rf $SETTINGS_TEMPLATE/system/monitor |
205 | cp -R $SETTINGS_TEMPLATE/menu/vga $SETTINGS_TEMPLATE/system |
206 | cp -R $SETTINGS_TEMPLATE/menu/mouse $SETTINGS_TEMPLATE/system |
207 | cp -R $SETTINGS_TEMPLATE/menu/monitor $SETTINGS_TEMPLATE/system |
208 | |
209 | |
210 | MOUSEPROT="`cat $SETTINGS_TEMPLATE/system/mouse/mouse`" |
211 | VGADRIV="`cat $SETTINGS_TEMPLATE/system/vga/vga`" |
212 | vgadepth="`cat $SETTINGS_TEMPLATE/system/vga/vgadepth`" |
213 | resolution="`cat $SETTINGS_TEMPLATE/system/vga/vgares`" |
214 | ### monitor settings lesen ### |
215 | source $SETTINGS_TEMPLATE/system/monitor/monitor |
216 | |
217 | |
218 | if [ -z "${MOUSEPROT}" \ |
219 | -o -z "${VGADRIV}" \ |
220 | -o -z "${vgadepth}" \ |
221 | -o -z "${resolution}" \ |
222 | -o -z "${myvendor}" \ |
223 | -o -z "${mymodel}" \ |
224 | -o -z "${hsync}" \ |
225 | -o -z "${vref}" ] |
226 | then |
227 | echo "Not all needed VARS are set" |
228 | exit 1 |
229 | fi |
230 | |
231 | |
232 | |
233 | [ -f /etc/X11/XF86Config ] && mv /etc/X11/XF86Config /etc/X11/XF86Config.old |
234 | |
235 | cat > /etc/X11/XF86Config << "EOF" |
236 | Section "Module" |
237 | |
238 | Load "dbe" # Double buffer extension |
239 | SubSection "extmod" |
240 | Option "omit xfree86-dga" # don't initialise the DGA extension |
241 | EndSubSection |
242 | |
243 | Load "type1" |
244 | Load "speedo" |
245 | Load "freetype" |
246 | # Load "xtt" |
247 | # Load "glx" |
248 | Load "dri" |
249 | EOF |
250 | |
251 | if [ "${LOADVNC}" == "true" ] |
252 | then |
253 | echo ' Load "vnc"' >> /etc/X11/XF86Config |
254 | fi |
255 | |
256 | |
257 | cat >> /etc/X11/XF86Config << "EOF" |
258 | EndSection |
259 | |
260 | Section "Files" |
261 | |
262 | RgbPath "/usr/X11R6/lib/X11/rgb" |
263 | |
264 | FontPath "/usr/X11R6/lib/X11/fonts/local/" |
265 | FontPath "/usr/X11R6/lib/X11/fonts/misc/" |
266 | FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled" |
267 | FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled" |
268 | #prevents slow startup when disabled -> speedo, type1 |
269 | #FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" |
270 | #FontPath "/usr/X11R6/lib/X11/fonts/Type1/" |
271 | FontPath "/usr/X11R6/lib/X11/fonts/TrueType/" |
272 | FontPath "/usr/X11R6/lib/X11/fonts/freefont/" |
273 | FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" |
274 | FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" |
275 | |
276 | # The module search path. The default path is shown here. |
277 | |
278 | # ModulePath "/usr/X11R6/lib/modules" |
279 | |
280 | EndSection |
281 | |
282 | Section "ServerFlags" |
283 | |
284 | # ctrl+alt+fn disabled; dont't allow to switch consoles |
285 | # Option "DontVTSwitch" |
286 | |
287 | # ctrl+alt+backspace disabled; don't restart the xserver |
288 | # Option "DontZap" |
289 | |
290 | # ctrl+alt+[+]/[-] disabled; don't allow to change resolution |
291 | # Option "Dont Zoom" |
292 | |
293 | EndSection |
294 | |
295 | Section "InputDevice" |
296 | |
297 | Identifier "Keyboard1" |
298 | Driver "Keyboard" |
299 | |
300 | Option "AutoRepeat" "500 30" |
301 | # Option "Xleds" "1 2 3" |
302 | Option "XkbRules" "xfree86" |
303 | Option "XkbModel" "pc104" |
304 | Option "XkbLayout" "de" |
305 | |
306 | EndSection |
307 | |
308 | |
309 | Section "InputDevice" |
310 | |
311 | Identifier "Mouse1" |
312 | Driver "mouse" |
313 | |
314 | EOF |
315 | |
316 | case ${MOUSEPROT} in |
317 | PS/2) |
318 | echo ' Option "Protocol" "PS/2"' >> /etc/X11/XF86Config |
319 | echo ' Option "Device" "/dev/psaux"' >> /etc/X11/XF86Config |
320 | echo ' Option "Resolution" "1200"' >> /etc/X11/XF86Config |
321 | ;; |
322 | IMPS/2) |
323 | echo ' Option "Protocol" "IMPS/2"' >> /etc/X11/XF86Config |
324 | echo ' Option "Device" "/dev/psaux"' >> /etc/X11/XF86Config |
325 | echo ' Option "Resolution" "1200"' >> /etc/X11/XF86Config |
326 | echo ' Option "ZAxisMapping" "4 5"' >> /etc/X11/XF86Config |
327 | ;; |
328 | Auto) |
329 | echo ' Option "Protocol" "Auto"' >> /etc/X11/XF86Config |
330 | echo ' Option "Device" "/dev/ttys0"' >> /etc/X11/XF86Config |
331 | echo ' Option "Resolution" "1200"' >> /etc/X11/XF86Config |
332 | ;; |
333 | esac |
334 | |
335 | cat >> /etc/X11/XF86Config << "EOF" |
336 | EndSection |
337 | EOF |
338 | |
339 | if [ "${LOADVNC}" == "true" ] |
340 | then |
341 | cat >> /etc/X11/XF86Config << "EOF" |
342 | #vnc |
343 | Section "InputDevice" |
344 | Identifier "vncKeyboard" |
345 | Driver "rfbkeyb" |
346 | EndSection |
347 | |
348 | Section "InputDevice" |
349 | Identifier "vncMouse" |
350 | Driver "rfbmouse" |
351 | EndSection |
352 | EOF |
353 | fi |
354 | |
355 | ##monitor setup |
356 | |
357 | echo 'Section "Monitor"' >> /etc/X11/XF86Config |
358 | echo " # ${myvendor} ${mymodel}" >> /etc/X11/XF86Config |
359 | echo ' Identifier "mon0"' >> /etc/X11/XF86Config |
360 | echo " HorizSync ${hsync}" >> /etc/X11/XF86Config |
361 | echo " VertRefresh ${vref}" >> /etc/X11/XF86Config |
362 | cat >> /etc/X11/XF86Config << "EOF" |
363 | |
364 | EndSection |
365 | |
366 | |
367 | Section "Device" |
368 | Identifier "vga0" |
369 | Driver "vesa" |
370 | #VideoRam 32768 |
371 | # Insert Clocks lines here if appropriate |
372 | EOF |
373 | if [ "${LOADVNC}" == "true" ] |
374 | then |
375 | cat >> /etc/X11/XF86Config << "EOF" |
376 | # vnc options |
377 | # By default, no password is required. |
378 | # The next rfbauth uses the root password for vncserver |
379 | Option "rfbauth" "/root/.vnc/passwd" |
380 | Option "rfbport" "5900" |
381 | |
382 | # The use one of the next ...shared options ("nevershared" is the default) |
383 | #Option "nevershared" |
384 | Option "alwaysshared" |
385 | |
386 | Option "dontdisconnect" |
387 | |
388 | # To activate the http server |
389 | Option "httpdir" "/usr/share/vnc/classes" |
390 | Option "httpport" "5800" |
391 | |
392 | # For XEvents |
393 | # The local user must accept the new connection. |
394 | # An X application must be used to send the acceptance back to the server. |
395 | # Using the extension library as detailed above. |
396 | # Option "useraccept" |
397 | |
398 | # Enable the vnc service on this device, IMPORTANT!!!!!!!!!!!! |
399 | Option "usevnc" |
400 | |
401 | # The options below are new in the 4.3.0 release |
402 | |
403 | # Only listen on the localhost interface |
404 | # Option "localhost" |
405 | |
406 | # Listen on a specific interface |
407 | # Option "interface" "192.168.0.1" |
408 | |
409 | # View only session |
410 | # Option "viewonly" |
411 | |
412 | # The option below is new in the 4.3.0.4 release |
413 | # Option "loginauth" |
414 | EOF |
415 | fi |
416 | |
417 | cat >> /etc/X11/XF86Config << "EOF" |
418 | EndSection |
419 | |
420 | |
421 | Section "Screen" |
422 | Identifier "Screen 1" |
423 | Device "vga0" |
424 | Monitor "mon0" |
425 | EOF |
426 | |
427 | echo " DefaultDepth ${vgadepth}" >> /etc/X11/XF86Config |
428 | echo ' Subsection "Display"' >> /etc/X11/XF86Config |
429 | echo " Depth ${vgadepth}" >> /etc/X11/XF86Config |
430 | echo " Modes \"${resolution}\"" >> /etc/X11/XF86Config |
431 | echo ' ViewPort 0 0' >> /etc/X11/XF86Config |
432 | echo ' EndSubsection' >> /etc/X11/XF86Config |
433 | |
434 | cat >> /etc/X11/XF86Config << "EOF" |
435 | EndSection |
436 | |
437 | Section "ServerLayout" |
438 | |
439 | Identifier "Simple Layout" |
440 | Screen "Screen 1" |
441 | InputDevice "Mouse1" "CorePointer" |
442 | InputDevice "Keyboard1" "CoreKeyboard" |
443 | |
444 | EOF |
445 | if [ "${LOADVNC}" == "true" ] |
446 | then |
447 | cat >> /etc/X11/XF86Config << "EOF" |
448 | #vnc |
449 | InputDevice "vncMouse" "ExtraPointer" |
450 | InputDevice "vncKeyboard" "ExtraKeyboard" |
451 | EOF |
452 | fi |
453 | |
454 | cat >> /etc/X11/XF86Config << "EOF" |
455 | EndSection |
456 | |
457 | # Section "DRI" |
458 | # Mode 0666 |
459 | # EndSection |
460 | EOF |
461 | |
462 | } |
463 | |
464 | |
465 | setup_xfreeconf |
Properties
Name | Value |
---|---|
svn:executable | * |