2006-11-26 07:43:35 -07:00
|
|
|
XCOMM!SHELL_CMD
|
2015-10-17 02:25:11 -06:00
|
|
|
XCOMM $OpenBSD: xinitrc.cpp,v 1.13 2015/10/17 08:25:11 matthieu Exp $
|
2006-11-26 07:43:35 -07:00
|
|
|
|
|
|
|
userresources=$HOME/.Xresources
|
|
|
|
usermodmap=$HOME/.Xmodmap
|
|
|
|
sysresources=XINITDIR/.Xresources
|
|
|
|
sysmodmap=XINITDIR/.Xmodmap
|
|
|
|
|
|
|
|
XCOMM merge in defaults and keymaps
|
|
|
|
|
|
|
|
if [ -f $sysresources ]; then
|
2008-04-20 07:46:02 -06:00
|
|
|
#ifdef __APPLE__
|
|
|
|
if [ -x /usr/bin/cpp ] ; then
|
|
|
|
XRDB -merge $sysresources
|
|
|
|
else
|
|
|
|
XRDB -nocpp -merge $sysresources
|
|
|
|
fi
|
|
|
|
#else
|
2006-11-26 07:43:35 -07:00
|
|
|
XRDB -merge $sysresources
|
2008-04-20 07:46:02 -06:00
|
|
|
#endif
|
2006-11-26 07:43:35 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $sysmodmap ]; then
|
|
|
|
XMODMAP $sysmodmap
|
|
|
|
fi
|
|
|
|
|
2008-06-18 14:31:51 -06:00
|
|
|
if [ -f "$userresources" ]; then
|
2008-04-20 07:46:02 -06:00
|
|
|
#ifdef __APPLE__
|
|
|
|
if [ -x /usr/bin/cpp ] ; then
|
2008-06-18 14:31:51 -06:00
|
|
|
XRDB -merge "$userresources"
|
2008-04-20 07:46:02 -06:00
|
|
|
else
|
2008-06-18 14:31:51 -06:00
|
|
|
XRDB -nocpp -merge "$userresources"
|
2008-04-20 07:46:02 -06:00
|
|
|
fi
|
|
|
|
#else
|
2008-06-18 14:31:51 -06:00
|
|
|
XRDB -merge "$userresources"
|
2008-04-20 07:46:02 -06:00
|
|
|
#endif
|
2006-11-26 07:43:35 -07:00
|
|
|
fi
|
|
|
|
|
2008-06-18 14:31:51 -06:00
|
|
|
if [ -f "$usermodmap" ]; then
|
|
|
|
XMODMAP "$usermodmap"
|
2006-11-26 07:43:35 -07:00
|
|
|
fi
|
|
|
|
|
2006-11-26 10:17:57 -07:00
|
|
|
XCOMM if we have private ssh key(s), start ssh-agent and add the key(s)
|
|
|
|
id1=$HOME/.ssh/identity
|
|
|
|
id2=$HOME/.ssh/id_dsa
|
|
|
|
id3=$HOME/.ssh/id_rsa
|
2011-03-19 09:40:02 -06:00
|
|
|
id4=$HOME/.ssh/id_ecdsa
|
2014-02-26 07:21:28 -07:00
|
|
|
id5=$HOME/.ssh/id_ed25519
|
2014-02-25 15:16:24 -07:00
|
|
|
|
2013-05-19 01:22:53 -06:00
|
|
|
if [ -z "$SSH_AGENT_PID" ];
|
2006-11-26 10:17:57 -07:00
|
|
|
then
|
2014-02-25 15:16:24 -07:00
|
|
|
if [ -x /usr/bin/ssh-agent ] && [ -f $id1 -o -f $id2 -o -f $id3 -o -f $id4 -o -f $id5 ];
|
2013-05-19 01:22:53 -06:00
|
|
|
then
|
|
|
|
eval `ssh-agent -s`
|
|
|
|
ssh-add < /dev/null
|
|
|
|
fi
|
2006-11-26 07:43:35 -07:00
|
|
|
fi
|
|
|
|
|
2006-11-26 10:17:57 -07:00
|
|
|
XCOMM start some nice programs
|
2006-11-26 07:43:35 -07:00
|
|
|
|
2006-11-26 10:17:57 -07:00
|
|
|
XCLOCK -geometry 50x50-1+1 &
|
|
|
|
XCONSOLE -iconic &
|
|
|
|
XTERM -geometry 80x24 &
|
|
|
|
WM || XTERM
|
2006-11-26 07:43:35 -07:00
|
|
|
|
2006-11-26 10:17:57 -07:00
|
|
|
if [ "$SSH_AGENT_PID" ]; then
|
|
|
|
ssh-add -D < /dev/null
|
|
|
|
eval `ssh-agent -s -k`
|
2006-11-26 07:43:35 -07:00
|
|
|
fi
|