%% $Header: /cvsroot/lcdp/lpic/general-linux-1/slides/gl1.110.1.slides.tex,v 1.3 2003/05/30 05:04:32 waratah Exp $


\input{gl1.slide-header.tex}
\usepackage{epsfig}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->
\begin{slide} %================================================================
\begin{center} \LARGE \textsf{-- General Linux 2 -- \\
Install \& Configure X} \\[2mm]
\large  \textsf{(Linux Professional Institute Certification)}\\[1mm]

\normalsize\end{center}

\footnote{Copyright \copyright\ 2002 Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation---either version 2 of the License or (at your option) any later version.}
 
\scriptsize
\begin{verbatim} 
   .~.    
   /V\     by: geoffrey robertson        
  // \\        geoffrey@zip.com.au
  @._.@ 
\end{verbatim} 
\tiny
\begin{verbatim}
$Id: gl1.110.1.slides.tex,v 1.3 2003/05/30 05:04:32 waratah Exp $ 
\end{verbatim} 
\normalsize  
\vfill \end{slide} %-----------------------------------------------------------
%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->

%==============================================================================
%\begin{slide}{} %ghr 
%\Slidecontents
%\vfill \end{slide} %----------------------------------------------------------

%==============================================================================
%==============================================================================
\begin{slide} %ghr
\slideheading{}
\slidesubheading{}
\begin{description}
  \item[1.110.1] {\bf \underline{Install \& Configure XFree86}}
  \item[1.110.2] Setup a display manager
  \item[1.110.4] Install \& Customize a Window Manager Environment 
\end{description}
\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================
%==============================================================================
\begin{slide} %ghr
\Slideheading{Install \& Configure XFree86}
\slidesubheading{Objective} 

Candidate should be able to configure and install X and an X font
server. This objective includes verifying that the video card and
monitor are supported by an X server, as well as customizing and
tuning X for the videocard and monitor. It also includes installing an
X font server, installing fonts, and configuring X to use the font
server (may require a manual edit of /etc/X11/XF86Config in the
"Files" section)

\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide} %ghr
\Slideheading{Install \& Configure XFree86}
\slidesubheading{Key files, terms, and utilities}
\begin{alltt}
XF86Setup
xf86config
xvidtune 
/etc/X11/XF86Config
.Xresources 
\end{alltt} 
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide} %ghr
\Slideheading{Install \& Configure XFree86}
\slidesubheading{Resources of interest}
\begin{description} 
  \item[]: 
  \begin{alltt}
  
  \end{alltt}
  \item[]:

\end{description}
\vfill \end{slide} %-----------------------------------------------------------
 
  
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{The Linux Desktop GUI}
\begin{itemize}
\item On Linux, the graphical desktop is controlled by 4 different types of software:
\begin{itemize}
  \item The X server - hardware interface
  \item A window manager - windows, icons etc
  \item Desktop manager - file manager, control panel etc
  \item The application itself (the x-client)
\end{itemize}

\item Only the X server \& X-client are mandatory
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{Window Managers}
\begin{itemize}
\item Some window managers are:
\begin{itemize}
  \item AfterStep - Light resource usage
  \item Blackbox - Fast \& simple
  \item Enlightenment - Resource intensive
  \item FVWM - Not so popular anymore
  \item IceWM - Emulates OS/2 \& windows
  \item Sawfish - default for Gnome
  \item Window Maker
  \end{itemize}
\end{itemize}

\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{Desktop Environments}
\begin{itemize}
\item There are two main Desktops are:
\begin{itemize}
  \item KDE
  \item Gnome
\end{itemize}
\end{itemize}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================


\begin{slide}{} %Andrew Eager
  \slideheading{Starting X}
\begin{itemize}
\item The X server is an executable called 'X'
\item Usually a link:
\begin{alltt}
\$ ls -l `which X`
lrwxrwxrwx    ...   /usr/bin/X11/X -> XFree86
\end{alltt}

\item You can start X in several ways:
\begin{itemize}
  \item X directly - (not very useful)
  \item xinit - X \& one X-term client
  \item startx - X \& desktop (KDE or Gnome)
\end{itemize}
\end{itemize}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{X Server Screen references}

When X starts, it associates itself with a \textit{display \& screen}. The syntax
for this is:  \texttt{   ':display.screen'}
\begin{itemize}
\item Display is 0 for the first X server, 1 for the next etc.
\item Screen is 0 for the first screen on a multihead card
\item The default for display \& screen are both 0
\end{itemize}

Example:

\texttt{ :0.1}

The second screen (head) on X server 0

\texttt{ :1.0 or :1}

The first screen on the second X server
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{Starting X directly}
\begin{itemize}
\item The syntax for X is:

\texttt{X [:display.screen] [options]}

Examples:

\cmd{X}

Start X on display 0, screen 0

\cmd{X :1}

Start X on display 1, screen 1

\cmd{X :1.1}

Start X on display 1, screen 1 

\end{itemize}

\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{Starting X using xinit}
\begin{itemize}
\item The syntax for xinit is:

\texttt{xinit [[client] options ] [--[server] [display] options ]}

Examples:

