Ensurepass

21. X Window System
21.1 Pieces
1. X Server
The X-server is responsible for managing resources for X-clients. These resources typically include the screen, keyboard, and mouse. The X server runs on the machine that the user interacts with. It passes user input back to the X-clients and outputs information from the X-clients back to the user via the screen.
2. X Clients
X-clients connect to the X-server in order to use it’s resources. X-clients can be ran locally on the same machine as the X-server or remotely (in which case they connect to the local X-server).
3. X Protocol
X-clients and X-servers communicate using this protocol.
21.2 Configuration Tools
1. Xconfigurator
o TUI based.
o Primary configuration tool used on RH machines.
o Automatically probes video card for necessary configuration information.
o If probe fails, use “SuperProbe” to determine video card.
o Recommended configuration tool.
o Use “–expert” option in order to override probed values.
2. xf86config
o Character based.
o Xconfigurator recommended over this for exam.
3. SuperProbe
o Part of XFree86.
o Can be used to determine video card if Xconfigurator fails.
o May freeze system when probing.
21.3 Configuration Recommendations
1. Choose “No Clockchip Setting”
2. Select multiple video modes in case one doesn’t work
3. If your card is unsupported, choose the generic SVGA or VGA support.
21.4 Hardware Support
1. Websites
o RH Hardware Compatibility Lists – http://www.redhat.com/corp/support/hardware/index.shtml
o XFree 3.X – http://www.XFree86.org/cardlist.shtml
o XFree 4.X – http://www.XFree86.org/4.1.0/Status.shtml
o Laptops – http://linux-laptop.net
21.5 Files
1. X Configuration
o Default font path – /usr/X11R6/lib/X11/fonts
o User configuration files
1. ~/.xinitrc – Starts specified xclients in background and then execs a window manager (e.g. exec startkde).
2. ~/.Xclients – execs .Xclients-default. Created by switchdesk.
3. ~/.Xclients-default – Starts desktop environment (e.g. exec startkde or exec wmaker). This is used to override the default desktop environment specified in /etc/sysconfig/desktop. This file is created by switchdesk.
4. ~/.xsession – Used by display managers (e.g. xdm,kdm,gdm).
5. ~/.Xresources –
6. ~/.Xkbmap –
7. ~/.xmodmap –
o System configuration files
1. /etc/X11// – Window manager specific files.
2. /etc/X11/XF86Config-4 – XFree 4.X primary configuration file.
3. /etc/X11/XF86Config – XFree 3.X primary configuration file.
4. /etc/X11/xinit/xinitrc – Same purpose as .xinitrc in users $HOME. Only used if .xinitrc doesn’t exist.
5. /etc/X11/xinit/xinitrc.d/ – Contains additional init scripts for X startup. Executed by /etc/X11/xinit/xinitrc
6. /etc/X11/xdm/Xsession – Session configuration. Executed by display manager (e.g. xdm, kdm, gdm).
7. /etc/X11/xdm/xdm-config – Configuration file for xdm.
o /etc/X11/
1. applnk/ – Directory structure for menu items.
2. fs/ – Built-in font server configuration.
3. / – Window manager specific files.
4. gdm/ – Configuration files for gdm display manager.
5. xdm/ – Configuration files for xdm display manager.
6. xinit/ – Configuration files needed for X startup & initialization.
o /usr/X11R6/
1. bin/ – X binaries
2. lib/
* modules/ – X server extensions/modules.
* xscreensaver/ – Screen saver programs.
* X11/fonts/ – Default font path.
* X11/app-defaults/ – Application defaults.
* X11/locale/ – Locale information.
* X11/xkb/ – X related keyboard information.
2. /etc/X11/X
o XFree 4.X
/etc/X11/X is a symlink to /usr/X11R6/bin/XFree86
o XFree 3.X
/etc/X11/X is a symlink to the actual X server.
3. Common X Client Options
4. -display server:0.0
5. -geometry 100×100+10+20 # A box 100×100 pixels that is 10 pixels from the left
6. # and 20 from the top of the screen
7. -font font name
8. -background color
9. -foreground color
10. -title string
11. -bordercolor color
12. -borderwidth pixels
21.6 Window Managers
1. A special type of x-client.
2. Controls how other x-clients appear.
3. Causes all x-clients to display with common features (title bar, minimize & maximize buttons, etc.)
4. Basically controls look & feel of window session.
5. Common Window Managers:
o fvwm – Can be configured to emulate other windowing environments(e.g. Windows 95, Motif).
o WindowMaker – Resembles NEXTSTEP.
o Enlightenment – Previous default window manager for GNOME.
o Sawfish – Current default window manager for GNOME.
6. Configuration files stored in /etc/X11//
21.7 Desktop Environments
1. Provide more features than a window manager.
2. A window manager is one part of the desktop environment.
3. Attempts to create a consistent environment for all applications.
4. Common Desktop Environments:
o KDE – K Desktop Environment (QT based)
o GNOME – GNU Network Object Model Environment (GTK based)
21.8 Display Managers
1. X-client.
2. Handles authentication.
3. Examples: xdm, gdm, kdm.
4. To change, edit /etc/X11/prefdm
21.9 Session Managers
1. Executes display managers:
o xdm – /usr/bin/xsession
o kdm – /usr/bin/kwm
o gdm – /usr/bin/gnome-session
2. Doesn’t execute ~/.xinitrc
3. Will execute ~/.xsession if it exists, otherwise ~/.Xclients is executed.
21.10 Starting X
1. startx
o /usr/X11R6/bin/startx
Basic Operation
if exists (~/.xinitrc)
client = ~/.xinitrc
else
client = /etc/X11/xinit/xinitrc

