5f3c52
#!/bin/sh
5f3c52
# Copyright (C) 1999 - 2005 Red Hat, Inc. All rights reserved. This
5f3c52
# copyrighted material is made available to anyone wishing to use, modify,
5f3c52
# copy, or redistribute it subject to the terms and conditions of the
5f3c52
# GNU General Public License version 2.
5f3c52
#
5f3c52
# You should have received a copy of the GNU General Public License
5f3c52
# along with this program; if not, write to the Free Software
5f3c52
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
5f3c52
#
5f3c52
# Authors:
5f3c52
#	Mike A. Harris <mharris@redhat.com>
5f3c52
5f3c52
# Mandatorily source xinitrc-common, which is common code shared between the
5f3c52
# Xsession and xinitrc scripts which has been factored out to avoid duplication
5f3c52
. /etc/X11/xinit/xinitrc-common
5f3c52
5f3c52
# The user may have their own clients they want to run.  If they don't,
5f3c52
# fall back to system defaults.
5f3c52
if [ -f $HOME/.Xclients ]; then
5f3c52
    exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \
5f3c52
    exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients
5f3c52
elif [ -f /etc/X11/xinit/Xclients ]; then
5f3c52
    exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients || \
5f3c52
    exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients
5f3c52
else
5f3c52
    # Failsafe settings.  Although we should never get here
5f3c52
    # (we provide fallbacks in Xclients as well) it can't hurt.
5f3c52
    [ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
5f3c52
    [ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 &
5f3c52
    [ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 &
5f3c52
    [ -x /usr/bin/twm ] && /usr/bin/twm
5f3c52
fi