gentoo doc 2.0 m2

1198
Gentoo Linux cборник статей Gentoo-doc TEAM Версия 2.0-M2

Upload: alexkumpan

Post on 02-Mar-2015

246 views

Category:

Documents


10 download

TRANSCRIPT

Gentoo Linuxc

Gentoo-doc TEAM 2.0-M2

Gentoo Linuxc 2.0-M2 Gentoo-doc TEAM Copyright 2007-2010

... ..................................................................................................................................... 1 a.k.a changelog ..................................................................................................... 2 ......................................................................................................................................... 6 1. ........................................................................................................................... 6 2. ..................................................................................................................................... 6 3. ........................................................................................................................ 7 4. ................................................................................................................ 7 5. Gentoo Linux ................................................................................... 8 ............................................................................................................................ 9 1. Linux ........................................................................................................... 11 .................................................................................................................... 13 1. UNIX .............................................................................................................................. 13 1.1. .............................................................................................................. 13 1.2. ................................................................................................................ 14 1.3. ............................................................................................................ 18 1.4. UNIX .............................................................................. 19 2. LINUX ............................................................................................................................ 20 2.1. .............................................................................................................. 20 2.2. .............................................................................................................. 20 2.3. ............................................................................................................ 21 2.4. ...................................................................................................... 22 Windows- ................................................................................................................. 25 1. ............................................................................ 26 2. ................................................................................................................... 26 3. .................................................................................................................. 27 4. / ................................................................................................................... 28 4.1. Chat ...................................................................................................................... 28 4.2. File managers ........................................................................................................ 29 4.3. FTP ...................................................................................................................... 29 4.4. Graphics ................................................................................................................ 29 4.5. Internet ................................................................................................................. 29 4.6. Mail ...................................................................................................................... 30 4.7. Multimedia ............................................................................................................ 30 4.8. Office .................................................................................................................... 30 4.9. P2P ....................................................................................................................... 31 2. Gentoo: ........................................................................................... 32 Gentoo Linux ........................................................................................................................... 36 1. ? ........................................................................................................ 36 2. Gentoo Linux ................................................................................................................... 37 3. Gentoo .............................................................................................................. 37 4. Gentoo .......................................................................................................... 38 Gentoo Linux: ......................................................................................... 41 1. Gentoo Linux ............................................................................................................... 41 2. ................................................................................................ 42 3. ................................................................................... 43 4. .............................................................................................. 46 5. ...................................................................... 48 6. Gentoo ........................................................................................ 49

iii

7. : ......................................................................................... 51 8. : ........................................................... 54 9. ................................................................................................. 55 10. ................................................................................................ 59 Gentoo Linux x86 ................................................................. 60 1. ......................................................................................................... 60 2. ............................................................................................................... 61 3. .......................................................................................................... 61 4. ............................................................................................................ 61 5. Gentoo ................................................................................ 61 6. ............................................................................................................... 62 7. ......................................................................................................... 62 8. .......................................................................................... 63 9. ..................................................................................................... 63 9.1. Grub ..................................................................................................................... 64 9.2. Lilo ....................................................................................................................... 64 10. .................................................................................................... 65 Gentoo Linux .................................................... 66 1. ......................................................................................................... 66 2. Smart BootManager ................................... 66 3. Knoppix ..................................................................................... 67 4. Stage 1 ......................................................................... 68 5. PXE ................................................................ 69 6. Gentoo Linux- ....................................................... 73 Gentoo/x86 ................................................................................ 76 1. 1. ................................................................................................................. 76 2. 2. .............................................................................................. 76 3. 3. ................................................................................................. 79 4. 4. / ........................................................................................... 80 4.1. ..................................................................... 80 Gentoo ................................................................................................. 82 1. ....................................................................................................................... 82 2. ................................................................................................. 82 3. .......................................................................... 83 3.1. .................................................................................................. 83 3.2. ................................................................................ 83 3.3. ................................................................................................ 84 3.4. Gentoo .............................................................................................. 85 3.5. ........................................................................................................ 86 3.6. ............................................................................. 86 3.7. ......................................................................................... 87 3.8. UNICODE ................................................................................... 87 3.9. Gentoo .................................................................................................. 88 4. ....................................................................................... 88 4.1. ......................................................................................... 88 4.2. ........................................................................................ 89 ......................................................................................................... 91 ...................................................................................... 101 1. ................................................................................................................... 101 2. ............................................................................................................ 101 2.1. ? ................................................................................... 101 2.2. ? ......................................................................................... 102

iv

