Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2001 20:06:35 -0400
From:      "Sung N. Cho" <sucho2@vt.edu>
To:        Ron Rosson <insane@lunatic.oneinsane.net>, stable@freebsd.org
Subject:   Re: Preferred way of going to XFree86 4.1.0
Message-ID:  <3B53818B.A47BA3E7@vt.edu>
References:  <20010716121206.B35206@lunatic.oneinsane.net>

next in thread | previous in thread | raw e-mail | index | archive | help

Ron 'The InSaNe One' Rosson wrote:

> Currently running 4.3-stable with Xfree86 3x and am seriously thinking
> about upgrading Xfree86 4.1.0. IS there any thing I have to watch out
> for?
>
> A recommeneded step by step.
>
> TAI
> --
> ------------------------------------------------------------------------------
> Ron Rosson                                    ... and a UNIX user said ...
> The InSaNe One                                        rm -rf *
> insane@oneinsane.net                        and all was /dev/null and *void()
> ------------------------------------------------------------------------------
>     Make something idiot proof, and someone will build a better idiot.
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message



I have been using XFree86-4.0.3 and now XFree86-4.1 since it came out on
FreeBSD
4.3.  Here are the steps, I took for getting it to work properly.

1) Uninstall XFree86-3.3.x if you've installed it.  (Actually, you don't
need to
uninstall it.  It will just get over written!)

2) Install XFree86-4 either from /stand/sysinstall or by running "make
install"
from /usr/ports/x11/XFree86-4

3) Now, once everything is installed, run the configuration as a super
user:

#XFree86 -configure

now, this would have created a config file "XF86Config.new" in /root. 
Copy this
file to /etc/X11:

#cp /root/XF86Config.new    /etc/X11/XF86Config      **** Note, I
excluded ".new"
*****

now, you still need to retouch XF86Config file specific to your system:

#ee /etc/X11/XF86Config

Here is the configuration for my system:

----------------------------------------------------------
Section "ServerLayout"
 Identifier     "XFree86 Configured"
 Screen      0  "Screen0" 0 0
 InputDevice    "Mouse0" "CorePointer"
 InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
 RgbPath      "/usr/X11R6/lib/X11/rgb"
 ModulePath   "/usr/X11R6/lib/modules"
 FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
 FontPath     "/usr/X11R6/lib/X11/fonts/Speedo/"
 FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"
 FontPath     "/usr/X11R6/lib/X11/fonts/CID/"
 FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"
 FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
 Load  "dbe"
# Load  "dri"
 Load  "extmod"
# Load  "glx"
 Load  "pex5"
 Load  "record"
 Load  "xie"
 Load  "type1"                        # I'm also loading type1 font!
 Load  "freetype"                    # I'm also loading freetype font! 
AbiWord
complains if these don't get loaded!
EndSection

Section "InputDevice"
 Identifier  "Keyboard0"
 Driver      "keyboard"
EndSection

Section "InputDevice"
 Identifier  "Mouse0"
 Driver      "mouse"
 Option      "Protocol" "auto"
 Option      "Device" "/dev/psm0"        # Or,  "Device" "/dev/sysmouse"
if you
have moused running!
EndSection

Section "Monitor"
 Identifier   "Monitor0"
 VendorName   "Monitor Vendor"
 ModelName    "Monitor Model"
EndSection

Section "Device"
 ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        Option     "accel" "True"               # [<bool>]            #
My option

        #Option     "crt_screen"          # [<bool>]
        #Option     "composite_sync"      # [<bool>]
        Option     "hw_cursor" "True"           # [<bool>]            #
My option

        Option     "linear" "Trued"             #
[<bool>]                # My
option
        Option     "mmio_cache" "True"          # [<bool>]            #
My option

        #Option     "probe_clocks"        # [<bool>]
        #Option     "reference_clock"     # <freq>
        Option     "shadow_fb" "True"           #
[<bool>]                # My
option
        #Option     "sw_cursor"           # [<bool>]
 Identifier  "Card0"
 Driver      "ati"
 VendorName  "ATI"
 BoardName   "Mach64 LB"
 ChipSet     "ati"
 ChipId      0x4c42
 ChipRev     0xdc
 VideoRam    8192                        # This is extra I've added
