summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--Makefile.bsd-wrapper5
-rw-r--r--configure.ac14
-rw-r--r--xinitrc.cpp22
4 files changed, 41 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index c1eb5a9..507630a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,7 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
+XINITDIR = $(datadir)/X11/xinit
SUBDIRS = man
if LAUNCHD
SUBDIRS += launchd
@@ -46,7 +47,9 @@ PROGCPPDEFS = \
-DXTERM=@XTERM@ \
-DXSERVER=@XSERVER@ \
-DXAUTH=@XAUTH@ \
- -DXINIT=@XINIT@
+ -DXINIT=@XINIT@ \
+ -DWM=@WM@ \
+ -DXCONSOLE=@XCONSOLE@
CPP_FILES_FLAGS = \
-DXINITDIR=$(XINITDIR) $(PROGCPPDEFS) -DLIBDIR=$(libdir) \
diff --git a/Makefile.bsd-wrapper b/Makefile.bsd-wrapper
new file mode 100644
index 0000000..30496f3
--- /dev/null
+++ b/Makefile.bsd-wrapper
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2006/11/29 12:16:07 matthieu Exp $
+
+CONFIGURE_ARGS= --datadir=/etc
+
+.include <bsd.xorg.mk>
diff --git a/configure.ac b/configure.ac
index 461648b..5dd8a51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,8 @@ DEFAULT_XSERVER=${bindir}/X
DEFAULT_XAUTH=xauth
DEFAULT_XINIT=xinit
DEFAULT_XINITDIR=${sysconfdir}/X11/xinit
+DEFAULT_WM=fvwm
+DEFAULT_XCONSOLE=xconsole
AC_ARG_WITH(xrdb,
AS_HELP_STRING([--with-xrdb=XRDB], [Path to xrdb]),
@@ -96,6 +98,16 @@ AC_ARG_WITH(xinitdir,
[XINITDIR="$withval"],
[XINITDIR="$DEFAULT_XINITDIR"])
+AC_ARG_WITH(wm,
+ AS_HELP_STRING([--with-wm=WM], [Path to default window manager]),
+ [WM="$withval"],
+ [WM="$DEFAULT_WM"])
+
+AC_ARG_WITH(xconsole,
+ AS_HELP_STRING([--with-xconsole=XCONSOLE], [Path to xconsole]),
+ [XCONSOLE="$withval"],
+ [XCONSOLE="$DEFAULT_XCONSOLE"])
+
AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
AC_ARG_WITH(launchagents-dir, AS_HELP_STRING([--with-launchagents-dir=PATH], [Path to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]),
[ launchagentsdir="${withval}" ],
@@ -205,6 +217,8 @@ AC_SUBST(XSERVER)
AC_SUBST(XAUTH)
AC_SUBST(XINIT)
AC_SUBST(XINITDIR)
+AC_SUBST(WM)
+AC_SUBST(XCONSOLE)
AC_CONFIG_FILES([Makefile
man/Makefile
diff --git a/xinitrc.cpp b/xinitrc.cpp
index 14d3cbc..5b4076c 100644
--- a/xinitrc.cpp
+++ b/xinitrc.cpp
@@ -39,6 +39,16 @@ if [ -f "$usermodmap" ]; then
XMODMAP "$usermodmap"
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
+
XCOMM start some nice programs
if [ -d XINITDIR/xinitrc.d ] ; then
@@ -48,8 +58,12 @@ if [ -d XINITDIR/xinitrc.d ] ; then
unset f
fi
-TWM &
XCLOCK -geometry 50x50-1+1 &
-XTERM -geometry 80x50+494+51 &
-XTERM -geometry 80x20+494-0 &
-exec XTERM -geometry 80x66+0+0 -name login
+XCONSOLE -iconic &
+XTERM -geometry 80x24 &
+WM || XTERM
+
+if [ "$SSH_AGENT_PID" ]; then
+ ssh-add -D < /dev/null
+ eval `ssh-agent -s -k`
+fi