diff options
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | xinitrc.cpp | 25 |
2 files changed, 15 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am index 507630a..5071c4d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,6 @@ # 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 diff --git a/xinitrc.cpp b/xinitrc.cpp index 5b4076c..1bcfd96 100644 --- a/xinitrc.cpp +++ b/xinitrc.cpp @@ -1,4 +1,5 @@ XCOMM!SHELL_CMD +XCOMM $OpenBSD: xinitrc.cpp,v 1.12 2014/02/26 14:21:28 matthieu Exp $ userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap @@ -43,21 +44,25 @@ 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 ]; +id4=$HOME/.ssh/id_ecdsa +id5=$HOME/.ssh/id_ed25519 + +if [ -z "$SSH_AGENT_PID" ]; then - eval `ssh-agent -s` - ssh-add < /dev/null + if [ -x /usr/bin/ssh-agent ] && [ -f $id1 -o -f $id2 -o -f $id3 -o -f $id4 -o -f $id5 ]; + then + eval `ssh-agent -s` + ssh-add < /dev/null + fi fi -XCOMM start some nice programs - -if [ -d XINITDIR/xinitrc.d ] ; then - for f in XINITDIR/xinitrc.d/?*.sh ; do - [ -x "$f" ] && . "$f" - done - unset f +XCOMM if dbus is installed, start its daemon +if [ -x /usr/local/bin/dbus-launch -a -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then + eval `dbus-launch --sh-syntax --exit-with-session` fi +XCOMM start some nice programs + XCLOCK -geometry 50x50-1+1 & XCONSOLE -iconic & XTERM -geometry 80x24 & |