(Video RAM =
8Meg)
 BusID       "PCI:1:0:0"
EndSection

Section "Screen"
 Identifier "Screen0"
 Device     "Card0"
 Monitor    "Monitor0"
 DefaultColorDepth 16                 # This is added to run the 16bit
color
depth.  You can use 24 or 32 also
 SubSection "Display"
  Depth     1
 EndSubSection
 SubSection "Display"
  Depth     4
 EndSubSection
 SubSection "Display"
  Depth     8
 EndSubSection
 SubSection "Display"
  Depth     15
 EndSubSection
 SubSection "Display"
  Depth     16
 EndSubSection
 SubSection "Display"
  Depth     24
 EndSubSection
EndSection
------------------------------------------------------------------------------

4) now, I wanna X to start automatically, so as a super user (root) do
these:

#ee /etc/rc.local

Here's how my rc.local file looks like:

---------------------------------------------------------
#!/bin/sh
/usr/X11R6/bin/xdm   # I'm running xdm.  If you wanna kdm instead, then
replace
it with /usr/local/bin/kdm
--------------------------------------------------------

5) now, you have to change the mode for rc.local file you've just
created.  Do
this:

#chown root:wheel   /etc/rc.local     # I'm making this a root owned
file
#chmod u+x   /etc/rc.local                # make this file executable

6) Now, you still need a little more.  You need to create ".xsession"
file in
your home directory.
Sign on as a regular user and do this:

% ee $HOME/.xsession     or      ee ~/.xsession            (either
works)

Here's how my .xsession file looks like:

----------------------------------------------------------
/usr/X11R6/bin/startxfce  # I'm using xfce as my desktop.  If KDE
preferred, then
/usr/local/bin/startkde
----------------------------------------------------------

7) now, you have to make ".xsession" executable.  Do this as a regular
user:

% chmod u+x $HOME/.xsession

8) Now, you need to copy files into /usr/X11R6/lib/X11/xdm for X can
start.  Do
this as a super user:

#rm -rf /usr/X11R6/lib/X11/xdm                         # It turns out
this
directory is empty!
# cp -Rp /etc/X11/xdm   /usr/X11R6/lib/X11/xdm

9) Now, Do this:
# cd /usr/X11R6/lib/X11/xdm
# ee Xsetup_0

Here's how mine looks:
------------------------------------------------------
#!/bin/sh
# $Xorg: Xsetup_0,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
# xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed
-exitOnFail
# I disabled it
# If you wanna have KDM login background, then add this:
/usr/local/bin/kdmdesktop
------------------------------------------------------------

10) Now do this:
# ee Xsession

Here's how my modified version looks:
-------------------------------------------------------------------
#!/bin/sh
#
# $Xorg: Xsession,v 1.4 2000/08/17 19:54:17 cpqbld Exp $
#
#
#
#
# $XFree86: xc/programs/xdm/config/Xsession,v 1.3 2001/01/17 23:45:24
dawes Exp $

# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER"
"/tmp/xses-$USER"
do
 if ( cp /dev/null "$errfile" 2> /dev/null )
 then
  chmod 600 "$errfile"
  exec > "$errfile" 2>&1
  break
 fi
done

case $# in
1)
 case $1 in
 failsafe)
  exec xterm -geometry 80x24-0-0
  ;;
 xfce)
  exec /usr/X11R6/bin/startxfce
  ;;
 esac
esac

#  The startup script is not intended to have arguments.

startup=$HOME/.xsession
resources=$HOME/.Xresources

if [ -s "$startup" ]; then
 if [ -x "$startup" ]; then
  exec "$startup"
 else
  exec /bin/sh "$startup"
 fi
else
 if [ -r "$resources" ]; then
  xrdb -load "$resources"
 fi
 exec xsm                                     # You can replace xsm by
say,
/usr/local/bin/startkde to start kde
                                                    # in this case, you
won't
even need .xsession in your home directory
fi
---------------------------------------------------------------------------------------------




THE END

Reboot the computer.  Or, if you wanna boot quickly, do this:

#shutdown now

then at the prompt, type

# return

You should be in X automatically.



I hope this helps.



Sung N. Cho,
Dept. of Physics,
Virginia Polytechnic Institute & State University.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B53818B.A47BA3E7>