summaryrefslogtreecommitdiff
path: root/.config/login.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-04-16 10:42:42 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-04-16 10:42:42 -0400
commit12662331d4597a40b58ca0f37deed76e312389ef (patch)
tree7d8df92faa13daf4a26eb534215533b7d43d11a8 /.config/login.sh
parentc5fb55843c66f1ff6d4491009d9cf9781c0a3d7f (diff)
parent7000ec189d6aecca3cbee5c68fe877f11cf0784e (diff)
Merge remote-tracking branch 'origin/master' into build64-par
Diffstat (limited to '.config/login.sh')
-rw-r--r--.config/login.sh20
1 files changed, 8 insertions, 12 deletions
diff --git a/.config/login.sh b/.config/login.sh
index 2687a8e..3c29c99 100644
--- a/.config/login.sh
+++ b/.config/login.sh
@@ -1,6 +1,7 @@
#!/bin/bash
# ~/.profile: executed by the command interpreter for login shells.
-# Should be whether logging in graphically or not.
+# I like that graphical login scripts be configured to load this, so
+# it always runs, graphical or not.
#
# This file should be executable by /bin/sh, but I'm going to assume bash(1)
#
@@ -27,7 +28,8 @@ export TMPDIR="$HOME/tmp"
# XDG ################################################################
. "$HOME/.local/lib/xdg.sh"
-ln -sf -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions
+mkdir -p -- "$XDG_RUNTIME_DIR/sessions"
+ln -sfT -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions
# Settings ###########################################################
@@ -50,15 +52,10 @@ if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then
echo 'login: Setting GPGKEY'
export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"`
fi
-if [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && [[ -n $XDG_RUNTIME_DIR ]] && type gpg-agent &>/dev/null; then
- echo 'login: Starting gpg-agent'
- mkdir -p "${XDG_RUNTIME_DIR}/sessions"
- gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" >/dev/null
-fi
-if [[ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]]; then
+if [[ -f ~/.sessions/gpg ]]; then
echo 'login: Setting gpg-agent info:'
- cat "${XDG_RUNTIME_DIR}/sessions/gpg"
- . "${XDG_RUNTIME_DIR}/sessions/gpg"
+ cat ~/.sessions/gpg
+ . ~/.sessions/gpg
export GPG_AGENT_INFO
#export SSH_AUTH_SOCK
fi
@@ -76,8 +73,7 @@ export _JAVA_OPTIONS
# X11
if [[ -z $XAUTHORITY ]]; then
#export XAUTHORITY="$HOME/.Xauthority"
- mkdir -p "${XDG_RUNTIME_DIR}/sessions"
- export XAUTHORITY="${XDG_RUNTIME_DIR}/sessions/Xauthority"
+ export XAUTHORITY=$HOME/.sessions/Xauthority
fi
# D-Bus