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

  1.                      README for XFree86 4.1.0 on OpenBSD
  2.  
  3.                                Matthieu Herrb
  4.  
  5.                        Last modified on: 3 March 2000
  6.  
  7. 1.  What and Where is XFree86?
  8.  
  9. XFree86 is the Open Source port of X.Org's X11R6.5.1 release that supports
  10. several UNIX(R) and UNIX-like (such as Linux, the BSDs and Solaris x86) oper-
  11. ating systems on Intel and other platforms.
  12.  
  13. See the Copyright Notice.
  14.  
  15. The sources for XFree86 4.1.0 are available by anonymous ftp from:
  16.  
  17. ftp://ftp.XFree86.org/pub/XFree86/4.1.0
  18.  
  19. Binaries for OpenBSD/i386 2.8 and later are available from:
  20.  
  21. ftp://ftp.XFree86.org/pub/XFree86/4.1.0/binaries/OpenBSD
  22.  
  23. A list of mirror sites is provided by http://www.xfree86.org/MIRRORS.shtml
  24.  
  25. XFree86 also builds on other OpenBSD architectures. See section Building on
  26. other architectures (section 8.2, page 1) for details.
  27.  
  28. 2.  Bug Reports for This Document
  29.  
  30. Send email to <herrb@xfree86.org> (Matthieu Herrb) or <XFree86@XFree86.org>
  31. if you have comments or suggestions about this file and we'll revise it.
  32.  
  33. 3.  New OS dependent features
  34.  
  35. See the Release Notes for non-OS dependent new features in XFree86 4.1.0.
  36.  
  37. 3.1  New OS dependent features in 4.0.3
  38.  
  39.    o Support for the wscons console driver in post 2.8 OpenBSD.
  40.  
  41.    o A fix for multi-threaded libraries support.
  42.  
  43. 3.2  New OS dependent features in 4.0.2
  44.  
  45.    o Support for the OpenBSD ports tree,
  46.  
  47.    o Preliminary support for the powerpc architecture (clients build and
  48.      work, the server doesn't work yet),
  49.  
  50.    o xdm now writes an utmp entry,
  51.  
  52.    o startx now creates an Xauthority magic cookie for the display.
  53.  
  54. 3.3  New OS dependent features in 4.0.1
  55.  
  56.    o Several features from the OpenBSD X11 tree were merged into xdm:
  57.  
  58.         o  support for Kerberos IV authentication
  59.  
  60.         o use the arc4random(4) random number generator
  61.  
  62.         o add a new resource "allowRootLogin", which can be used to disable
  63.           root logins through xdm
  64.  
  65.         o log failed logins to syslogd
  66.  
  67.         o verify that the shell is valid using /etc/shell
  68.  
  69.         o verify that the account hasn't expired
  70.  
  71.    o The Xsun server can be built again on OpenBSD/sparc.
  72.  
  73. 3.4  New OS dependent features in 4.0
  74.  
  75.    o Multi-thread safe libraries are built by default on OpenBSD 2.6 and
  76.      later,
  77.  
  78.    o Preliminary APM support.
  79.  
  80. 3.5  New OS dependent features in 3.9.18
  81.  
  82.    o Support for USB mices has been added on OpenBSD.
  83.  
  84.    o Soft-booting secondary cards through the int10 BIOS interface is now
  85.      possible using the x86emu real mode emulator.
  86.  
  87. 3.6  New OS dependent features in 3.9.17
  88.  
  89.    o Silken mouse is supported for serial mices, and, under post 2.6 OpenBSD-
  90.      current for PS/2 mices.
  91.  
  92.    o MTRR Write Combining is enabled under post 2.6 OpenBSD-current.
  93.  
  94. 4.  Installing the Binaries
  95.  
  96. Refer to the Installation Document for detailed installation instructions.
  97.  
  98. 5.  Configuring X for Your Hardware
  99.  
  100. The /etc/X11/XF86Config file tells the X server what kind of monitor, video
  101. card and mouse you have.  You must create it to tell the server what specific
  102. hardware you have.
  103.  
  104. You'll need info on your hardware:
  105.  
  106.    o Your mouse type, baud rate and its /dev entry.
  107.  
  108.    o The video card's chipset (e.g. ET4000, S3, etc).
  109.  
  110.    o Your monitor's sync frequencies.
  111.  
  112. The recommended way to generate an XF86Config file is to use the xf86cfg
  113. utility.  The xf86config text utility is still there for the (few) cases
  114. where xf86cfg can't be used. Also, there is a sample file installed as
  115. /usr/X11R6/lib/X11/XF86Config.eg, which can be used as a starting point.
  116.  
  117. For details about the XF86Config file format, refer to the XF86Config(5) man-
  118. ual page.
  119.  
  120. Once you've set up a XF86Config file, you can fine tune the video modes with
  121. the xvidtune utility.
  122.  
  123. 5.1  About mouse configuration
  124.  
  125. XFree86 4.1.0 has support for the mouse driver included in the new wscons
  126. console driver introduced by OpenBSD-current after 2.8. Specify ``wsmouse''
  127. as the protocol and ``/dev/wsmouse0'' as the  device in /etc/X11/XF86Config
  128. if you're using OpenBSD-current with a PS/2 mouse.
  129.  
  130. The OpenBSD pms driver  provides both ``raw'' and ``cooked'' (translated)
  131. modes.  ``raw'' mode does not do protocol translation, so XFree86 would use
  132. the PS/2 protocol for talking to the device in that mode.  ``Cooked'' mode is
  133. the old BusMouse translation.  The driver runs in ``raw'' mode when using the
  134. /dev/psm0 device name.
  135.  
  136. See README.mouse  for general instruction on mouse configuration in XFree86.
  137.  
  138. 6.  Running X
  139.  
  140. 6.1  Starting xdm, the display manager
  141.  
  142. To start the display manager, log in as root on the console and type: ``xdm
  143. -nodaemon''.
  144.  
  145. You can start xdm automatically on bootup by changing the line
  146.  
  147.      xdm_flags=NO            # for normal use: xdm_flags=""
  148.  
  149. to:
  150.  
  151.      xdm_flags=""            # for normal use: xdm_flags=""
  152.  
  153. in /etc/rc.conf.
  154.  
  155. Note that the binary distributions of XFree86 for OpenBSD on ftp.xfree86.org
  156. and its mirrors don't include support for the XDM-AUTHORIZATION-1 protocol,
  157. because of the US export rules.
  158.  
  159. 6.2  Running X without the display manager
  160.  
  161. The easiest way for new users to start X windows is to type: ``startx >&
  162. startx.log''.  Error messages are lost unless you redirect them because the
  163. server takes over the screen.
  164.  
  165. To get out of X windows, type: ``exit'' in the console xterm.  You can cus-
  166. tomize your X by creating .xinitrc, .xserverrc, and .twmrc files in your home
  167. directory as described in the xinit and startx man pages.
  168.  
  169. 7.  Kernel Support for X
  170.  
  171. To make sure X support is enabled under  OpenBSD, the following line must be
  172. in your config file in /sys/arch/i386/conf:
  173.  
  174.      option XSERVER
  175.      option APERTURE
  176.  
  177. 7.1  Console drivers
  178.  
  179. The server supports the two standard  OpenBSD/i386 console drivers: pcvt and
  180. pccons. They are detected at runtime and no configuration of the server
  181. itself is required.
  182.  
  183. The pcvt console driver is the default in OpenBSD up to OpenBSD 2.8.  It
  184. offers several virtual consoles and international keyboard support.
  185.  
  186. OpenBSD-current after 2.8 has switched to the wscons console driver. This
  187. console driver has a pcvt compatibility mode for X support.
  188.  
  189. 7.2  Aperture Driver
  190.  
  191. By default OpenBSD includes the BSD 4.4 kernel security feature that disable
  192. access to the /dev/mem device when in multi-users mode. But the XFree86
  193. server require linear access to the display memory in most cases.
  194.  
  195. OpenBSD now requires the aperture driver to be enabled for all X servers,
  196. because the aperture driver also controls access to the I/O ports of the
  197. video boards.
  198.  
  199. To enable the aperture driver, once included in the kernel, set
  200.  
  201.      machdep.allowaperture=1
  202.  
  203. in /etc/sysctl.conf.
  204.  
  205. Some drivers need a patch to the aperture driver in the kernel to work cor-
  206. rectly with int10 support. If you get warning from xf86ReadBIOS like this
  207. one:
  208.  
  209.      (II) checkDevMem: using aperture driver /dev/xf86
  210.      (WW) xf86ReadBIOS: /dev/mem mmap[s=600,a=0,o=0] failed (Invalid argument)
  211.  
  212. you should patch your kernel and rebuild it. Until it's integrated in
  213. OpenBSD-current, or a better fix is found, the patch is available at
  214. ftp://ftp.laas.fr/pub/ii/matthieu/OpenBSD/patch-kernel-xf4.
  215.  
  216. I've also included it below, if you want to edit the source file by hand.
  217.  
  218.      Index: sys/arch/i386/i386/mem.c
  219.      ===================================================================
  220.      RCS file: /cvs/src/sys/arch/i386/i386/mem.c,v
  221.      retrieving revision 1.14
  222.      diff -u -r1.14 mem.c
  223.      --- sys/arch/i386/i386/mem.c  1999/11/20 11:11:28 1.14
  224.      +++ sys/arch/i386/i386/mem.c  2000/11/13 10:54:22
  225.      @@ -269,8 +269,8 @@
  226.       /* minor device 4 is aperture driver */
  227.           case 4:
  228.                if (allowaperture &&
  229.      -             (((off >= VGA_START && off <= BIOS_END) ||
  230.      -             (unsigned)off > (unsigned)ctob(physmem))))
  231.      +             (off <= BIOS_END ||
  232.      +              (unsigned)off > (unsigned)ctob(physmem)))
  233.                     return i386_btop(off);
  234.                else
  235.                     return -1;
  236.  
  237. In post 2.8 OpenBSD-current, a modified version of this patch has been inte-
  238. grated. You should set
  239.  
  240.      machdep.allowaperture=2
  241.  
  242. in /etc/sysctl.conf in order to achieve this. See the xf86(4) manual page for
  243. details.
  244.  
  245. Another (less recommended) way to enable linear memory and I/O ports access
  246. is to disable the kernel security feature by adding ``option INSECURE'' in
  247. your kernel configuration file and build a new kernel.  You will also need to
  248. comment out the line initializing securelevel to 1 in /etc/rc.securelevel.
  249.  
  250.      Caveat: the aperture driver only allows one access at a time (so
  251.      that the system is in the same security state once X is launched).
  252.      This means that if you run multiple servers on multiples VT, only
  253.      the first one will have linear memory access.  Use 'option INSE-
  254.      CURE' if you need more that one X server at a time.
  255.  
  256. 7.3  MIT-SHM
  257.  
  258. OpenBSD supports System V shared memory. If XFree86 detects this support in
  259. your kernel, it will support the MIT-SHM extension.
  260.  
  261. To add support for system V shared memory to your kernel add the lines:
  262.  
  263.       # System V-like IPC
  264.       options         SYSVMSG
  265.       options         SYSVSEM
  266.       options         SYSVSHM
  267.  
  268. to your kernel config file.
  269.  
  270. 8.  Rebuilding the XFree86 Distribution
  271.  
  272. The server developer's kit allow you to rebuild just the X server with a min-
  273. imum amount of disk space.  Just unpack it, make the appropriate changes to
  274. the xf86site.def, type ``./mkmf'' and ``make'' to link the server.  See
  275. /usr/X11R6/lib/Server/README for more info.
  276.  
  277. You should configure the distribution by editing xc/config/cf/host.def
  278. before compiling.  To compile the sources, invoke ``make World'' in the xc
  279. directory.
  280.  
  281. 8.1  Console drivers
  282.  
  283. XFree86 has a configuration option to select the console drivers to use in
  284. host.def:
  285.  
  286.    o  if you're using pccons only put:
  287.  
  288.            #define XFree86ConsoleDefines -DPCCONS_SUPPORT
  289.  
  290.    o if you're using pcvt only put:
  291.  
  292.            #define XFree86ConsoleDefines -DPCVT_SUPPORT
  293.  
  294. If you don't define XFree86ConsoleDefines in host.def the pccons and pcvt
  295. drivers will be supported by default.
  296.  
  297. Experimental native support for the wscons console driver found on
  298. OpenBSD/powerpc and on OpenBSD/i386 -current  can be built by adding:
  299.  
  300.       #define XFree86ConsoleDefines -DWSCONS_SUPPORT
  301.  
  302. to xc/config/host.def before rebuilding the server.  This has not been thor-
  303. oughly tested, except on the macppc.
  304.  
  305. For the i386, you should include both pcvt and wscons support in order to use
  306. the pcvt compatibility mode of wscons:
  307.  
  308.       #define XFree86ConsoleDefines -DPCVT_SUPPORT -DWSCONS_SUPPORT
  309.  
  310. 8.2  Building on other architectures
  311.  
  312. XFree86 should also compiles on other OpenBSD architectures. However, please
  313. note that 3.9.x snapshots have only been tested on the i386 for now.
  314.  
  315. Note that OpenBSD project has now its own source tree, based on the XFree86
  316. source tree, with some local modifications. You may want to start with this
  317. tree to rebuild from sources.  The OpenBSD X11 source tree is available by
  318. anoncvs from all OpenBSD anoncvs servers. See http://www.openbsd.org/anon-
  319. cvs.html for details on anoncvs.
  320.  
  321. 9.  Building New X Clients
  322.  
  323. The easiest way to build a new client (X application) is to use xmkmf if an
  324. Imakefile is included in the sources.  Type ``xmkmf -a'' to create the Make-
  325. files, check the configuration if necessary and type ``make''.  Whenever you
  326. install additional man pages you should update whatis.db by running ``make-
  327. whatis /usr/X11R6/man''.
  328.  
  329. 10.  Thanks
  330.  
  331. Many thanks to all people who contributed to make XFree86 work on *BSD, in
  332. particular, David Dawes, Pace Willison, Amancio Hasty, Christoph Robitschko,
  333. Nate Williams, Rod Grimes, Jack Velte and Michael Smith.
  334.  
  335.      Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/OpenBSD.sgml,v 1.17.2.1 2001/06/05 20:11:08 dawes Exp $
  336.  
  337.