2.3. Gentoo Way ........................................................................................................ 102 2.4. root ? ........................................................................ 103 3. ........................................................................................................... 103 3.1. ............................................................................................. 103 3.2. ? ........................................... 105 3.3. ? ..................................................................................................................... 105 4. X Window ................................................................................. 106 4.1. ? ................................................................................. 106 4.2. ? ..................................................... 106 Gentoo Linux x86 ......................................................................................... 107 1. Gentoo ......................................................................................................... 110 1.1. Gentoo Linux ................................................................................ 110 1.2. ................................................... 112 1.3. ................................................................................................... 119 1.4. ............................................................................................. 126 1.5. Gentoo ............................................................ 134 1.6. Gentoo .................................................................... 140 1.7. .................................................................................................. 145 1.8. ......................................................................... 151 1.9. ............................................................... 156 1.10. ..................................................................... 159 1.11. Gentoo .......................................................................... 166 1.12. ? ...................................................................................... 167 2. Gentoo ............................................................................................................ 168 2.1. Portage ............................................................................................. 168 2.2. USE- .......................................................................................................... 176 2.3. Portage ......................................................................................... 181 2.4. ................................................................................... 184 2.5. ............................................................................................. 193 3. Portage ............................................................................................................ 197 3.1. .............................................................................................. 197 3.2. .................................................................... 200 3.3. .................................................... 203 3.4. Portage ...................................................................... 205 3.5. ................................................................ 207 3.6. ebuild ......................................................................................... 209 4. Gentoo .............................................................................................. 212 4.1. .......................................................................................... 212 4.2. ..................................................................................... 214 4.3. ............................................................................... 216 4.4. .............................................................................................. 222 4.5. ........................................................................... 229 4.6. .............................................................................................. 231 Gentoo ................................................................................................. 233 1. X.org ................................................................................................................. 234 Portage ......................................................................................................................... 235 1. Portage .................................................................................. 235 2. ? ............................................................................. 236 3. ? ..................................................................................... 236 4. ................................................................................................. 237 5. ........................................................................................ 237

v

3. Gentoo .................................................................................................................. 238 Gentoo Linux ......................................................................................................... 243 1. Gentoo ............................................................................. 243 1.1. Gentoo .......................................................................................... 243 1.2. .............................................................................. 244 1.3. ............................................................... 245 HOWTO ...................................................................................... 247 1. /var/lib/portage/world ................................................................ 247 2. profile ....................................................................................................... 248 3. USE- .................................................................................................................. 248 4. ( toolchain) ................................ 248 5. emerge -U -u ........................................... 248 6. toolchain ................................................... 249 7. . ........................................................................................... 250 8. . ............................................................................ 250 9. . ................................................................................................ 251 Gentoo Linux GCC ....................................................................... 252 1. ....................................................................................................................... 252 1.1. GCC ............................................................................................... 252 2. ................................................................................... 253 2.1. ............................................................................................................ 253 3. GCC-3.3 3.4 .................................................................. 254 3.1. ............................................................................................................ 254 3.2. ............................................................................................................ 254 3.3. revdep-rebuild ............................................................................. 255 3.4. emerge -e ................................................................................... 255 4. GCC ........................................................................... 256 4.1. ............................................................................................................ 256 4.2. revdep-rebuild ............................................................................. 257 4.3. emerge -e ................................................................................... 257 4.4. .............................................................................................................. 258 5. ........................................................................................................... 258 5.1. ........................................................ 258 Gentoo ( 2) ................................................................................ 260 1. Gentoo ..................................................... 260 1.1. Portage .................................................................................................. 261 1.2. Portage .............................................................................................. 261 1.3. .................................................................... 262 1.4. ? ........................................................................... 262 1.5. .................................................................................. 263 1.6. . ......................................................................................... 263 1.7. Portage ....................................................................................................... 264 1.8. .............................................................................. 264 1.9. ...................................................................................... 264 1.10. ................................................................ 265 1.11. ..................................................................................... 265 1.12. ........................................................... 265 ........................................................................... 267 1. : ........................................................................................ 268 2. . .................................................................................................. 269 3. USE- .................................................................................................................... 269 4. =) .............................................................. 271

vi

