diff --git a/.profile b/.profile index 3e7105e..e7d733f 100644 --- a/.profile +++ b/.profile @@ -22,9 +22,9 @@ if ! [ -z $DISPLAY ] && which autocutsel &>/dev/null; then autocutsel -selection PRIMARY -fork & fi -# Start an ssh-agent -if [ -z $SSH_AUTH_SOCK ]; then - eval `ssh-agent` +if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + eval $(dbus-launch --sh-syntax --exit-with-session) + dbus-update-activation-environment --systemd DISPLAY + export $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gnupg) + export SSH_AUTH_SOCK fi -# Always add SSH key to the running agent; local or remote -ssh-add diff --git a/.xinitrc b/.xinitrc index e6f775b..a149acb 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,9 +1,5 @@ #!/bin/sh -source ~/.profile -source ~/.xsession -xrdb -merge ~/.Xresources - # Run all system xinitrc shell scripts xinitdir="/etc/X11/xinit/xinitrc.d" if [ -d "$xinitdir" ]; then @@ -15,4 +11,8 @@ if [ -d "$xinitdir" ]; then done fi +source ~/.profile +source ~/.xsession +xrdb -merge ~/.Xresources + exec i3