Information for Solaris <author>David Holland, modified by Marc Aurele La France <date>2001 October 01 <ident> $XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Solaris.sgml,v 1.4 2003/01/04 04:20:23 dawes Exp $ </ident> <!-- Table of contents --> <toc> <!-- Begin the document --> <sect>What is XFree86<p> XFree86 is a port of X11R6.5.1 that supports several versions of Unix. It is derived from X386 1.2 which was the X server distributed with X11R5. This release consists of many new features and performance improvements as well as many bug fixes. The release is available as a source code distribution, as well as binary distributions for many architectures. <p> The sources for XFree86 are available by anonymous ftp from: <quote> <htmlurl name="ftp://ftp.XFree86.org/pub/XFree86/current" url="ftp://ftp.XFree86.org/pub/XFree86/current"> </quote> Solaris binaries for XFree86 are available for anonymous ftp at the same address. Currently, two binary distributions are available: one for Solaris 8 x86, the other for previous Solaris x86 releases. They are <it>not</it> interchangeable. No binary distribution is available for Solaris/SPARC as it is still under development.<p> <sect>The VT-switching sub-system in Solaris x86<p> The virtual terminal sub-system is a undocumented, and unsupported feature of Solaris x86. Therefore if you use virtual terminals, you do so at <bf>YOUR OWN RISK</bf>.<p> Virtual terminals are not available in Solaris SPARC, and their availability has been removed in Solaris8 x86.<p> When available, the virtual terminals of Solaris work basically the same way as most other SVR4 VT sub-systems. However, there are a number of limitations documented below.<p> First, if you are running a Solaris 2.4 x86 system, and you want VT's, you will have to create the necessary devices first, so become root.<p> Verify the chanmux device driver's major number is 100:<p> <tscreen><verb> # grep -i chanmux /etc/name_to_major chanmux 100 # </verb></tscreen> If the number after 'chanmux' is anything but 100, I would suggest you immediately abort your attempt to create virtual terminals, and learn to live without them.<p> However, if it is 100, then as root type the following commands to create the maximum allowable number of virtual terminals.<p> <tscreen><verb> # cd /dev # mknod vt01 c 100 1 # mknod vt02 c 100 2 # mknod vt03 c 100 3 # mknod vt04 c 100 4 # mknod vt05 c 100 5 # mknod vt06 c 100 6 # mknod vt07 c 100 7 </verb></tscreen> There is no need for a reconfiguration boot.<p> Secondly, for both 2.1, and 2.4 x86 systems, add a few lines to the <tt/inittab/ to enable logins on them.<p> (<bf>Note</bf>, do <bf>NOT</bf> make a mistake here, you could lock yourself out of the system)<p> <verb> --------------------->Snip Snip<----------------------------------------------- v1:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT01 login: " -T AT386 -d /dev/vt01 -l console v2:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT02 login: " -T AT386 -d /dev/vt02 -l console v3:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT03 login: " -T AT386 -d /dev/vt03 -l console v4:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT04 login: " -T AT386 -d /dev/vt04 -l console ---------------------->End Here<----------------------------------------------- </verb> These four lines enable four VT's on Alt-SysReq-F1 through Alt-SysReq-F4.<p> Then execute the command '<tt>init q</tt>' to immediately enable the virtual terminals.<p> The keys used for VT switching are as follows:<p> <quote> <tt>Alt-SysReq-F1</tt> through <tt>Alt-SysReq-F7</tt> enable VT screens 1-7 respectively (if the VT is active).<p> <tt>Alt-SysReq-n</tt> enables the next active VT screen.<p> <tt>Alt-SysReq-p</tt> enables the previous active VT screen.<p> <tt>Alt-SysReq-h</tt> returns to the console.<p> </quote> If you are using virtual terminals, you must leave at least one free for use by the Xserver.<p> Limitations of the virtual terminal sub-system under Solaris x86:<p> There are only a total of 8 available VT's (7 normal VT's + 1 console) not the usual 15. If you have all 8 allocated, and you attempt to allocate a additional VT you will panic the system. (This bug is worked around in the Solaris XFree86 Xserver.)<p> From a programming stand point, they work pretty much as documented in the AT&T Unix System V/386 Release 4 Integrated Software Development Guide, however a number of <tt>ioctl()</tt> calls are broken.<p> <sect>Notes for building XFree86 on Solaris<p> <enum> <item> Both GCC, and ProWorks are supported by XFree86. The minimum recommended GCC release is 2.7.2. Some earlier GCC's are known to not work and should be avoided.<p> You should also make certain your version of GCC predefines `sun'. If needed edit <tt>/usr/local/lib/gcc-lib/*/*/specs</tt>, and modify the <tt>*predefines:</tt> line.<p> On SPARCs, regardless of the compiler you use, ensure it generates 32-bit binaries. At this time, 64-bit binaries will probably not work.<p> <item> Also on SPARCs, you will need to set BuildXFree86OnSparcSunOS to YES in ~xc/config/cf/host.def. Otherwise, you can only build the old deprecated Xsun* servers.<p> <item> A Threaded Xlib compiled with GCC has subtle problems. It'll work 98% of the time, however clients will occasionally exhibit strange hangs. Most notably image viewers such as xv-3.10 exhibit this problem.<p> It is recommended that you set ThreadedX in <tt>~xc/config/cf/host.def</tt> to NO, if you are using GCC. ProWorks does not have this problem. Whether this behaviour still exists with newer GCC's has not been verified.<p> <item> To build XFree86 with GCC you need gcc and (optionally) c++filt from GNU binutils. Don't install gas or ld from GNU binutils, use the one provided by Sun.<p> You might need to setup a /opt/SUNWspro/bin directory containing symbolic links named <tt/cc/, <tt/CC/, and <tt/c++filt/ pointing respectively to the actual <tt/gcc/, <tt/g++/ and <tt/c++filt/ commands.<p> <item> If you are using ProWorks to compile the XFree86 distribution, you need to modify your PATH appropriately so the ProWorks tools are available. Normally, they should be in <tt>/opt/SUNWspro/bin</tt><p> <item> You <bf>MUST</bf> put <tt>/usr/ccs/bin</tt> at the front of your PATH. There are known problems with some GNU replacements for the utilities found there. So the <tt>/usr/ccs/bin</tt> versions of these programs must be found before any possible GNU versions. (Most notably GNU '<tt/ar/' does not work during the build).<p> </enum> <sect>Notes for running XFree86 on Solaris<p> <enum> <item> Depending on the release or architecture of Solaris you are running, you might need to install an OS driver for an aperture device.<p> Under Solaris x86 2.5 and later, there's a system driver (<tt>/dev/xsvc</tt>) that provides this functionality. It will be detected automatically by the server, so you don't need to install the aperture driver.<p> For older Solaris x86 and for Solaris SPARC releases, the source for this driver is included in <tt>xc/programs/Xserver/hw/xfree86/etc/apSolaris.shar</tt> of the source distribution. This file can usually also be found in the <tt>/usr/X11R6/lib/X11/etc</tt> directory when XFree86 is installed. Building, and installing the driver is relatively straight forward. Please read its accompanying README file.<p> <item> If you have not made the Virtual Terminal devices, you will need to specify the terminal device to run the Xserver on. The correct device is vt00 so your <tt>xinit</tt> command would look like so:<p> <tscreen><verb> xinit -- vt00 </verb></tscreen> If you have made the virtual terminal devices you do not need to specify the VT to run the Xserver on.<p> <item> For Solaris you will probably want to set your LD_LIBRARY_PATH to <tt>/usr/X11R6/lib:/usr/openwin/lib:/usr/dt/lib</tt>. Including <tt>/usr/X11R6/lib</tt> in your LD_LIBRARY_PATH is probably not necessary, however it doesn't hurt. :)<p> Including <tt>/usr/openwin/lib</tt> in the LD_LIBRARY_PATH is recommended because some Sun supplied binaries were not compiled with LD_RUN_PATH set properly at compile time.<p> Motif and CDE applications may require <tt>/usr/dt/lib</tt> in your LD_LIBRARY_PATH too. <item> Xqueue is <bf>NOT</bf> supported under Solaris. The includes necessary for Xqueue are available, however the driver does not seem to be in the kernel. (Go figure)<p> <item> If you want to use xdm with Solaris, extract the files from the shar file in <tt>/usr/X11R6/lib/X11/etc/XdmConf.svr4</tt> into a temporary directory. The <tt>README</tt> file tells where the individual files need to be installed. Be sure to read through each file and make any site-specific changes that you need.<p> </enum> <sect> Known bugs, and work arounds with Solaris<p> <enum> <item> The Solaris 2.1 for x86 OpenWindows filemgr does not work against a X11R5 Xserver, it probably will also not work against a X11R6 Xserver. Attempting to 'Drag and Drop' a file causes the filemgr to abort with an 'X error'<p> Solaris x86 2.4 does not have this problem.<p> There is no known work around.<p> <item> The SPARC port is still quite new, so instability is to be expected (and reported!). It might even have broken some aspects of the x86 port.<p> </enum> <sect>Bug Notification<p> Bug reports should be sent to <email>XFree86@XFree86.org</email>. </article>