4.1. : ........................................................................ 271 5. "Masked" . .......................................................................................................... 272 6. . ', DE. ....................................................................................... 273 Gentoo .......................................................................................................................... 274 1. 2.6: ...................................................................................... 274 1.1. ......................................................................... 275 2. Gentoo Linux .................................... 275 2.1. ............................................................................................................ 276 2.2. ................................................... 277 2.3. ............................................................................. 278 2.4. ....................................................... 279 2.5. ........................................................................................................ 281 3. .......................................................... 281 3.1. ............................................................................................................ 281 4. mplayer ........................................................................................................................ 281 5. XMMS ........................................................................................................................... 282 6. Mozilla ......................................................... 282 6.1. Navigator(Seamonkey/Firefox) ............................................................................. 282 6.2. Firefox Seamonkey ......................................................... 283 6.3. ......................................................................... 283 6.4. Firefox Seamonkey. .......................................................... 284 6.5. Thumbnail' ............................................... 284 7. IDE hdparm ......................................................... 284 7.1. ............................................................................................................ 284 7.2. IDE ........................................................................ 285 7.3. ........................................................................................................... 286 7.4. ...................................................................................................... 287 8. ......................................................................................... 287 8.1. ............................................................................................................ 288 8.2. ......................................................................................... 288 8.3. ................................................................................................... 288 8.4. ......................................... 289 8.5. ...................................................... 290 rpm- Gentoo ....................................................................................... 291 UTF-8 Gentoo ................................................................................................ 294 1. ............................................................. 294 2. ..................................................................................................................... 295 2.1. ? ......................................................................................... 295 2.2. ............................................................................. 295 2.3. ? ............................................................................................ 296 2.4. UTF-8 ................................................................................................................. 296 2.5. UTF-8 ...................................................................... 296 3. UTF-8 Gentoo Linux ................................................................................. 297 3.1. UTF-8 ................................................................... 297 3.2. ............................................................................................... 297 4. ............................................................................................ 298 4.1. , NTFS FAT ............................................................................... 299 4.2. ............................................................................................. 300 4.3. ncurses slang .................................................................................................... 300 4.4. KDE, GNOME Xfce ......................................................................................... 301 4.5. X11 ................................................................................................... 301 4.6. .................................................... 302

vii

4.7. Vim, Emacs, Xemacs Nano ............................................................................... 302 4.8. .......................................................................................... 302 4.9. Irssi ..................................................................................................................... 303 4.10. Mutt .................................................................................................................. 303 4.11. Man ................................................................................................................... 303 4.12. elinks links ..................................................................................................... 303 4.13. Samba ............................................................................................................... 304 4.14. ........................................................................... 304 4.15. .................................................................................................. 304 Gentoo Linux .................................................................. 306 1. ....................................................................................................................... 306 1.1. .......................................................................... 306 1.2. ............................................................................. 307 2. ..................................................................................... 307 2.1. ............................................................................................................ 307 2.2. ............................................................................. 307 2.3. ....................................................................... 308 2.4. (mapscreen) ......................................................... 309 2.5. ....................................................................... 309 3. locale ............................................................................................... 310 3.1. locale ru_RU.KOI8-R .......................................................................... 310 4. ............................................................................................. 312 4.1. ............................................................................ 312 4.2. .............................................................. 312 5. X .................................................................................. 312 5.1. ............................................................................................................ 312 5.2. xf86config ........................................... 313 5.3. ................................................................... 314 5.4. .......................................... 315 udev Gentoo .................................................................................................. 316 1. udev? ............................................................................................................ 316 1.1. /dev ...................................................................................................... 316 1.2. namedev .............................................................................................................. 317 1.3. libsysfs ................................................................................................................ 318 1.4. udev .................................................................................................................... 318 2. udev Gentoo ................................................................................... 318 2.1. ........................................................................................ 318 2.2. .................................................................................................... 319 3. .................................................................................................... 320 3.1. .................................. 320 3.2. udev nvidia ...................................................................................................... 320 3.3. LVM2 .............................................................................. 321 3.4. DevFS udev ........................................................... 321 3.5. ............................................................................................... 322 4. ............................................................................ 322 ..................................................................... 323 1. devfs? ............................................................................................................ 323 1.1. (?) ................................................................................. 323 1.2. ........................................................................................................... 324 1.3. ............................................................................................................. 324 1.4. devfs ? .................................................................... 324 2. ............................................................................... 325

viii

