summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2015-02-16 11:37:46 -0500
committerLuke Shumaker <shumakl@purdue.edu>2015-02-16 11:37:46 -0500
commit7a2dd3a7e3f465141c90abedcb814f9ee9712edd (patch)
tree78a4911e665d84fc44d365573d24c593c705813e
parentc8f419eab92045a069c8f444c77c8ff81aa36fa2 (diff)
parentca3e04971996ebe2eebf88775e96bbf547aa0abe (diff)
Merge remote-tracking branch 'origin/master' into purdue-cs/master
Conflicts: .config/login.d/02_tmpdir.sh .config/login.d/90_dot-runtime.sh
-rw-r--r--.config/bash/rc.sh4
-rw-r--r--.config/login.d/01_xdg.sh7
-rw-r--r--.config/login.d/02_tmpdir.sh23
-rw-r--r--.config/login.d/10_less.sh2
-rw-r--r--.config/ssh/config15
5 files changed, 21 insertions, 30 deletions
diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh
index 15a9865..c7acaf8 100644
--- a/.config/bash/rc.sh
+++ b/.config/bash/rc.sh
@@ -8,6 +8,10 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
+# GDM failsafe ignores profile (login) settings, but I use XDG stuff
+# here.
+. "${XDG_CONFIG_HOME:-$HOME/.config}"/login.d/??_xdg.sh
+
# Why is this not on by default?
# "We have a cached value, but it isn't valid anymore. Should we trash it?"
# "Duh, yes!"
diff --git a/.config/login.d/01_xdg.sh b/.config/login.d/01_xdg.sh
index 726143b..4464764 100644
--- a/.config/login.d/01_xdg.sh
+++ b/.config/login.d/01_xdg.sh
@@ -28,9 +28,10 @@ if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then
fi
if ! [ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]; then
exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock"
- fi
- if flock -sn 7; then
- trap _diy_xdg_runtime_logout EXIT
+ if flock -sn 7; then
+ # Unfortunately this doesn't survive across exec(1).
+ trap _diy_xdg_runtime_logout EXIT
+ fi
fi
}
_diy_xdg_runtime_logout() {
diff --git a/.config/login.d/02_tmpdir.sh b/.config/login.d/02_tmpdir.sh
index 293064e..c0d5f18 100644
--- a/.config/login.d/02_tmpdir.sh
+++ b/.config/login.d/02_tmpdir.sh
@@ -1,21 +1,2 @@
-if [[ ! -d "$HOME/tmp/$HOSTNAME" ]]; then
- tmp="$(mktemp --tmpdir -d "$USER@$HOSTNAME-tmpdir.XXXXXXXXXXXXXXXXXXX")"
- mkdir -p -- "$HOME/tmp"
- ln -sf "$tmp" "$HOME/tmp/$HOSTNAME"
- unset tmp
-fi
-export TMPDIR="$HOME/tmp/$HOSTNAME"
-if type flock &>/dev/null; then
- if [[ "$(readlink -f /dev/fd/7)" != "$(readlink -f "$TMPDIR/.uselock")" ]]; then
- exec 7>"$TMPDIR/.uselock"
- fi
- if flock -sn 7; then
- _logout_tmpdir_cleanup() {
- if flock -xn 7; then
- rm -rf -- "$(readlink -f "$TMPDIR")"
- rm -- "$TMPDIR"
- fi
- }
- trap _logout_tmpdir_cleanup EXIT
- fi
-fi
+mkdir -p -- "$XDG_RUNTIME_DIR/tmpdir"
+export TMPDIR="$XDG_RUNTIME_DIR/tmpdir"
diff --git a/.config/login.d/10_less.sh b/.config/login.d/10_less.sh
new file mode 100644
index 0000000..c5934d6
--- /dev/null
+++ b/.config/login.d/10_less.sh
@@ -0,0 +1,2 @@
+export LESSHISTFILE="$XDG_CACHE_HOME/less/histfile"
+mkdir -p -- "${LESSHISTFILE%/*}"
diff --git a/.config/ssh/config b/.config/ssh/config
index 4a58c28..07240a6 100644
--- a/.config/ssh/config
+++ b/.config/ssh/config
@@ -26,12 +26,15 @@ Host lukeshu.com
User lukeshu
Host build64-par
- Port 22
User luke
- ForwardX11 yes
- ForwardX11Trusted yes
-Host build64-par-far
- Port 1864
HostName lukeshu.com
- User luke
+ Port 1864
+ ForwardX11 no
+ ForwardX11Trusted no
+
+ Match host %h.lan.
+ HostName build64-par
+ Port 22
+ ForwardX11 yes
+ ForwardX11Trusted yes