home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August - Disc 2 / chip_20018102_hu.iso / linux / X-4.1.0 / doc / README.Darwin < prev    next >
Encoding:
Text File  |  2001-06-27  |  8.4 KB  |  186 lines

  1.                        XFree86 on Darwin and Mac OS X
  2.  
  3.                                Torrey T. Lyons
  4.  
  5.                                  25 May 2001
  6.  
  7. 1.  Introduction
  8.  
  9. XFree86, a free implementation of X Windows, has been ported to Darwin and
  10. Mac OS X. This document is a collection of information for anyone experiment-
  11. ing with running X Windows on Apple's next generation operating system.
  12. Please send any comments on this page to <torrey@mrcla.com>.  If you are also
  13. working on modifications to the Darwin X server, please let me know.
  14.  
  15. 2.  Hardware Support and Configuration
  16.  
  17. XFree86 can be run either from the console or side by side with Mac OS X's
  18. Aqua desktop in a full screen mode. In full screen mode with Aqua, when the X
  19. window system is active, it takes over the entire screen. You can switch back
  20. to the Mac OS X desktop by holding down Command-Option-A. This key combina-
  21. tion can be changed in the user preferences. From the Mac OS X desktop, just
  22. click on the XDarwin icon in the floating switch window to switch back to the
  23. X window system.  You can change this behavior in the user preferences so
  24. that clicking on the XDarwin icon in the Dock switches as well. The full
  25. screen cooperative mode with Aqua is known as Quartz mode, named after the
  26. Quartz 2D compositing engine used by Aqua.
  27.  
  28. From the console, the Darwin port of XFree86 uses the IOKit for device driver
  29. loading and discovery, rather than the XFree86 module loader.  Because of
  30. this, the XFree86 configuration file is not used on Darwin or Mac OS X sys-
  31. tems. The descriptions found elsewhere of devices supported by XFree86 for
  32. other operating systems also do not apply.  Running XFree86 from the text
  33. console is known as IOKit mode.
  34.  
  35. XFree86 for Darwin or Mac OS X will work with any video card that you have an
  36. IOKit driver for. If you are running Mac OS X, this typically means any card
  37. that has been shipped by Apple. If a card works for you with the Mac OS X
  38. GUI, it will work on the same machine with XFree86. If you have a pure Darwin
  39. installation, you may need to download additional third-party drivers from
  40. Apple's Darwin site. IOKit drivers are typically installed in /Sys-
  41. tem/Library/Extensions/ or /Library/Extensions/.
  42.  
  43. Multi-button and scroll wheel mouse support works well with all USB mice that
  44. I have tested. I have done no testing with serial mice.
  45.  
  46. 3.  Getting Started
  47.  
  48. Following are instructions for building and running your own copy of XFree86.
  49. The procedure for getting your X server up and running on Darwin and Mac OS X
  50. are very similar. Where there are differences I have noted them below. Note
  51. that to build XFree86 for yourself on Mac OS X, you will need to install the
  52. Developers' Tools.
  53.  
  54. If you don't feel the need to live on the cutting edge, you can save some
  55. time and effort by using the precompiled binaries available on the XFree86
  56. FTP server at <URL:ftp://ftp.xfree86.org/pub/XFree86/4.1.0/binaries/Darwin/>.
  57. Follow the instructions in the Install document to install it. This will cre-
  58. ate two new directory trees, /usr/X11R6 and /etc/X11 For Mac OS X Quartz sup-
  59. port, download the optional Xquartz.tgz tarball.
  60.  
  61. If you get the precompiled binaries you can skip ahead to the section on run-
  62. ning the X window system (section 4., page 1) On the other hand, if you want
  63. to build things yourself from scratch, follow the directions below.
  64.  
  65. 3.1  Get the Code
  66.  
  67. The first thing you need to do is to get the source code from the XFree86
  68. project.
  69.  
  70.    o  Setup CVS: Both Darwin and Mac OS X include CVS (Concurrent Versions
  71.      System), which is an easy way to download and keep up to date with open
  72.      source code released by XFree86 and others. You do have to setup CVS
  73.      properly, however, to tell it where to look. Follow the XFree86 instruc-
  74.      tions on how to do this either via ssh or via the cvs pserver.
  75.  
  76.    o  Now make a directory in some convenient place which will serve as your
  77.      top level directory for you open source development efforts. I am going
  78.      to call this directory sandbox/ in the following discussions and you
  79.      could put this directory, for example, in ~/sandbox/.
  80.  
  81.    o From the command line type:
  82.  
  83.           cd sandbox
  84.           cvs checkout xc
  85.  
  86.      Wait for all the files to complete downloading.
  87.  
  88. 3.2  Build XFree86
  89.  
  90. Once you have everything ready it is easy to build and install XFree86. From
  91. the command line:
  92.  
  93.      cd sandbox/xc
  94.      make World >& world.log
  95.  
  96.      (wait for several hours)
  97.  
  98.      sudo make install >& install.log
  99.      sudo make install.man >& man.log
  100.  
  101. 4.  Run the X Window System
  102.  
  103. You will want to add the X window executables to your path. Your path is the
  104. list of directories to be searched when you type a command. You will also
  105. want to add the man pages from XFree86 to the list of pages to be searched
  106. when you are looking for documentation. The way to do this depends on the
  107. shell you are using. With tcsh or csh add the following two lines to a file
  108. named ~/Library/init/tcsh/path: (You may need to create this file and direc-
  109. tory path if it does not exist already.)
  110.  
  111.      setenv PATH "${PATH}:/usr/X11R6/bin"
  112.      setenv MANPATH "${MANPATH}:/usr/X11R6/man"
  113.  
  114. The next time you login or open a Terminal window, this file will be executed
  115. automatically.
  116.  
  117. You are now ready to go. On Mac OS X, you can run XFree86 from the text con-
  118. sole or in full screen mode with Aqua. To get to the text console in Mac OS X
  119. you need to logout and type ``>console'' as the user name. This will shutdown
  120. Core Graphics and bring up the console login prompt. Login again as your
  121. user.
  122.  
  123. From the text console you can start the X Window System by typing ``startx''.
  124. After a brief wait at least one terminal window should pop up for you.  So
  125. far it probably isn't very impressive as you might not even have a window
  126. manager running to allow you to move windows around.
  127.  
  128. When you are ready to quit XFree86 type ``exit'' in the main terminal window
  129. or quit with the window manager if you have one running. Unfortunately the X
  130. server won't shutdown correctly and you will get an apparently frozen screen
  131. with only a spinning beachball cursor on it. Nothing you type shows up on the
  132. screen, but in fact your keystrokes are being received by the console. Type
  133. ``logout'' to return to normalcy after a brief delay. With Darwin this should
  134. put you back at the text console login prompt. With Mac OS X, Core Graphics
  135. will restart and you should be given a login window.
  136.  
  137. To start XFree86 in Quartz mode you can launch the XDarwin application in the
  138. /Applications folder, or from the command line type ``startx -- -quartz''.
  139. When the X window system is active, it takes over the entire screen. You can
  140. switch back to the Mac OS X desktop by holding down Command-Option-A. This
  141. key combination can be changed in the user preferences. From the Mac OS X
  142. desktop, just click on the XDarwin icon in the floating switch window to
  143. switch back to the X window system. You can change this behavior in the user
  144. preferences so that clicking on the XDarwin icon in the Dock switches as
  145. well.
  146.  
  147. Customize X Windows
  148.  
  149. The X window system is very customizable and you will certainly want to
  150. change some things. There is a lot you can do to control how your windows
  151. look, how the windows are moved, resized, etc. You will likely want to get a
  152. better window manager than twm, which is included with XFree86. The .xinitrc
  153. file in your home directory controls what programs are run when you start the
  154. X window system. You can find a sample .xinitrc file in /etc/X11/xinit/xini-
  155. trc.
  156.  
  157. There are several window managers that have been ported to Darwin.  The best
  158. collection of window managers and other X window clients is at Darwinfo's
  159. ports page. Another good place to look for Darwin ports in general is at
  160. Stepwise's Softrak site.
  161.  
  162. Good luck!
  163.  
  164. 5.  Outstanding Issues with the X server
  165.  
  166. There is a still a lot to be done with the X server. As always please let me
  167. know if you are interested in working on any of these issues.
  168.  
  169. Things that are broken:
  170.  
  171.    o The bell does not work in IOKit mode.
  172.  
  173.    o Server shutdown problem: After quitting the X server in IOKit mode, the
  174.      colored beachball cursor reappears, but the screen never returns to the
  175.      console display. The console is accepting input however, so typing
  176.      ``logout'' will return you to the login prompt.
  177.  
  178.    o Only one display is currently supported.
  179.  
  180.    o The display mode can not be changed once  the  X  server has started.
  181.  
  182.    o A screen saver is not supported.
  183.  
  184.      Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Darwin.sgml,v 1.4.4.2 2001/06/02 04:44:37 torrey Exp $
  185.  
  186.