2.1. ........................................................................................................ 325 2.2. o devfsd ..................................................... 326 3. .......................................................................... 326 3.1. devfsd ........................................................................................... 326 3.2. compatibility symlinks .......................................................................... 326 3.3. ..................................... 327 4. , ..................................................................... 327 4.1. / PAM ........................................ 327 4.2. / devfsd ...................................... 328 4.3. devfsd .................................................. 328 HOWTO fbsplash ....................................................................................................................... 330 1. ...................................................................................................................... 331 1.1. gensplash? ........................................................................................... 331 1.2. fbsplash (framebuffer splash)? .............................................................. 331 1.3. frame buffer? .................................................................... 331 2. fbsplash splashutils ..................................................................................... 331 2.1. ........................................................................................ 332 2.2. ............................................................................................ 332 2.3. () .............................................................................. 332 2.4. / ( genkernel) ....................... 333 2.5. splashutils ........................................................................................... 333 2.6. / ( ) ............................................. 333 3. initramfs ............................................................................................ 334 3.1. initramfs? ............................................................................................ 334 3.2. initramfs ........................................ 334 3.3. initramfs ............................................................... 335 3.4. gensplash ........................................................... 335 3.5. bootsplash gensplash ............................................................ 336 3.6. gensplash ......................................................... 336 4. .................................................................................................. 337 4.1. ................................................................................................. 337 4.2. Grub ............................................................................... 338 4.3. Lilo ................................................................................ 338 5. ................................................................................. 339 6. Gensplash ........................................................................... 339 6.1. ........................................................................................ 339 6.2. 3 .................................................................. 340 7. ......................................................................................................... 340 7.1. /usr .......................................................................... 340 7.2. ..................................................................... 340 8. .......................................................................................................................... 341 4. WIKI ................................................................................................................................ 342 HOWTO hal ............................................................................................... 349 1. hal-0.5.10 ...................................................................................................................... 349 2. portage ....................................................................................................... 349 3. xorg .......................................................................................... 349 4. ................................................................................................................... 350 5. X- ...................................................................................................... 351 6. .......................................................................................................................... 352 7. Touchpad ....................................................................................................................... 352 HOWTO Ivman .......................................................................................................................... 353 1. .............................................................................................................................. 353

ix

2. .................................................................................................. 353 3. .............................................................................................................. 354 3.1. Ivman root .......................................................................................... 354 3.2. Ivman ............................................................ 355 3.3. .............................................................................. 355 4. ..................................................................................................................... 356 4.1. fstab (ivman 0.6.x ) ............................ 356 4.2. fstab ( ivman 0.5.x!) ...................................... 356 4.3. ( ivman 0.5.x!) ............................................................................................. 356 4.4. ............................................................................................................................ 357 5. ........................................................................................................................... 357 6. .......................................................................................................... 358 .............................................................................................. 359 1. .......................................................................................................... 359 1.1. ......................................................................................................... 361 1.2. :) ...................................................................................................... 363 1.3. - ................................................................... 368 CD/DVD ..................................................................................................................... 370 1. .................................................................................................. 370 2. .................................................................................. 370 2.1. 2.4.x ................................................................................................. 370 2.2. 2.6.x ............................................................................................... 371 3. ISO ................................................................................................. 371 3.1. ISO ............................................. 372 4. ATAPI- ..................................................................................... 372 5. ISO ....................................................................................................... 373 5.1. .......................................................................... 373 6. .................................................................................................... 373 7. ................................................................................................. 374 8. ......................................................................................................... 374 DVD .......................................................................................................................... 375 1. ....................................................................................................................... 375 1.1. ................................................................................................ 375 1.2. ................................................................................... 375 2. DVD ............................................................................. 376 2.1. transcode MPEG2, DVD ............................................. 376 2.2. tcmplex ......................... 379 2.3. kino ( transcode+tcmplex) ........................................ 379 2.4. replex ( DVB (Digital Television)) .................................................................................................... 380 3. (authoring) dvdauthor ..................... 380 4. DVD ................................................................................. 381 5. ........................................................................................................................... 381 5.1. ............................................................... 381 5.2. ......................................................................................... 381 Portage ........................................................................................................................ 383 1. Portage NFS ......................................................................................................... 383 1.1. ......................................................................................................... 383 1.2. ............................................................................................................ 383

x