if exists (~/.xserverrc)
server = ~/.xserverrc
else
server = /etc/X11/xinit/xserverrc

# Authorization setup
xauth add $display_name . $magic_cookie

xinit $client — $server
# If $server isn’t specified, xinit defaults to X:0

o /etc/X11/xinit/xinitrc
o if exists (/etc/X11/Xresources)
o xrdb -merge /etc/X11/Xresources
o if exists (~/.Xresources)
o xrdb -merge ~/.Xresources
o
o if exists (/etc/X11/Xkbmap)
o setxkbmap `cat /etc/X11/Xkbmap`
o if exists (~/.Xkbmap)
o setxkbmap `cat ~/.Xkbmap`
o
o if exists (/etc/X11/Xmodmap)
o xmodmap /etc/X11/Xmodmap
o if exists (~/.Xmodmap)
o xmodmap ~/.Xmodmap
o
o execute any scripts in /etc/X11/xinit/xinitrc.d/
o
o if exists (~/.Xclients)
o exec ~/.Xclients
o else if exists /etc/X11/init/Xclients
o exec /etc/X11/init/Xclients
o else
o exec fvwm2
o
2. xdm (Display Manager)
o /etc/X11/xdm/xsession
Basic Operation
execute any scripts in /etc/X11/xinit/xinitrc.d/

if exists (~/.xsession)
exec ~/.xsession
else if exists (~/.Xclients)
exec ~/.Xclients
else if exists (/etc/X11/xinit/Xclients
exec /etc/X11/xinit/Xclients
else
exec xsm

21.11 Remote Display of X Applications
1. Security
xhost controls access to the local X server. Access information is stored in ~/.Xauthority.
Format of xhost command:
xhost [+-]name

Where name is in the format of family:name. Family can be one of the following: inet(default),dnet,nis,krb,local.
xhost + # Grant access from everywhere
xhost – # Revoke access from everywhere
xhost +server.domain.com # Grant access from server.domain.com
xhost -server.domain.com # Revoke access from server.domain.com
xhost +local:bob # Allow local user bob access

2. Specifying a different display
Two ways to specify a display:
o Per client:
xterm -display server.domain.com:0.0
o For all clients:
export DISPLAY=server.domain.com:0.0
“DISPLAY” used by xclients to determine where to send output.
3. Putting it all together
To allow remote.xyz.com to display clients on local.xyz.com, perform the following steps:
o On local.xyz.com:
xhost +remote.xyz.com
o On remote.xyz.com:
o export DISPLAY=remote.xyz.com:0.0
o xterm
o
4. SSH
If X-Forwarding is enabled, SSH automatically configures everything for you so that can display X-clients from the remote host to your local host.
21.12 Troubleshooting X
1. Startup Problems
o X starts, but window manager doesn’t.
1. Check .xinitrc file to see if the window manager is exec’d at the end.
2. Check to see if window manager files are readable by user.
3. Try renaming user’s window manager configuration files and restart X.
o X won’t start.
1. Save existing XF86Config file and use Xconfigurator to build a new one.
2. Verify selected video card and it’s attributes with SuperProbe.
2. Mouse Problems
o Check physcial connection.
o Run mouseconfig.
o If it doesn’t work in X or gpm, it’s probably a problem with the mouse itself.
3. Can’t login to Display Manager
o Verify that the user can log successfully from a virtual terminal.
o Try a different window manager.
o Rename the user’s window manager configuration files and try again.
4. Display Alignment is off
o Try adjusting monitor settings.
o Use xvidtune to adjust mode lines in the XF86Config file.

Download the Ensurepass Latest 2013 RHCE EX300 Practise Test PDF to pass RHCE EX300 exam.

Comments are closed.