summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-06-05 16:37:41 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-06-05 16:37:41 (EDT)
commitc23ab4a7955aa09988dc3da207dd0fbcf943c5d5 (patch)
tree3da4c8c9546ad80f8842a30737e2ed6056c67e9a
parentb1e9ddf8e7ca1e72b8a55d4f407f88426976f9cd (diff)
downloadbash-c23ab4a7955aa09988dc3da207dd0fbcf943c5d5.zip
bash-c23ab4a7955aa09988dc3da207dd0fbcf943c5d5.tar.gz
bash-c23ab4a7955aa09988dc3da207dd0fbcf943c5d5.tar.bz2
.bashrc: Read DISPLAY from .xdisplay
-rw-r--r--.bashrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index e23c21d..4446325 100644
--- a/.bashrc
+++ b/.bashrc
@@ -38,6 +38,9 @@ if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
+# Set DISPLAY for SSH sessions.
+{ read -r DISPLAY 0<~/.xdisplay && export DISPLAY; } 2>/dev/null || :
+
for f in $(run-parts --list ~/.bashrc.d); do
. "${f}"
done