1.3. ....................................................................................... 383 1.4. ............................................................................................................. 384 1.5. .......................................................................................... 384 1.6. ................................................................................................. 386 1.7. ..................................................................................................... 386 Portage ..................................................................................................................... 388 1. Portage Setup Howto ..................................................................................................... 388 1.1. ............................................................................................ 388 1.2. howto? .................................................................................... 388 1.3. Portage (Portage profiles) .................................................................... 388 1.4. ......................................................................................... 389 Portage Overlay .......................................................................................................................... 392 1. ....................................................................................................................... 392 2. Portage Overlay ............................................................................................. 392 3. ebuild ............................................................................................ 392 4. digest- ................................................................................................. 393 4.1. ebuild ..................................................................................... 394 4.2. ................................................................................................... 394 deltup ....................................................................................... 395 1. ? ............................................................................................................... 395 2. .................................................................................................. 395 2.1. emerge ............................................................................................... 396 2.2. getdelta ........................................................................................ 396 2.3. ................................................................................................... 396 ............................ 397 ............................... 399 .................................................................................................... 401 1. ...................................................................................................................................... 401 1.1. /var/lib/portage/world ...................................................... 401 2. ...................................................................................................................................... 402 2.1. USE- ........................................................................................................ 402 3. ...................................................................................................................................... 404 3.1. . ................................................................................ 404 4. ...................................................................................................................................... 404 4.1. . ................................................................... 404 5. ...................................................................................................................................... 405 5.1. . ...................................................................................... 405 6. ...................................................................................................................................... 405 6.1. . ............................... 405 .................................................................................................. 406 ...................................................................................................................................... 408 1. MS Windows - ................................................................................... 409 1.1. ............................................................................................................ 409 1.2. .................................................................................................................. 409 1.3. ................................................................................................... 409 1.4. ............................................................................................. 411 2. Udev .............................................................................................................................. 411 2.1. ........................................................................................... 411 2.2. ........................................................................................... 411 2.3. . ...................................................................... 412 2.4. Troubleshuting .................................................................................................... 412 3. CFLAGS .................................. 413

xi

3.1. ? ....................................................................................... 413 3.2. ...................................................................................................... 413 4. nano ............................................................................................................... 416 4.1. ........................................................................................................... 417 4.2. ................................................................................................................ 417 5. Udev ............................................................................ 417 5.1. ........................................................................................................... 417 5.2. ........................................................................................................ 417 5.3. udev ............................................................................................. 417 5.4. .................................................................................................. 419 5.5. ....................................................................................................... 420 6. glibc ....................................................................................................... 420 6.1. ........................................................................................................... 420 6.2. Glibc ........................................................................ 421 6.3. ...................................................................................................... 421 6.4. ..................................................................................................... 424 7. USB-flash ................................................................................................ 424 7.1. USB-flash ............................................................... 424 7.2. kde ....................................................................................... 426 7.3. .......................................................................... 427 8. - NTFS ntfs-3g .............................................. 427 8.1. ............................................................................................................ 427 8.2. ........................................................................................................... 428 8.3. .................................................................................... 428 8.4. .............................................................................................. 429 ....................................................................................................................... 430 1. Apache2 ........................................................................................................ 432 1.1. .......................................................................................................... 432 1.2. Apache ................................................................................................... 432 1.3. ............................................................................................................. 432 1.4. ................................................................................................... 433 1.5. Common Problems ............................................................................................. 434 1.6. See Also ............................................................................................................ 436 2. iptables ............................................................................. 436 2.1. ........................................................................................................... 436 2.2. Linux ........................................................................... 436 2.3. iptables ............................................................................................. 437 2.4. ................................................................................................... 437 2.5. iptables ................................................................................................... 437 2.6. /etc/init.d/iptables ....................................................................... 437 2.7. ............................................................................................... 437 2.8. ........................................................................................... 438 2.9. ..................................................................................... 439 2.10. ................................................................................................ 439 2.11. ............................................................................................................ 440 3. iptables ....................................................................................... 441 3.1. ............................................................................................................ 441 3.2. ............................................................................................ 441 3.3. ....................................................................................... 442 3.4. ............................................................................... 442 3.5. ............................................................................................. 443 3.6. Scripting .............................................................................................................. 444

xii

3.7. ........................................................................ 3.8. Firewall ................................................................................................ 3.9. ..................................................................... 3.10. iptables ACCEPTS ............................................................................................. 3.11. iptables DROP & REJECT ................................................................................. 3.12. ................................................................................................... 3.13. .................................................................................... 3.14. ......................................................... 3.15. ....................................... 3.16. ........................................................................ 3.17. Ports .................................................................................................................. 3.18. Sysctl' ............................................................................................................. 3.19. NAT .............................................................................. 3.20. The full script .................................................................................................... 4. ........................................................................................ 4.1. postfix ........................................................................................ 5. vsftpd ........................................................................................................... 5.1. ........................................................................................................... 5.2. VSFTPD ........................................................................................... 5.3. ............................................................... 5.4. .................................................................................................. 5.5. ................................................................... 5.6. ........................................................................................ 5.7. ............................................................................................................ 6. Jabber Server ................................................................................................................. 6.1. ............................................................................................................ 6.2. .............................................................................................. 6.3. .................................................................................................... 6.4. .................................................................................................... 7. Counter-Strike ................................................................................ 7.1. ............................................................ 7.2. ....................................................................................... 8. Samba Win2k ............................................................................. 8.1. ....................................................................................................... 8.2. ................................................................................................. 9. Samba PDC LDAP .................... 9.1. ................................................................................... 9.2. OpenLDAP .......................................................................................................... 9.3. OpenLDAP ................................................................................. 9.4. SAMBA .............................................................................................................. 9.5. LDAP ..................................................... 9.6. ............................................................................... 10. ...................................................................................... 10.1. .......................................................................................................... 10.2. "" ......................................................................................... 10.3. ............................................................... 10.4. .............................................................................................. 10.5. ................................................................. 10.6. .............................................................................................. 10.7. Linux iptables .................................................................................................... 10.8. FreeBSD ipfw .................................................................................................... 10.9. .............................................................................................. 445 445 446 447 448 449 449 450 450 451 452 454 455 457 465 466 473 473 473 474 474 474 475 475 476 476 476 476 477 477 477 477 478 478 478 482 482 482 484 484 492 494 498 498 499 499 500 503 504 504 505 507

