#!/bin/sh ################################ # building X.org X11R7.7 from tarballs from scratch (w/o git(1)) # this IS meant to be complete (and less exhaustive) # # why not use Xfree86 4.8.0 ? try it if the fonts don't give you problems # and has your hw video support, use it: it builds and installs easy AND FULLY # # but has been years since last released. i tried both, unure which is fav # # this works with debian sarge on: Mon Nov 24 11:17:51 EST 2014 # good: simple and straight down procedure. bad: takes longer than git(1) ################################ # NEEDS: basic gcc compile tools # (ie, 2002 or newer, assume, you can compile linux kernel before this) # apt-get xmlto openjade gettext libxml2-dev wget ftp ################################ # set -n set -e set -x function ask() { while [ 1 ] do unset X Y echo "$quest" >>/dev/stderr ; read X echo "you chose: $X. are you sure? y/n" >>/dev/stderr ; read Y [ c"$Y" = c"y" ] || continue ( [ c"$X" = c"y" ] || [ c"$X" = c"n" ] ) || continue break done } cat << EOF >> /dev/stderr NOTE: i suggest you "move aside" /usr/local/ so IT IS FRESH, so installed files are fresh and separate from whatever is there EOF quest="Download X11R7.6, patch, build, and finish? (say y) y/n" ask ( [ c"$X" = c"y" ] && [ c"$Y" = c"y" ] ) || exit ################################ # outline: download, ftp Mesa-7.8.2 msg, appy patches || msg # outline: build pre-Xorg, Xorg, build rest, cp /local/etc /etc, exit # outline: comments, including hacks todo if you have no patch.tar.gz ################################ # IMPORTANT: i suggest you "move aside" /usr/local/ so IT IS FRESH, unmangled #mkdir -p /usr/src || true #cd /usr/src mkdir -p xorg.dl/ || true cd xorg.dl/ wget --dont-remove-listing -L -np -mnH -R "*.bz2" http://www.x.org/releases/X11R7.6/src/ wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.4.tar.gz wget http://cgit.freedesktop.org/xorg/util/modular/tree/xorg.modules wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.8.0.tar.gz wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.4.tar.gz wget http://cairographics.org/releases/pixman-0.20.0.tar.gz wget http://cairographics.org/releases/cairo-1.10.2.tar.gz wget http://cairographics.org/releases/pycairo-1.8.2.tar.gz wget http://cairographics.org/snapshots/xsvg-0.2.1.tar.gz wget http://download.gnome.org/sources/librsvg/2.32/librsvg-2.32.1.tar.gz wget http://cairographics.org/snapshots/svg2png-0.1.3.tar.gz wget http://cairographics.org/snapshots/libsvg-0.1.4.tar.gz wget http://cairographics.org/snapshots/svg2pdf-0.1.3.tar.gz wget http://cairographics.org/snapshots/libsvg-cairo-0.1.6.tar.gz wget http://dri.freedesktop.org/libdrm/libdrm-2.4.22.tar.gz # NOTE: need Mesa-7.8.2 and must ftp it: ftp.freedesktop.org/pub/mesa/ # wget http://sourceforge.net/projects/mesa3d/files/MesaGLUT/7.5/MesaGLUT-7.5.tar.gz # wget http://sourceforge.net/projects/mesa3d/files/MesaLib/7.5/MesaLib-7.5.tar.gz wget http://www.python.org/ftp/python/2.5/Python-2.5.tgz wget http://ftp.gnu.org/gnu/m4/m4-1.4.13.tar.gz wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz wget http://ftp.gnu.org/gnu/automake/automake-1.11.tar.gz wget http://ftp.gnu.org/gnu/libtool/libtool-2.2.10.tar.gz wget http://xcb.freedesktop.org/dist/xcb-util-0.3.8.tar.gz wget http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz # can maybe do without these , i did and mine are old #ver?#wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.tar.gz #ver?#wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz wget http://www.x.org/releases/individual/app/xdm-1.1.10.tar.gz wget http://www.x.org/releases/individual/app/twm-1.0.5.tar.gz # see xterm notes wget http://invisible-mirror.net/archives/xterm/xterm-312.tgz wget http://www.x.org/releases/individual/app/xlsfonts-1.0.3.tar.gz wget http://ftp.gnome.org/pub/gnome/sources/intltool/0.33/intltool-0.33.tar.gz wget http://www.x.org/releases/individual/data/xkbdata-1.0.1.tar.gz wget http://www.x.org/releases/individual/app/xconsole-1.0.4.tar.gz wget http://www.x.org/releases/individual/app/xmessage-1.0.3.tar.gz # bare goodies you really should have available wget http://www.x.org/releases/individual/app/xedit-1.2.0.tar.gz wget http://www.x.org/releases/individual/app/xfontsel-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/editres-1.0.5.tar.gz wget http://www.x.org/releases/individual/app/xbiff-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xcalc-1.0.4.tar.gz wget http://www.x.org/releases/individual/app/xclipboard-1.1.1.tar.gz wget http://www.x.org/releases/individual/app/xclock-1.0.5.tar.gz wget http://www.x.org/releases/individual/app/xman-1.1.1.tar.gz # other useful goodies wget http://www.x.org/releases/individual/app/appres-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/beforelight-1.0.4.tar.gz wget http://www.x.org/releases/individual/app/bitmap-1.0.5.tar.gz # GL window manager - needy on non X11 depends # wget http://www.x.org/releases/individual/app/compiz-0.7.8.tar.gz wget http://www.x.org/releases/individual/app/constype-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/fonttosfnt-1.0.4.tar.gz wget http://www.x.org/releases/individual/app/fslsfonts-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/fstobdf-1.0.4.tar.gz # req gtk gconf etc - needy on non X11 depends # wget http://www.x.org/releases/individual/app/grandr-0.1.tar.gz wget http://www.x.org/releases/individual/app/ico-1.0.3.tar.gz # limited audience # wget http://www.x.org/releases/individual/app/intel-gpu-tools-1.0.tar.gz wget http://www.x.org/releases/individual/app/listres-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/mkcomposecache-1.2.1.tar.gz wget http://www.x.org/releases/individual/app/oclock-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/rendercheck-1.4.tar.gz wget http://www.x.org/releases/individual/app/rgb-1.0.4.tar.gz wget http://www.x.org/releases/individual/app/rstart-1.0.4.tar.gz wget http://www.x.org/releases/individual/app/scripts-1.0.1.tar.gz wget http://www.x.org/releases/individual/app/showfont-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/viewres-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/xbacklight-1.1.tar.gz wget http://www.x.org/releases/individual/app/xdbedizzy-1.1.0.tar.gz wget http://www.x.org/releases/individual/app/xditview-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xeyes-1.1.1.tar.gz wget http://www.x.org/releases/individual/app/xfd-1.1.0.tar.gz wget http://www.x.org/releases/individual/app/xfs-1.1.1.tar.gz wget http://www.x.org/releases/individual/app/xfsinfo-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/xgc-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/xinit-1.3.0.tar.gz wget http://www.x.org/releases/individual/app/xkbprint-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xload-1.1.0.tar.gz wget http://www.x.org/releases/individual/app/xlogo-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/xlsatoms-1.1.0.tar.gz wget http://www.x.org/releases/individual/app/xmag-1.0.4.tar.gz wget http://www.x.org/releases/individual/app/xmh-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xmore-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xscope-1.3.tar.gz wget http://www.x.org/releases/individual/app/xsetmode-1.0.0.tar.gz wget http://www.x.org/releases/individual/app/xsetpointer-1.0.1.tar.gz wget http://www.x.org/releases/individual/app/xsm-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xstdcmap-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xvidtune-1.0.2.tar.gz # wget http://www.x.org/releases/individual/lib/liblbxutil-1.1.0.tar.gz wget http://www.x.org/releases/individual/proto/xproxymanagementprotocol-1.0.3.tar.gz wget http://www.x.org/releases/individual/app/proxymngr-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/lbxproxy-1.0.2.tar.gz wget http://www.x.org/releases/individual/app/xfindproxy-1.0.1.tar.gz wget http://www.x.org/releases/individual/app/xfwp-1.0.1.tar.gz wget http://www.x.org/releases/individual/app/xrx-1.0.4.tar.gz # wget http://www.x.org/releases/individual/proto/printproto-1.0.4.tar.gz wget http://www.x.org/releases/individual/lib/libXp-1.0.0.tar.gz wget http://www.x.org/releases/individual/lib/libXprintUtil-1.0.1.tar.gz wget http://www.x.org/releases/individual/app/xplsprinters-1.0.1.tar.gz wget http://www.x.org/releases/individual/app/xprehashprinterlist-1.0.1.tar.gz # wget http://www.x.org/releases/individual/proto/trapproto-3.4.3.tar.gz wget http://www.x.org/releases/individual/lib/libXTrap-1.0.0.tar.gz wget http://www.x.org/releases/individual/app/xtrap-1.0.2.tar.gz # as courteousy, will ask about later wget http://sourceforge.net/projects/xdm-options/files/xdm-options.0.2.1.d.tar.gz wget http://sourceforge.net/projects/debguyscripts/files/patches-X11R7.6.tar.gz wget http://sourceforge.net/projects/debguyscripts/files/MAKEDEV mv xterm-312.tgz xterm-312.tar.gz mv xdm-options.0.2.1.d.tar.gz /tmp/ mv MAKEDEV /tmp/ cd .. mkdir -p xorg/ || true cd xorg/ mv `find ../xorg.dl/ -name *.gz` . rm -r ../xorg.dl/ for x in *.gz ; do tar -xzf $x ; done # NOTE: need Mesa-7.8.2 and must ftp it: ftp.freedesktop.org/pub/mesa/ [ ! -d Mesa-7.8.2 ] && { cat << EOF | less Need Mesa-7.8.2 it's absolutely needed given libdrm-2.4.22/ (xorg build will about certainly stop and have problems if you don't have that exact pair) (also Xorg will likely never build without libdrm, makefiles are to broken to trust working around not having it). however: i can find no source other than ftp which offers download, sorry, it's how they left it. obstructive yes, tell me about it # open firewall first if you have one, you should), then go get files $ ftp ftp.freedesktop.org user: foo pass: your_real@email.com ftp> bin ftp> tick ftp> mget /pub/mesa/older-version/7.x/7.8.2/* ftp> bye EOF } # see ERRATA ######################################### # these are first, jhbuild sugg dep, Xorg wiki too, wrong order incomplete # and leaves no indication of bootstraps: xproto, makedepend # * the below does not include sgml junk for making docs while server builds # there are MANY small hacks to do, X11R7.6 tarballs are not "clean", see below # SEE BELOW: apply hacks # 4 optional but if you alter .in .am (customize, add) you may need recent ones which xmlto cat << EOF > make-list m4-1.4.13 autoconf-2.68 automake-1.11 libtool-2.2.10 EOF cat << EOF > xserver-list util-macros-1.11.0 xproto-7.0.20 makedepend-1.0.3 xorg-docs-1.6 xorg-sgml-doctools-1.6 font-util-1.2.0 xtrans-1.2.6 libfontenc-1.1.0 freetype-2.4.4 fontsproto-2.1.1 libXfont-1.4.3 # do NOT see hack/xorg/xcb-proto-1.6, use python2.5+ xcb-proto-1.6 xextproto-7.1.2 xf86bigfontproto-1.2.0 inputproto-2.0.1 bigreqsproto-1.1.1 kbproto-1.0.5 renderproto-0.11.1 fixesproto-4.1.2 xf86vidmodeproto-2.3 videoproto-2.3.1 xineramaproto-1.2 randrproto-1.3.2 recordproto-1.14.1 damageproto-1.2.1 dmxproto-2.3 glproto-1.4.12 xf86dgaproto-2.1 compositeproto-0.4.2 dri2proto-2.3 xf86driproto-2.1.0 scrnsaverproto-1.2.1 resourceproto-1.1.1 xcmiscproto-1.2.1 windowswmproto-1.0.4 applewmproto-1.4.1 libXau-1.0.6 # libxcb depends, not in g5 libpthread-stubs-0.3 Python-2.5 # do NOT see hack/xorg/xcb-proto-1.6, use python2.5+ libxcb-1.7 libX11-1.4.0 libXext-1.2.0 libICE-1.0.7 libSM-1.2.0 libXt-1.0.9 libXmu-1.1.0 libXpm-3.5.9 libXaw-1.0.8 libXfixes-4.0.5 libxkbfile-1.0.7 libXv-1.0.6 libXi-1.4.0 libpciaccess-0.12.0 libXtst-1.2.0 libXdmcp-1.1.0 libdmx-1.1.1 libXrender-0.9.6 libXxf86vm-1.1.1 fontconfig-2.8.0 libXinerama-1.1.1 libXrandr-1.3.1 libXvMC-1.0.6 libXdamage-1.1.3 libXcursor-1.1.11 libXft-2.2.0 libXxf86dga-1.1.2 libXcomposite-0.4.3 libFS-1.0.3 font-alias-1.0.3 mkfontdir-1.0.6 mkfontscale-1.0.8 bdftopcf-1.0.3 font-bitstream-type1-1.0.3 font-cursor-misc-1.0.3 font-misc-misc-1.1.2 libXScrnSaver-1.2.1 font-xfree86-type1-1.0.4 font-winitzki-cyrillic-1.0.3 font-sun-misc-1.0.3 font-sony-misc-1.0.3 font-screen-cyrillic-1.0.4 font-schumacher-misc-1.1.2 font-mutt-misc-1.0.3 font-misc-meltho-1.0.3 font-misc-ethiopic-1.0.3 font-misc-cyrillic-1.0.3 font-micro-misc-1.0.3 font-jis-misc-1.0.3 font-isas-misc-1.0.3 font-ibm-type1-1.0.3 font-dec-misc-1.0.3 font-daewoo-misc-1.0.3 font-cronyx-cyrillic-1.0.3 font-bitstream-75dpi-1.0.3 font-bitstream-100dpi-1.0.3 font-bh-type1-1.0.3 font-bh-ttf-1.0.3 font-bh-lucidatypewriter-75dpi-1.0.3 font-bh-lucidatypewriter-100dpi-1.0.3 font-bh-75dpi-1.0.3 font-bh-100dpi-1.0.3 font-arabic-misc-1.0.3 font-adobe-utopia-type1-1.0.4 font-adobe-utopia-75dpi-1.0.4 font-adobe-utopia-100dpi-1.0.4 font-adobe-75dpi-1.0.3 font-adobe-100dpi-1.0.3 libdrm-2.4.22 Mesa-7.8.2 pixman-0.20.0 # SVG + cairo optional , but very useful and in news libsvg-0.1.4 cairo-1.10.2 libsvg-cairo-0.1.6 pycairo-1.8.2 svg2pdf-0.1.3 svg2png-0.1.3 xsvg-0.2.1 libXres-1.0.5 # i suggest configure flag, maybe req, see below # xorg-server-1.9.3 EOF # Xorg is built ###################### cat << EOF > after-x-list xf86-input-keyboard-1.5.0 xf86-input-synaptics-1.3.0 xf86-input-void-1.3.1 xf86-input-mouse-1.6.0 xf86-input-vmmouse-12.6.10 xf86-input-joystick-1.5.0 xf86-input-evdev-2.5.0 # xf86-input-aiptek-1.3.1 # xf86-input-acecad-1.4.0 # site local card hw xf86-video-dummy-0.3.4 xf86-video-vesa-2.3.0 xf86-video-fbdev-0.4.2 #xf86-video-glint-1.2.5 #xf86-video-i740-1.3.2 #xf86-video-ati-6.13.2 #xf86-video-intel-2.13.0 #xf86-video-s3-0.6.3 #xf86-video-cirrus-1.3.2 #xf86-video-trident-1.3.4 #xf86-video-sis-0.10.3 #xf86-video-mga-1.4.13 #xf86-video-v4l-0.2.0 #xf86-video-tga-1.2.1 #xf86-video-tseng-1.2.4 #xf86-video-tdfx-1.4.3 #xf86-video-suntcx-1.1.1 #xf86-video-sunleo-1.2.0 #xf86-video-sunffb-1.2.1 #xf86-video-suncg6-1.1.1 #xf86-video-suncg3-1.1.1 #xf86-video-neomagic-1.2.5 #xf86-video-chips-1.2.3 #xf86-video-suncg14-1.1.1 #xf86-video-sisusb-0.9.4 #xf86-video-mach64-6.8.2 #xf86-video-siliconmotion-1.7.4 #xf86-video-savage-2.3.1 #xf86-video-s3virge-1.10.4 #xf86-video-rendition-4.2.4 #xf86-video-voodoo-1.2.4 #xf86-video-ast-0.91.10 #xf86-video-r128-6.8.1 #xf86-video-ark-0.7.3 #xf86-video-nv-2.1.18 #xf86-video-i128-1.3.4 # is not adv pwr mgt, is a hw card #xf86-video-apm-1.2.3 # useful on lx? # libAppleWM-1.4.0 # no #xf86-video-vmware-11.0.3 #libWindowsWM-1.0.1 #xf86-video-wsfb-0.3.0 #xf86-video-geode-2.11.10 #xf86-video-xgixp-1.8.0 # other things xorg-server doesn't depend on but running Xorg needs # i built these in plain directory order: two depends on order did pop up encodings-1.0.4 gperf-3.0.4 iceauth-1.0.4 libAppleWM-1.4.0 libWindowsWM-1.0.1 luit-1.1.0 sessreg-1.0.6 setxkbmap-1.2.0 # smproxy-1.0.4 hack/fix-X11R7.6-missing-headers (so do other things) smproxy-1.0.4 x11perf-1.5.2 xauth-1.0.5 xbacklight-1.1.2 xbitmaps-1.1.1 xcb-util-0.3.8 xcmsdb-1.0.3 xcursorgen-1.0.4 # xcursor-themes-1.0.3 xcursorgen-1.0.4 xcursor-themes-1.0.3 xdpyinfo-1.2.0 xdriinfo-1.0.4 xev-1.1.0 xgamma-1.0.4 xhost-1.0.4 xinput-1.5.3 xkbcomp-1.2.0 xkbevd-1.1.2 xkbutils-1.0.3 intltool-0.33 xkeyboard-config-1.4 xkbdata-1.0.1 xkill-1.0.3 xlsatoms-1.1.0 xlsclients-1.1.1 xmodmap-1.0.5 xpr-1.0.3 xprop-1.2.0 xrandr-1.3.4 xrdb-1.0.7 xrefresh-1.0.4 xset-1.2.1 xsetroot-1.1.0 xvinfo-1.1.1 xwd-1.0.4 xwininfo-1.1.1 xwud-1.0.3 xdm-1.1.10 xbiff-1.0.2 xcalc-1.0.4 xclipboard-1.1.1 # can u believe xclock needs patch ??? xclock-1.0.5 xconsole-1.0.4 xmessage-1.0.3 xman-1.1.1 xedit-1.2.0 editres-1.0.5 # appres-1.0.3 beforelight-1.0.4 bitmap-1.0.5 compiz-0.7.8 constype-1.0.3 fonttosfnt-1.0.4 fslsfonts-1.0.3 fstobdf-1.0.4 grandr-0.1 ico-1.0.3 listres-1.0.2 mkcomposecache-1.2.1 oclock-1.0.2 rendercheck-1.4 rgb-1.0.4 rstart-1.0.4 scripts-1.0.1 showfont-1.0.3 twm-1.0.5 viewres-1.0.3 xbacklight-1.1 xdbedizzy-1.1.0 xditview-1.0.2 xeyes-1.1.1 xfd-1.1.0 xfontsel-1.0.3 xfs-1.1.1 xfsinfo-1.0.3 xgc-1.0.3 xinit-1.3.0 xkbprint-1.0.2 xload-1.1.0 # why does this need breakage, upgrading, patching ? it X leave it ! xlogo-1.0.3 xlsatoms-1.1.0 xlsfonts-1.0.3 xmag-1.0.4 xmh-1.0.2 xmore-1.0.2 xscope-1.3 xsetmode-1.0.0 xsetpointer-1.0.1 xsm-1.0.2 xstdcmap-1.0.2 xvidtune-1.0.2 # have depend order xproxymanagementprotocol-1.0.3 liblbxutil-1.1.0 lbxproxy-1.0.2 proxymngr-1.0.2 xfindproxy-1.0.1 xfwp-1.0.1 xrx-1.0.4 # ditto printproto-1.0.4 libXp-1.0.0 libXprintUtil-1.0.1 xplsprinters-1.0.1 xprehashprinterlist-1.0.1 # ditto trapproto-3.4.3 libXTrap-1.0.0 xtrap-1.0.2 xterm-312 EOF # i had no keyboard no how if order of these is reversed #xkeyboard-config-1.4 #xkbdata-1.0.1 # that last pkg is very important and was hard to find what/where ! for x in `cat make-list | grep -v "^$\|^#"` do cd $x ; ./configure ; make ; make install ; ldconfig ; cd .. done pwd="$PWD" quest="apply patches with backup? (say y) y/n" ask if ( [ c"$X" = c"y" ] && [ c"$Y" = c"y" ] ) ; then cd patches-X11R7.6/ for x in `find -name *.patch` do dir="`dirname $x`" [ -d "../$dir" ] && cd "../$dir" || \ { echo "missing ../$dir, skip" >> /dev/stderr ; continue ; } cat "$x" | patch -b file="`basename $x`" ; file="${x%-X11R7.6.patch}" if [ c"$file" = c"aclocal.m4" ] ; then autoreconf ; fi if [ c"$file" = c"configure.ac" ] ; then autoconf ; fi cd "$pwd" done fi cd "$pwd" for x in `cat xserver-list | grep -v "^$\|^#"` do cd $x ; ./configure ; make ; make install ; ldconfig ; cd .. done x="xorg-server-1.9.3" cd $x ; ./configure ; make ; make install ; ldconfig ; cd .. # hack/ was remove, was older attempt for x in `cat after-x-list | grep -v "^$\|^#"` do cd $x ; ./configure ; make ; make install ; ldconfig ; cd .. done # likely no linux dist checks local/etc and maybe should (rarely seen it) [ -e /etc/fonts ] && mv /etc/fonts /etc/fonts.$$ cp -r /usr/local/etc/* /etc/ # extra note on MAKEDEV there's one on linuxquestions.org that adds alsa # (linux sound) and many seem to need that too # note: even if you install certain base and could start X, install most # goodies: xdm-options (probably kdm, others) assume many are present # (ie, setxkbmap, xsetroot)(X will fail before/after login, no desktop at best) cat << EOF | less Before logging in using X as display (desktop) there are a few details... if you have a modern video card you need /dev/fb and /dev/dri. see /tmp/MAKDEDEV, move the one you have aside, put new in /dev/MAKEDEV, run (if you need sound, see fix_snd for /dev where this script got MAKEDEV from, see script. \$ cd /dev/ ; mv MAKDEV MD.old ; cp /tmp/MAKEDEV . ; sh MAKEDEV fb dri the new xkb rules map "kill server" when unix users do a common typo !! put Ctrl-Alt-Backspace as terminat server in your xorg.conf (see x.org/wiki how) \$ cd ~ ; export DISPLAY=":0" \$ Xorg -configure # and edit for your video/display prefs \$ cp xorg.new /etc/X11 # NOTE: see FILE below, add ServerFlags or get black screen To run X you must X Login. xdm (kdm, gdm others) do this. This script in tmp configures xdm (can be difficult to config, esp perms) for plain X login. (xdmo note: at entry menu choose 1 install before c continue. \$ cd /tmp/ ; tar -xzf /tmp/xdm-options.0.2.1.d.tar.gz ; cd xdm-options after that you should be ready (as root) to start logins: # (assuming you didn't do this from xdmo's menu) \$ export DISPLAY=":0" \$ /bin/xdm clean # X login will appear in a few seconds # xdm(1) [start|stop...] see -h, stopx(1), stopx resume the rest you should learn from http://www.x.org/wiki EOF exit # i like old kb rules from Xfree86 cp oldrules/xfree86 /usr/local/share/X11/xkb/rules/xfree86 # /etc/X11/xorg.config Option "XkbRules" "xfree86" Option "XkbModel" "pc104" DONE ? see FILE MAKEDEV below DONE ? ok after install see normal X docs, ie: $ Xorg -configure $ vi ~/xorg.conf.new $ cp ~/xorg.conf.new /etc/X11 if you make sure xdm bin is avail $ cd /tmp/ ; mkdir tmp ; cd tmp ; tar -xzf ../xdm-options* $ sh ./Install.sh # note select 1 (install) before using (c) continue # sets up xdm to provide X logins on vt7 # it will say can't find xserver, /etc/x11-loc is below * if i run (classic basic start/test X) $ export DISPLAY=:0 ; Xorg & ; sleep 3 ; xterm & twm & i get a BLANK SCREEN unless i used xdm-options (perhaps it's because xdmo checks /tmp/.X11 files perms for me) (X says an xlogin such as xdm must start X to run as normal user) * IMPORTANT * for starting Xorg in a "from scratch" setting: see FILE below for xorg ServerFlags - Xorg will show a black screen or quit if you don't * TIPS * get vbetool and chvt they are useful in various situations (ie if Xorg gives you black screen and appears frozen) try: Ctrl-Alt-Backspace # did that close X? (xkb/xf86 ^^) Ctrl-Alt-F1 # did that get you a text display? no? $ chvt 1 $ vbetool dpms on $ vbetool vbemode set 3 # you should now see a text terminal. you'd give # those cmds blind after Ctrl-Alt-F1 or by telnet in you shouldn't have to reboot computer unless you re-made linux kernel w/ mode video support and havent yet in /usr/X11R6/lib/X11/Options there are server (XAA) defaults for security while you likely can leave them be in normal use it covers things such as: can user copy contents of an xterm root has open (su root) which may be important in /usr/local/lib/X11/Options ? moved ? missing ? i'm gessing if you get the file Xorg will use it but surely has defaults and sure you can set them if you know what they are and find the xorg.conf syntax to do so CHAT well ok the "right thing" is to have a top level make file and have envrirontment varaibles set which some (NOT ALL) of the above look for and MIGHT fix the hacks below. however. you need fix_headers obviously if you ever compile anythign not from Xorg: X11R7.6 is broken they've been breaking allot. That's why XFree86 compiles so well and easily X and all the goodies. ok, but if you install (see above) after make, then nothing after needs a top level make. however. X.org pulled many things out of the build tree and hakced it wrong: right for them: but they have a full developer system set up they likely don't know how damaged these releases they made available for plain download are. bad news about this new X that's a pain is run ./configure on every pkg is time and heat (also work-arounds, since they use git and apparently never tried their tarball release). no top level build. pain to get X apps you need to even start X, much of it done above. good news with xorg's new "system" is potential: it makes pkgs that don't come with X allot more probable to compile and install even if your /usr/src/X11R7.6 is not present. HOWEVER that's just potential: i disagree that removing pkgs that are small and worked from XFree86 had any purpose but obstructing the build of Xorg - and note that if they are need to remove a few small apps for some purpose: deletion is allot easier than making the rest of us scrape around with finding essentials and fixing new pkgs that they separated and release as broken. ie, removing xkb, pixman, xdm, twm, xterm, xlsfonts - things really needed to start X and a pain to be all as separate pkgs when they were already in X build tree and worked: just senseless. possibly extra fonts ok. but essentials: not ok. at X11R6.9 they stopped using imake, thus xorg-cf-files...tar.gz, which (some?) had released "ready templates for bulding X11 for some targe" is no longer any good. i've been noticing they "added autoconf" but when doing so deleted the original authors flags while never adding configure.ac code which adds them back. also i see with git(1) or other tools "PGP owners" tend to have keyringed: they have "special flag sets for special builds". if you can them good. if not use the patches :0 ERRATA # glu glw demos are in 7.8.2 and confict / cause these to fail if you # already had them sourced and building ... # #ftp> mget /pub/mesa/glu/* #ftp> mget /pub/mesa/glw/* #ftp> mget /pub/mesa/demos/* # these also fail to build after Mesa-7.8.2 builds ... # glew.linux-1.5.1.1 # glewinfo.1.5.1.1 # visualinfo-1.5.1.1 # i got freeglut off of sourceforge.net, debian uses it, i haven't tried it # assuming i post this w/no way to post hack.X11R7.6.tar.gz just do this: ############################# sdksyms.sh , XV , and building Xorg (X) first let me warn: XV is on by default in xorg build, but off by default in xf86-video-xxx build (on by default in XFree86 %99 same drv) when one tries to turn off XV using configure it won't, but turned on it doesn't work: broken both ways. also while video drivers are "separate" and where they would go if in build tree is "a secret" there's NO OPTION fro XV it must be from environment. meaning they "separated from build" but didn't actually: they are using middle ware. and i've seen ALLOT of changelog entries some adding mandatory XV others moving it aside with complaint. (in XFree86 - it works no effort) i was told when i asked by someone (logged in as) an important name "it's insecure, don't use it" so i tried building without, finally did, only to find my video driver had FB code (removed i think) from newer version in older XFree86 and replace with other. finally: i think the answer is: you want XV if a video driver writer takes great effort to support and use it in the Video code (ie, movies) XV does work, problem was 0) ./configure.am had XV hacked out and uncheck for thus, XV=1 cannot disable PLUS empty CC LD flags (args) patch autoconf 1) sdksyms.sh didn't include all syms (for more than just XV 2) hw/xfree86/Makefile doesn't link Xorg to Xext/.libs/libXext.a unsure why yet $ patch -b sdksyms.sh sdksyms.sh-X11R7.6.patch $ patch -b configure.ac configure.ac-X11R7.6.patch $ patch -b configure.ac configure.ac-X11R7.6.patch $ patch -b patch intel_buffer_objects.c intel_buffer_objects.c-X11R7.6.patch # see below cd /xorg/xorg-server-1.9.3/hw/xfree86/loader/ mv sdksyms.sh sdksyms.sh.orig patch sdksyms.sh.orig sdksyms.sh.X11R7.6.patch # reset is done by make # new configure made, checks "have XV" correctly, not nullish cd /xorg/xorg-server-1.9.3/ mv configure.am configure.am.orig patch configure.am.orig configure.am.X11R7.6.patch autoconf this is a summary of changes (n.i. xorg_symbols added by sdksyms.sh) if even with the below, editing xorg_symbols: ../Makefile did not link Xorg, even with hacking. only when i used autconf with new configure.am did things go my way: this indicates X11R7.6 tarball was released broken) go without XV? insure your video driver doesn't require it first! i tried that and it didn't work (esp with OLD/ORIG configure script) i have to try XV="" again , havent w/new configure, may work i'm pretty sure my video-drv isnt' in xserver build tree and has XV default as true an no option to turn it off # FILE: xorg/xorg-server-1.9.3/hw/xfree86/loader/sdksyms.c /* WRONG - was hacked out to not work */ #if XV # include "xv.h" #endif /* #if XV #include "xf86xv.h" #include "xf86xvmc.h" #include "xf86xvpriv.h" /* currently, "xvdix.h" is indirectly included by others */ #endif /* need this if NOT XV (using orig configure, unsure with updated, but ok) */ #if XV #define XVFUNDONT #endif #ifndef XVFUNDONT /* for xf86XVClipVideoHelper xf86Ctrc.c */ #include "../../../include/miscstruct.h" #include #include #include extern _X_EXPORT Bool xf86XVClipVideoHelper( BoxPtr dst, INT32 *xa, INT32 *xb, INT32 *ya, INT32 *yb, RegionPtr reg, INT32 width, INT32 height ){return 0;} #endif ############################# # FILE: xorg/Mesa-7.8.2/src/mesa/drivers/dri/i915/intel_buffer_objects.c #/* add before other includes */ #include #include #include #include #include #include ############################# # FILE: xorg/Mesa-10.3.3/src/mesa/drivers/dri/i915/intel_buffer_objects.c /* add before other includes. can u tell Mesa team is in libdrm ? */ #include #include #include #include #include #include ############################# # FILE: xorg/libdrm-2.4.22/radeon/radeon_cs_gem.c /** * result is undefined if called with ~0 */ /* __builtin_ctz returns number of trailing zeros. */ /* static uint32_t get_first_zero(const uint32_t n) { return 1 << __builtin_ctz(~n); } */ /* replacement */ rst_zero(const uint32_t n) { unsigned int x,i, s, nn ; nn=(unsigned int) n; x=0;i=0;s=sizeof(n); for(i=1;i<=sizeof(n)*CHAR_BIT;++i) { if( (nn & 1) == 0 ) ++x; else break; nn=nn>>1; } return (uint32_t) x; } ############################# # FILE: xorg/xlsclients-1.1.1/xlsclients.c /* add just after: static xcb_atom_t WM_STATE; */ static xcb_atom_t WM_CLASS, WM_CLIENT_MACHINE, WM_COMMAND, WM_ICON_NAME, WM_NAME, WM_NAME, STRING; ############################# # FILE: xorg/x11perf-1.5.2/Makefile.in X11PERF_CFLAGS = @X11PERF_CFLAGS@ -I/usr/local/include/freetype2 x11perf_LDADD = $(XEXT_LIBS) $(XFT_LIBS) $(XRENDER_LIBS) $(X11PERF_LIBS) -lm -lfreetype ############################# # FILE: /etc/x11-loc # for xdm-options if using xdm BINDIR=/usr/local/bin LIBDIR=/usr/local/lib VARDIR=/var ETCX11DIR=/etc/X11 XSERVERNAME=/usr/local/bin/Xorg XDMDIR=/etc/X11/xdm-options XDM=xdm-options ############################# # FILE: /etc/xorg.conf # put this just after the Section "ServerLayout" # yes your mouse works - Xorg will still lock you out due to ?race cond? Section "ServerFlags" # use ctrl-alt-div to grab keyboard back Option "AllowDeactivateGrabs" "on" # use ctrl-alt-mul; sends app kill signal that may regain locked screen Option "AllowClosedownGrabs" "on" # start X even if mouse doesn't detect / load Option "AllowMouseOpenFail" "on" # xorg fakes no mouse/keyboard without this - but tells no one Option "AllowEmptyInput" "off" EndSection ############################# # FILE: configure.ac, patches for these cut at paste code from configure.ac on packages THAT WORK ! they add, configure check for XV, test for libXv, XV=1, and use pkg-config to find compile options in other words: most who hacked X's pkgs did this: several did not and on important packages which prevent X11R7.6 from buiding / running ############################# # FILE: /dev/MAKEDEV # if you don't see these you need them in there and run MAKDEV, DiY fb) for i in 0 1 2 3 4 5 6 7 do makedev fb$i c 29 $i $video done ;; fb[0-7]) dev=`suffix $arg fb` makedev fb$dev c 29 $dev $video ;; # some say -c 180 # some say perm 0600 0755 dri) mkdir -p dri for i in 0 1 2 3 4 5 6 7 do makedev dri/card$i c 226 $i $video done ;; dri[0-7]) dev=`suffix $arg dri` mkdir -p dri makedev dri/card$dev c 226 $dev $video ;; ############################# # xterm-312.tgz, xterm-267.tgz, other compile and install normally w/o Xft # the patch allows configure to find Xft given the above and if present # (others patches fix broken make which depend Xft but dont check freetype) # wget http://invisible-island.net/datafiles/release/xterm.tar.gz # ftp ftp.invisible-island.net/xterm/xterm-312.tar.gz ############################# # FILE: script to compile xterm that's in XFree86 4.8.0 "easy" # if you have problems with xterm's wacked out ./configure multi-plat stuff # the issue is X11R7.6 has not xterm at all, and xterm wants to use imake # which Xorg no longer uses (thus it may not work) # (personally: i wonder allot why configure is so slow and incompatible) #!/bin/sh set -e cd /usr/src/X11R6-4.8.0/xc/programs/xterm [ ! -x xterm ] && { cc \ -I . -I /usr/local/include -I /usr/local/include/X11/ -I /usr/include \ -c `ls *.c | grep -v "resize.c\|os2main.c\|vms.c` cc -I . -I /usr/local/include -I /usr/include \ -I /usr/local/include/X11/ -I /usr/local/include/freetype2 \ -L /usr/local/lib -L /usr/local/lib/X11/ -L /usr/lib \ -lX11 -lXext -lXpm -lICE -lSM -lXt -lXmu -lXaw7 -lXft -lfreetype -ltermcap \ -o xterm \ `ls *.o | grep -v "resize.o\|os2main.o\|vms.o"` } [ ! -x resize ] && { cc \ -I . -I /usr/local/include -I /usr/local/include/X11/ -I /usr/include \ -c resize.c xstrings.c cc -I . -I /usr/local/include -I /usr/include \ -L /usr/lib -ltermcap -o resize \ resize.o xstrings.o } # you can now install xterm, uxterm, resize # hack/ was remove, was fix-X11R7.6-missing-headers # old # after config.ac patch these should get installed # mkdir -p /usr/local/include/xorg/ # cp /usr/src/jdh/X11R7.6/xorg/xorg-server-1.9.3/hw/xfree86/common/xf86xv*.h /usr/local/include/xorg/ # old # ditto, x11perf, others, fixed by patches # mkdir -p /usr/local/include/X11/Xft/ # cp /usr/src/jdh/X11R7.6/xorg/freetype-2.4.4/include/freetype/config/*.h /usr/local/include/X11/Xft/