2005-11-01 02:00:56 +00:00
|
|
|
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This
|
|
|
|
# copyrighted material is made available to anyone wishing to use, modify,
|
|
|
|
# copy, or redistribute it subject to the terms and conditions of the
|
|
|
|
# GNU General Public License version 2.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
# xinitrc-common
|
|
|
|
#
|
|
|
|
# This is common code shared by both Xsession and xinitrc scripts. Be sure
|
|
|
|
# to take this into account when fixing bugs or adding new functionality.
|
|
|
|
|
|
|
|
# Set up i18n environment
|
|
|
|
if [ -r /etc/profile.d/lang.sh ]; then
|
|
|
|
. /etc/profile.d/lang.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
userresources=$HOME/.Xresources
|
|
|
|
usermodmap=$HOME/.Xmodmap
|
|
|
|
userxkbmap=$HOME/.Xkbmap
|
|
|
|
|
|
|
|
sysresources=/etc/X11/Xresources
|
|
|
|
sysmodmap=/etc/X11/Xmodmap
|
|
|
|
sysxkbmap=/etc/X11/Xkbmap
|
|
|
|
|
|
|
|
# merge in defaults
|
2009-03-11 14:09:54 +00:00
|
|
|
[ -r "$sysresources" ] && xrdb -nocpp -merge "$sysresources"
|
2005-11-01 02:00:56 +00:00
|
|
|
[ -r "$userresources" ] && xrdb -merge "$userresources"
|
|
|
|
|
|
|
|
# merge in keymaps
|
|
|
|
if [ -r "$sysxkbmap" ]; then
|
|
|
|
setxkbmap $(cat "$sysxkbmap")
|
|
|
|
XKB_IN_USE=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -r "$userxkbmap" ]; then
|
|
|
|
setxkbmap $(cat "$userxkbmap")
|
|
|
|
XKB_IN_USE=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
# xkb and xmodmap don't play nice together
|
|
|
|
if [ -z "$XKB_IN_USE" ]; then
|
|
|
|
[ -r "$sysmodmap" ] && xmodmap "$sysmodmap"
|
|
|
|
[ -r "$usermodmap" ] && xmodmap "$usermodmap"
|
|
|
|
fi
|
|
|
|
|
|
|
|
unset XKB_IN_USE
|
|
|
|
|
|
|
|
# run all system xinitrc shell scripts.
|
|
|
|
for file in /etc/X11/xinit/xinitrc.d/* ; do
|
|
|
|
. $file
|
|
|
|
done
|
|
|
|
|
|
|
|
# Prefix launch of session with ssh-agent if available and not already running.
|
|
|
|
SSH_AGENT=
|
2010-01-29 09:33:32 +00:00
|
|
|
if [ -z "$SSH_AGENT_PID" ] && [ -x /usr/bin/ssh-agent ]; then
|
2005-11-01 02:00:56 +00:00
|
|
|
if [ "x$TMPDIR" != "x" ]; then
|
|
|
|
SSH_AGENT="/usr/bin/ssh-agent /bin/env TMPDIR=$TMPDIR"
|
|
|
|
else
|
|
|
|
SSH_AGENT="/usr/bin/ssh-agent"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-10-12 18:27:29 +00:00
|
|
|
CK_XINIT_SESSION=
|
2010-01-29 09:33:32 +00:00
|
|
|
if [ -z "$XDG_SESSION_COOKIE" ] && [ -x /usr/bin/ck-xinit-session ]; then
|
2009-02-25 09:57:22 +00:00
|
|
|
CK_XINIT_SESSION="/usr/bin/ck-xinit-session"
|
|
|
|
fi
|