xiii

10.10. "" ......................................................................... 508 10.11. ............................................................ 511 10.12. rrdtool ........................................................................................ 511 10.13. Net-Telnet .................................................................................. 512 10.14. Apache ....................................................................................... 512 10.15. ............................................................ 513 10.16. .............................................................. 514 10.17. ............................................................................ 516 10.18. ........................................................................... 519 10.19. ................................................................................................. 519 X ............................................................................................................................. 521 1. X .................................................................................. 522 1.1. ........................................................................................................... 522 1.2. ...................................................................... 522 1.3. ft ..................................................................................................................... 522 1.4. ............................................................ 523 1.5. ......................................................................... 524 1.6. Qt Gtk ........................................................................................... 525 2. X .................................................................................. 525 2.1. ........................................................................................................... 525 2.2. .................................................................................................. 526 2.3. ................................................................................. 526 2.4. .................................................................................... 526 3. Xorg X11 .............................................................................................. 527 3.1. ............................................................................................................ 527 3.2. X.org .................................................................................................. 528 3.3. X Composite Extension ....................................................................... 528 3.4. KDE 3.4 ................................................................................ 528 3.5. ........................................................................................................ 530 4. Xorg. ..................................................................................... 530 5. Xgl ............................................................................................................... 531 5.1. ............................................................................................................ 531 5.2. ........................................................................................................ 531 5.3. nvidia .................................................................. 532 6. XGL .............................................................................................................................. 533 6.1. ........................................................................................................... 533 6.2. ....................................................................................... 533 6.3. ........................................................... 533 6.4. ................................................................................ 534 6.5. Portage .................................................................................... 534 6.6. : ........................................... 535 6.7. ............................................................. 535 6.8. Xgl .................................................................................................... 537 6.9. Xgl ................................................................................................ 538 6.10. Xgl ....................................................................................................... 539 7. ..................................................................... 554 8. Cedega 5.1 ..................................................................................................................... 555 8.1. ............................................................................................................ 555 8.2. ........................................................................................................... 555 ....................................................................................................... 557 1. ...................................................................................................................................... 557 1.1. ................................................................................................. 557

xiv

2. ...................................................................................................................................... 559 2.1. - ......................................................................................................... 559 3. ...................................................................................................................................... 560 3.1. ...................................................................................... 560 4. ...................................................................................................................................... 560 4.1. CD ....................................................................................................... 560 5. ...................................................................................................................................... 561 5.1. .............................................................................................. 561 6. ...................................................................................................................................... 562 6.1. ............................................................................................... 562 7. ...................................................................................................................................... 563 7.1. .............................................................................. 563 8. ...................................................................................................................................... 563 8.1. ........................................................................................... 563 9. ...................................................................................................................................... 564 9.1. ................................................................................................... 564 10. .................................................................................................................................... 565 10.1. ....................................................................................................... 565 ccache emerge .............................................................................................. 566 Keymap ..................................................................................................................................... 567 5. Gentoo .......................................................................................................................... 568 Gentoo X.Org ........................................................................................................................ 571 1. X- 6.X ...................................... 572 1.1. X Window Server? .............................................................................. 572 1.2. Xorg .................................................................................................. 573 1.3. Xorg .................................................................................................. 574 1.4. xorg.conf .......................................................................................... 576 1.5. .............................................................................................................. 578 2. X- 7.X (.) ............................. 578 2.1. Introduction ......................................................................................................... 579 2.2. Preparation ......................................................................................................... 579 2.3. Emerge Modular X.org ....................................................................................... 581 2.4. Installation ......................................................................................................... 581 2.5. GL Issues ............................................................................................................ 582 2.6. Configuration file locations have changed ............................................................ 583 2.7. Other problems and solutions .............................................................................. 584 3. XkbOptions .................................................................................................................... 584 3.1. "XkbOptions" .................................................................................. 584 3.2. .............................................................................................................. 585 4. HOWTO Xorg and Fonts (.) ...................................................................................... 586 4.1. HOWTO ................................................................................ 586 4.2. ................................................................................................ 586 4.3. DPI ................................................................................... 586 4.4. Windows/Mac Linux ................... 587 4.5. ....................................................................... 587 4.6. (Hinting) ...................................................................... 588 4.7. .............................................................. 588 4.8. /etc/X11/xorg.conf ............................................................................................ 591 4.9. : /etc/X11/xorg.conf ( ) ...................................... 594 4.10. .......................................................................................... 594 4.11. Mozilla Firefox and Thunderbird ........................................................................ 595 4.12. ...................................................................... 597

