summaryrefslogtreecommitdiff
path: root/xinitrc.cpp
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@bluenote.herrb.com>2007-09-15 18:11:58 +0200
committerMatthieu Herrb <matthieu@bluenote.herrb.net>2008-03-08 18:48:16 +0100
commit990ed1483e9829a4977cbc52f631281f425aa5e0 (patch)
tree41af1e738ace61b473dda7209a9fc5b7e558a407 /xinitrc.cpp
parent26c69943680c943b879380a999cf01acec45fc2d (diff)
Add configure options to specify the default window manager and applications
Diffstat (limited to 'xinitrc.cpp')
-rw-r--r--xinitrc.cpp89
1 files changed, 17 insertions, 72 deletions
diff --git a/xinitrc.cpp b/xinitrc.cpp
index 89a65ca..6c10073 100644
--- a/xinitrc.cpp
+++ b/xinitrc.cpp
@@ -1,5 +1,6 @@
XCOMM!SHELL_CMD
XCOMM $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
+XCOMM $OpenBSD: xinitrc.cpp,v 1.2 2006/11/26 17:17:57 matthieu Exp $
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
@@ -9,15 +10,7 @@ sysmodmap=XINITDIR/.Xmodmap
XCOMM merge in defaults and keymaps
if [ -f $sysresources ]; then
-#ifdef __APPLE__
- if [ -x /usr/bin/cpp ] ; then
- XRDB -merge $sysresources
- else
- XRDB -nocpp -merge $sysresources
- fi
-#else
XRDB -merge $sysresources
-#endif
fi
if [ -f $sysmodmap ]; then
@@ -25,79 +18,31 @@ if [ -f $sysmodmap ]; then
fi
if [ -f $userresources ]; then
-#ifdef __APPLE__
- if [ -x /usr/bin/cpp ] ; then
- XRDB -merge $userresources
- else
- XRDB -nocpp -merge $userresources
- fi
-#else
XRDB -merge $userresources
-#endif
fi
if [ -f $usermodmap ]; then
XMODMAP $usermodmap
fi
-XCOMM start some nice programs
-
-#if defined(__SCO__) || defined(__UNIXWARE__)
-if [ -r /etc/default/xdesktops ]; then
- . /etc/default/xdesktops
-fi
-
-if [ -r $HOME/.x11rc ]; then
- . $HOME/.x11rc
-else
- if [ -r /etc/default/X11 ]; then
- . /etc/default/X11
- fi
-fi
-
-#if defined(__SCO__)
-if [ -n "$XSESSION" ]; then
- case "$XSESSION" in
- [Yy][Ee][Ss])
- [ -x /usr/bin/X11/scosession ] && exec /usr/bin/X11/scosession
- ;;
- esac
-fi
-
-if [ -n "$XDESKTOP" ]; then
- exec `eval echo $"$XDESKTOP"`
-else
- if [ -x /usr/bin/X11/pmwm -a -x /usr/bin/X11/scoterm ]; then
- /usr/bin/X11/scoterm 2> /dev/null &
- exec /usr/bin/X11/pmwm 2> /dev/null
- fi
-fi
-#elif defined(__UNIXWARE__)
-if [ -n "$XDESKTOP" ]; then
- exec `eval echo $"$XDESKTOP"`
-else
- if [ -x /usr/X/bin/pmwm ]; then
- exec /usr/X/bin/pmwm 2> /dev/null
- fi
+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
+if [ -x /usr/bin/ssh-agent ] && [ -f $id1 -o -f $id2 -o -f $id3 ];
+then
+ eval `ssh-agent -s`
+ ssh-add < /dev/null
fi
-#endif
-XCOMM This is the fallback case if nothing else is executed above
-#endif /* !defined(__SCO__) && !defined(__UNIXWARE__) */
+XCOMM start some nice programs
-#ifdef __APPLE__
+XCLOCK -geometry 50x50-1+1 &
+XCONSOLE -iconic &
+XTERM -geometry 80x24 &
+WM || XTERM
-if [ -d XINITDIR/xinitrc.d ] ; then
- for f in XINITDIR/xinitrc.dXSLASHGLOB.sh ; do
- [ -x "$f" ] && . "$f"
- done
- unset f
+if [ "$SSH_AGENT_PID" ]; then
+ ssh-add -D < /dev/null
+ eval `ssh-agent -s -k`
fi
-
-#endif
-
-TWM &
-XCLOCK -geometry 50x50-1+1 &
-XTERM -geometry 80x50+494+51 &
-XTERM -geometry 80x20+494-0 &
-exec XTERM -geometry 80x66+0+0 -name login