To start another X-window session, that is, if another is already running,
type 'startx -- :1', the initial X starts in display 0. If you wanted to
just run the X-server in display 2, type 'xinit -- :2'.

#------------------------------------------------------------------------------------

To X-window remotely, type 'xinit', from the X-terminal give the remote
machine the permission to display on your local screen:
	% xhost name_of_remote_server

In a really secure environment (not the internet), you could allow all
machines permission to display on your screen using 'xhost +'. Next,
telnet the remote server, start an X-program on the remote server directing
the display on your local screen, for example:
	% startkde -display local_machine_name:0.0 &

You don't have to use the '-display' option if your environment variable
'DISPLAY' is set to the location of your current terminal. To terminate
the the remote X-session, use:
	% xhost -name_of_remote_server

The following is a summary:
	% startx
	% xhost diamond
	% telnet diamond
	% netscape -display sapphire:0.0 &
	...
	% xhost -diamond

#------------------------------------------------------------------------------------

To use Windows X-32 servers, you will most likely want to setup the XDMCP
protocol to provoke the login. This is the alternative to rsh and rexec
commands. The xdm daemon must be running (on the X client (unix)) to allow
the XDMCP query to provoke the login. You can start it manually by typing
it in as root or configuring /etc/rc.d/rc.local to start it at system
boot. You can also use the prefdm daemon in the /etc/inittab configuration
file.

To start the xdm daemon:
	xdm

To configure the prefdm daemon
	# /etc/inittab
	x:345:respawn:/etc/X11/prefdm -nodaemon


#------------------------------------------------------------------------------------

Desktop decision process (GNOME or KDE)?

#/etc/X11/xinit/xinit:
	if -f $HOME/.Xclients, then exec
	else if -f /etc/X11/xinit/Xclients, then exec

#/etc/X11/xinit/Xclients:
	# (checking /etc/sysconfig/desktop file)
	if [ -n "`grep -i GNOME /etc/sysconfig/desktop`" ]; then
		PREFERRED=gnome-session
	elif [ -n "`grep -i KDE /etc/sysconfig/desktop`" ]; then
		PREFERRED=startkde
	fi

To change a default X-window (KDE, Gnome, etc..) in X, create (or edit) the
'.xsession' file:
#/$HOME/.xsession:
	exec startkde
	exec gnome-session
	exec xfce
	exec afterstep
	exec AnotherLevel
	exec fvwm2
	exec fvwm

#$HOME/.Xclients (chmod a+x .Xclients):
	/opt/kde/bin/startkde

#$HOME/.xinitrc
	#!/bin/sh
	usermodmap=$HOME/.Xmodmap
	xmodmap $usermodmap
	xset s noblank		# turn off the screen saver
	xset s 300 2		# screen saver in 5 min
	xset m 10 5		$ set mouse acceleration
	rxvt -cr green -ls -bg black -fg white -fn 7x14 -geometry 80x30+57+0 &
	if [ "$1" = "" ]; then
		WINMGR=startkde
	else
		WINMGR=$1
	fi
	$WINMGR