xv

4.13. , Linux Konsole . ...................................... 598 4.14. , ............................ 598 4.15. startx ................................................................................ 598 4.16. XEmacs ............................................................................................................. 598 4.17. ............................................................................................ 599 4.18. ................................................................................................ 599 4.19. ( JohnBat26), : ~/.fonts.conf: .................................... 599 5. nVidia Gentoo Linux ...................................................... 600 5.1. ............................................................................................................ 601 5.2. ................................................................................................ 601 5.3. ........................................................................................................... 605 5.4. ..................................................................................... 606 6. ATI Gentoo Linux ....................................................... 607 6.1. ......................................................................................... 607 6.2. ........................................................................................................... 608 6.3. ............................................................................... 609 Gentoo KDE .......................................................................................................................... 611 1. HOWTO KDE 3.x.x ...................................................................... 611 1.1. K Desktop Environment? ................................................................ 611 1.2. KDE .................................................................................................. 612 1.3. ............................................................................................. 613 1.4. KDE .................................................................................................. 614 2. KDE (31) ......................................... 615 3. Gentoo KDE 4.0 Guide (.) ......................................................................................... 618 3.1. ........................................................................................................... 619 3.2. KDE 3.5 .................................................................. 622 3.3. FAQ ( ) ...................................................................... 622 GNOME .......................................................................................... 625 1. GNOME? ...................................................................................................... 625 1.1. ........................................................................................................... 625 1.2. ............................................................................... 625 1.3. ........................................................................................................ 626 2. GNOME ....................................................................................................... 626 2.1. ? ........................................................................................ 626 2.2. ........................................................................................... 626 3. GNOME ....................................................................................................... 627 3.1. GNOME .............................................. 627 6. Hardware ....................................................................................................................................... 628 Hardware 3D Acceleration Guide (.) .................................................................................... 631 1. Introduction .................................................................................................................... 632 1.1. What is hardware 3D acceleration and why do I want it? ........................................ 632 1.2. How do I get hardware 3D acceleration? ............................................................... 632 1.3. What is DRI? ...................................................................................................... 632 1.4. What is X11-DRM and how does it relate to regular Xorg? ..................................... 632 1.5. Purpose ............................................................................................................... 632 1.6. Feedback ............................................................................................................. 633 2. Install Xorg and configure your kernel ............................................................................. 633 2.1. Install Xorg ......................................................................................................... 633 2.2. Configure your kernel .......................................................................................... 633 3. Install X11-DRM and configure direct rendering .............................................................. 634 3.1. Install X11-DRM ................................................................................................. 634 3.2. Configure Xorg.conf ............................................................................................ 635

xvi

