Starting Linux X
The X system is better explained in the "HOW Linux Works CTDP Guide". A detailed analysis of the X system is planned for this document, but is not available for this version. See the "HOW Linux Works CTDP Guide" for more information.
To start Xwindows, the user must type "startx" on the command line. In Redhat Linux version 6.0, this file is in the "/usr/X11R6/bin" directory. It is listed below:
1 #!/bin/sh
2 #
3 # (c) 1999 Red Hat Software, Inc.
4
5 bindir=/usr/X11R6/bin
6
7 userclientrc=$HOME/.xinitrc
8 userserverrc=$HOME/.xserverrc
9 sysclientrc=/etc/X11/xinit/xinitrc
10 sysserverrc=/etc/X11/xinit/xserverrc
11 clientargs=""
12 serverargs=""
13
14 if [ -f $userclientrc ]; then
15 clientargs=$userclientrc
16 else if [ -f $sysclientrc ]; then
17 clientargs=$sysclientrc
18 fi
19 fi
20
21 if [ -f $userserverrc ]; then
22 serverargs=$userserverrc
23 else if [ -f $sysserverrc ]; then
24 serverargs=$sysserverrc
25 fi
26 fi
27
28 display=:0
29 whoseargs="client"
30 while [ "x$1" != "x" ]; do
31 case "$1" in
32 /''*|\.*) if [ "$whoseargs" = "client" ]; then
33 if [ "x$clientargs" = x ]; then
34 clientargs="$1"
35 else
36 clientargs="$clientargs $1"
37 fi
38 else
39 if [ "x$serverargs" = x ]; then
40 serverargs="$1"
41 else
42 serverargs="$serverargs $1"
43 fi
44 fi ;;
45 --) whoseargs="server" ;;
46 *) if [ "$whoseargs" = "client" ]; then
47 clientargs="$clientargs $1"
48 else
49 serverargs="$serverargs $1"
50 case "$1" in
51 :[0-9]) display="$1"
52 ;;
53 esac
54 fi ;;
55 esac
56 shift
57 done
58
59 # set up default Xauth info for this machine
60 mcookie=`mcookie`
61 serverargs="$serverargs -auth $HOME/.Xauthority"
62 xauth add $display . $mcookie
63 xauth add `hostname -f`$display . $mcookie
64
65 xinit $clientargs -- $serverargs
66
67 # various machines need special cleaning up,
68 # which should be done here
|