\cmd{xinit}

Start X and one xterm on display 0, screen 0

\cmd{xinit -- :1}

Start X and 1 xterm on the second display

\cmd{xinit /usr/X11R6/bin/xcalc -- :1}

Start X and xcalc on the second display 

\cmd{xinit /usr/bin/startkde -- :1}

Start X and kde on the second display
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------
 %==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{Starting X using startx}
\begin{itemize}
\item startx is a wrapper for X and your favourite desktop
\item it has the same syntax as xinit
\item On RedHat, default desktop is in \texttt{/etc/sysconfig/desktop}

Examples:

\cmd{startx}

Start X and the default desktop on display 0, screen 0

\cmd{startx -- :1 -depth 16}

Start X and desktop on the second display in 16 bit colour

\cmd{startx /usr/bin/startkde -- :1}

Start X and the kde desktop on the second display
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================
\begin{slide}{} %Andrew Eager
  \slideheading{Running X-clients remotely}
  \begin{itemize}
  \item An X-client can be told to direct its output to a given display in one of
    two ways:
    \begin{itemize}
    \item By using the DISPLAY environment variable
    \item By using the -display option on the command line
    \end{itemize}
  \item A remote display is specified using the syntax:

\texttt{hostname:display.screen}

Example:

\texttt{node12.c222:1.0}

Refers to the first screen on the second display of host node12.c222
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide}{} %Andrew Eager
  \slideheading{Running X-clients remotely}
  \begin{itemize}
  \item Using the -display option

    \cmd{xcalc -display node12.c222:1.0}

  \item Using the DISPLAY environment variable

    \cmd{export DISPLAY=node12.c222:1.0}

    \cmd{xcalc}

  \end{itemize}

Both methods will run xcalc on the second display of host node12.c222. Note that
in the second case, the DISPLAY variable is exported so it will apply to all X-clients
started on that terminal.

\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{Controlling access to the X server}
  \begin{itemize}
  \item By default, an X server will only accept connections from clients
    running on the same host as the server.
  \item Remote access can be granted using the \texttt{xhost} command
    \begin{itemize}
    \item \texttt{xhost +   } - Disable access control (any host is OK)
    \item \texttt{xhost -   } - Enable access control (only listed hosts)
    \item \texttt{xhost +hostname} - Allow hostname to connect
    \item \texttt{xhost -hostname} - Disallow hostname from connecting
    \end{itemize}
  \item xhost uses host based access control
  \item xhost must be run on the X server.
  \end{itemize}
  
\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{Testing access to the X server}
  \begin{itemize}
  \item As a client, you can see if you have permission to connect to a remote X server
    by:
    \begin{itemize}
    \item Setting \& exporting the DISPLAY variable to the desired X server
    \item running xhost without any arguments
    \end{itemize} 
  \item Example:- See if node12.c222 is available to us for display

    \cmd{export DISPLAY=node12.c222:1.0}

    \cmd{xhost}

    \texttt{xhost:  unable to open display "node12.c222:.0"}  
  \end{itemize}
  
  \vfill \end{slide} %-----------------------------------------------------------
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{The X server}
\begin{itemize}
\item There are two versions of the X server:
\item X version 3:
  \begin{itemize}
  \item Uses the configuration file \texttt{/etc/X11/XF86Config}
  \item Has different X executables for different cards
  \end{itemize}
\item X version 4:
  \begin{itemize}
  \item Uses the configuration file \texttt{/etc/X11/XF86Config-4}
  \item Has only one executable for all video cards (XFree86)
  \end{itemize}  
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================

\begin{slide}{} %Andrew Eager
  \slideheading{The X server}
\begin{itemize}
\item To tell which version you are running do the following:

Example:

\cmd{ls -l `which X`}

\begin{alltt}
lrwxrwxrwx   .... /usr/bin/X11/X -> XF86_SVGA
\end{alltt}
Using X version 3 on an SVGA card

\cmd{ls -l `which X`}

\begin{alltt}
lwxrwxrwx    .... /usr/bin/X11/X -> XFree86
\end{alltt}
Using X version 4.
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide}{} %Andrew Eager
  \slideheading{Version 3 drivers}
The version 3 drivers are specific to a particular card type. Some of the more common
drivers are:
\begin{itemize}
\item XF86\_3DL - 3D Labs video cards
\item XF86\_8514 - 8514 video cards
\item XF86\_AGX - AGX video cards
\item XF86\_FB - Generic frame buffer device for non-specific cards
\item XF86\_Mach64 - ATI Mach 64 video cards
\item XF86\_S3 - S3 based video cards
\item XF86\_S3V - S3 virge video cards
\item XF86\_SVGA - VESA Super VGA cards
\item XF86\_VGA16 - 16 colour VGA cards
\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================


\begin{slide}{} %Andrew Eager
  \slideheading{The X server}
\begin{itemize}
\item The X server:
\begin{itemize}
  \item is the interface to the graphics card
  \item allows X clients to display information
  \item can run multiple instances on a single card
  \item accepts \textbf{local or remote} X-clients
\end{itemize}
\end{itemize}

\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================


\end{document}