3.3. Changes to modules.autoload.d ............................................................................. 636 4. Test 3D acceleration ....................................................................................................... 636 4.1. Reboot to the new kernel ..................................................................................... 636 5. Using the CVS sources ................................................................................................... 637 6. Tweak your performance ................................................................................................. 638 6.1. Get the most out of direct rendering ...................................................................... 638 7. Troubleshooting .............................................................................................................. 640 7.1. It doesn't work. I just recompiled my kernel or switched to a new one. ..................... 640 7.2. It doesn't work. I don't have rendering, and I can't tell why. .................................... 640 7.3. When I startx, I get this error: "[drm] failed to load kernel module agpgart" .............. 640 7.4. Direct rendering doesn't work, and in /var/log/Xorg.0.log I have an error about driver version too low. .......................................................................................................... 640 7.5. I have a Radeon, and I want TV-Out. ................................................................... 640 7.6. It doesn't work. My card is so incredibly new and cool that it isn't supported at all. ................................................................................................................................... 641 7.7. I have a PCI card and it doesn't work. Help! ......................................................... 641 8. Acknowledgments .......................................................................................................... 641 9. 9. References ................................................................................................................. 641 Gentoo Linux ALSA .............................................................................................. 642 1. ....................................................................................................................... 643 1.1. ALSA? ............................................................................................... 643 1.2. ALSA Gentoo ................................................................................................... 643 2. ALSA ........................................................................................................... 643 2.1. ............................................................................................................ 643 2.2. ... ................................................................................................................. 644 2.3. ............................................................................ 644 2.4. ALSA , ................................. 645 2.5. ALSA ............................................................. 646 3. / ALSA ..................................................................................... 648 3.1. ALSA .................................................................................................. 648 3.2. ........................................................................................................... 648 3.3. ALSA ........................................................................ 649 3.4. audio ....................................................................................................... 649 3.5. ! .......................................................................................... 649 3.6. ! .................................................................................................. 651 3.7. ALSA USE ...................................................................................................... 652 3.8. ? ......................................................................................................... 652 4. ALSA .......................................................................................... 654 4.1. MIDI ............................................................................... 654 4.2. .................................................................................. 655 4.3. Firmware ........................................................................................... 656 4.4. .................................................................................... 656 4.5. ........................................................................................... 657 4.6. ... ............................................................................ 657 4.7. ............................................................................................................... 657 ........................................................................................... 658 1. ....................................................................................................................... 659 1.1. .................................................................................................... 659 1.2. ........................................................... 659 2. .................................................................................................................... 660 2.1. BIOS ................................................................................................................... 660 2.2. USE- ....................................................................................... 660

xvii

2.3. ............................................................................................ 660 2.4. (runlevel) "battery" ...................................................... 662 2.5. ACPI- .......................................................................... 662 3. .......................................................................................... 664 3.1. .............................................................................................. 664 3.2. ............................................................................... 665 3.3. .................................................................... 666 3.4. ........................................................................................... 669 4. LCD Power Management ................................................................................................ 669 4.1. (standby) .......................................................................... 669 4.2. ...................................................................................... 670 5. ......................................................................................... 671 5.1. (idle time) laptop-mode .......................................... 672 5.2. ......................................................................... 673 5.3. hdparm ................................................................................................................ 673 5.4. " " ...................................................................................... 673 6. ....................................................................... 674 6.1. ............................................................................................. 674 6.2. .............................................. 674 6.3. USB ................................................................................ 675 7. : sleep, standby, suspend to disk .......................................................... 675 7.1. Sleep (S3) ........................................................................................................... 675 7.2. Hibernate (S4) ..................................................................................................... 676 8. .................................................................................................. 678 7. , , Internet, e-mail . .................................................................................... 682 HOWTO Internet ................................................................................................. 686 1. VPN ............................................................................................................. 686 1.1. ................................................................................ 686 1.2. ............................................................................................. 687 1.3. ............................................................................................. 687 1.4. pptpconfig ....................................................................... 688 1.5. ...................................................................................... 689 2. pppoe ................................................................................................................... 691 3. DIAL-UP ................................................................................ 692 3.1. ......................................................................................... 692 3.2. ............................................................... 693 3.3. Call back ........................................................................................... 695 4. GPRS ..................................................................................... 696 4.1. ........................................................................................ 696 4.2. USB- ............................................................... 696 4.3. COM- .............................................................. 697 4.4. Bluetooth ............................................................................. 697 4.5. IrDA ................................................................................... 699 5. CDMA (SKYLINK) ................................................................ 699 5.1. .................................................................................. 699 5.2. ............................................................... 699 Gentoo GPRS ......................................................................................................................... 701 1. GPRS Linux .............................................................................................. 701 1.1. ............................................................................................................ 701 1.2. ......................................................................................................... 701 1.3. .................................................................................................. 702 1.4. ........................................................................................................... 703

xviii

1.5. ........................................................................................ 705 1.6. .............................................................. 705 1.7. ........................................................................................................ 705 2. GPRS USB ........................................................................................................... 705 3. GPRS KPPP ......................................................................................................... 708 4. , Toonel. (Linux) ............................................................. 709 4.1. . ................................................................ 710 5. GPRS Bluetooth .................................................................................................. 710 Gentoo ........................................................................... 711 1. ....................................................................................................................... 711 1.1. ? ................................................................ 712 1.2. ..................................................................................................... 712 2. Gentoo ..................................... 712 2.1. .................................................................................................. 712 2.2. .................................................................................... 713 2.3. ......................................................................... 713 2.4. /etc/channels.conf ................................................................................................. 713 2.5. ............................................................................................. 715 2.6. .................................................................................................. 716 3. ........................................................................................ 716 4. ............................................................................. 719 OpenVPN .......................................... 720 Gentoo LDAP-DNS Guide (.) ...............................................