summaryrefslogtreecommitdiffstats
path: root/trunk/profile.d/xhost.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/profile.d/xhost.sh')
-rwxr-xr-xtrunk/profile.d/xhost.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/trunk/profile.d/xhost.sh b/trunk/profile.d/xhost.sh
new file mode 100755
index 0000000..04bb7ee
--- /dev/null
+++ b/trunk/profile.d/xhost.sh
@@ -0,0 +1,9 @@
+# Export Xauthority for users not for root.
+
+if [ ! -z "$DISPLAY" -a -z "$SSH_TTY" ];then
+ if [ "`id -u`" -gt 14 ];then
+ if [ -z $XAUTHORITY ];then
+ export XAUTHORITY=$HOME/.Xauthority
+ fi
+ fi
+fi